How google-research/rrsi works
RRSI evolves agent harnesses through a repeated propose–screen–evaluate–select loop, with domain adapters connecting that shared search to coding, document-work, and engineering-design benchmarks. Accepted candidates become git-backed incumbents; evaluation and edit history provide evidence for later rounds. The README documents the search stages and all three instances; sampled source additionally confirms selected adapter, workspace-runner, and gateway behavior, so unsampled domain wiring is shown only where documented.
Main entry points: loop.py Round loop · evaluate.py Score and cost · workspace_driver.py Workspace agent · analyst.py Harness analysis
Components 23
Search orchestration
- Command interface
rrsi.py - Run driver
rrsi/driver.py - Round loop
rrsi/loop.py
Search method
- Harness analysis
rrsi/analyst.py - Trace digester
rrsi/digester.py - Candidate proposer
rrsi/propose.py - Leakage critic
rrsi/critic.py - Candidate selection
rrsi/selection.py - Score and cost
rrsi/evaluate.py
Benchmark instances
- Terminal benchmark
domains/coding/adapter.py - Harbor runner
domains/coding/scripts/run_eval.sh - Document-work benchmark
domains/workspace/adapter.py - Workspace agent
domains/workspace/workspace_driver.py - Workspace tools
domains/workspace/mcp_gateway/gateway.py - Engineering benchmark
domains/eng/adapter.py - Engineering tools
domains/eng/mcp_gateway/gateway.py - Held-out evaluations
domains/workspace/ood
Search state
- Worktree operations
rrsi/gitops.py - Edit history
rrsi/history.py - Run frontier
rrsi/loop.py
Other components
- Search operator
- LLM service
- Benchmark tasks
Connections 28
- Search operator → Command interface: invokes
- Command interface → Run driver: dispatches
- Run driver → Round loop: runs rounds
- Round loop → Harness analysis: analyzes incumbent
- Harness analysis → Trace digester: dispatches traces
- Harness analysis → LLM service: requests analysis
- Round loop → Candidate proposer: drafts candidates
- Candidate proposer → LLM service: requests edits
- Round loop → Leakage critic: screens candidates
- Leakage critic → LLM service: requests review
- Round loop → Score and cost: measures candidates
- Score and cost → Candidate selection: provides scores
- Round loop → Candidate selection: selects winner
- Round loop → Worktree operations: manages worktrees
- Round loop → Edit history: records edits
- Round loop → Run frontier: updates incumbent
- Score and cost → Terminal benchmark: evaluates via
- Terminal benchmark → Harbor runner: runs trials
- Harbor runner → Benchmark tasks: loads tasks
- Score and cost → Document-work benchmark: evaluates via
- Document-work benchmark → Workspace agent: produces runs
- Workspace agent → Workspace tools: uses tools
- Workspace agent → Benchmark tasks: loads tasks
- Score and cost → Engineering benchmark: evaluates via
- Engineering benchmark → Benchmark tasks: scores tasks
- Workspace agent → LLM service: requests agent responses
- Engineering tools → Benchmark tasks: accesses task workspace
- Held-out evaluations → Benchmark tasks: evaluates held-out sets