|
1 | | -# VeRO: Versioning Rewards and Observations |
| 1 | +# VeRO: a harness for agents to optimize programs, text, and agents |
| 2 | +> The code for the original VeRO paper is archived in [`legacy/`](legacy/). |
2 | 3 |
|
3 | 4 | [](https://arxiv.org/abs/2602.22480) |
4 | 5 | [](LICENSE) |
5 | | - |
6 | | -VeRO is an evaluation harness for using coding agents to optimize LLM-based agents and workflows. It treats agent code as a versioned artifact — making changes, evaluating results, and hill-climbing toward better performance using git version control. |
7 | | - |
8 | | -> **Paper**: [VeRO: An Evaluation Harness for Agents to Optimize Agents](https://arxiv.org/abs/2602.22480) |
9 | | -
|
10 | | -## Repository Structure |
11 | | - |
12 | | -``` |
13 | | -vero/ |
14 | | -├── vero/ # Core library (scale-vero) |
15 | | -├── vero-agents/ # Agent implementations (benchmarking targets) |
16 | | -├── vero-benchmarking/ # Benchmarking scripts and analysis |
17 | | -└── LICENSE |
18 | | -``` |
19 | | - |
20 | | -### [vero/](vero/) |
21 | | - |
22 | | -The core optimization framework. Provides: |
23 | | - |
24 | | -- **Policy** — orchestrates the optimization loop (agent + evaluator + git) |
25 | | -- **Agents** — VeroAgent (OpenAI Agents SDK) and ClaudeCodeAgent (Claude Agent SDK) |
26 | | -- **Evaluator** — runs task evaluations in isolated subprocess environments |
27 | | -- **Tools** — MCP-based tools for agents (bash, file I/O, experiment runner, dataset viewer, etc.) |
28 | | -- **Traces** — session analysis and LLM-based trace interpretation |
29 | | - |
30 | | -```bash |
31 | | -cd vero && uv sync --extra optimize |
| 6 | +[](https://www.python.org/) |
| 7 | + |
| 8 | +VeRO gives a coding agent something to edit, an evaluation boundary, and durable |
| 9 | +memory of every candidate it tried. The target is anything you can put under Git |
| 10 | +and score — a **program** (a single function up to a whole codebase), **text** |
| 11 | +(a prompt, spec, or config), or an **agent** (its scaffold, tools, and prompts). |
| 12 | +Agents are programs, but not everyone reads "program" that way, so VeRO names |
| 13 | +them explicitly: it was introduced to optimize agents and generalizes the same |
| 14 | +version / evaluate / select loop to any Git-versioned artifact. |
| 15 | + |
| 16 | +```mermaid |
| 17 | +flowchart LR |
| 18 | + S["Strategy<br/>proposes ideas"] --> P["Candidate producers<br/>edit isolated workspaces"] |
| 19 | + P --> E["Evaluation backends<br/>score versioned reports"] |
| 20 | + E --> Sel["Selection keeps the<br/>best feasible candidate"] |
| 21 | + Sel -->|"next round"| S |
32 | 22 | ``` |
33 | 23 |
|
34 | | -See [vero/README.md](vero/README.md) for full documentation. |
35 | | - |
36 | | -### [vero-agents/](vero-agents/) |
| 24 | +The target and evaluator do not need to be Python. External evaluators and |
| 25 | +candidate producers connect through command protocols; Python benchmarks can |
| 26 | +use the optional, optimizer-independent `scale-vero-tasks` package. |
37 | 27 |
|
38 | | -Agent implementations used as optimization targets: |
| 28 | +Targets may live locally or in an isolated sandbox. VeRO keeps optimization |
| 29 | +state and experiment tracking on the host while running Git worktrees, producer |
| 30 | +commands, builds, and evaluation commands in the target sandbox. The core guide |
| 31 | +includes a no-bind-mount `DockerSandbox` example. |
39 | 32 |
|
40 | | -| Agent | Description | |
41 | | -|-------|-------------| |
42 | | -| **generic-agent** | General-purpose agent for MATH, GPQA, GAIA, GSM8K, etc. | |
43 | | -| **web_search_agent** | Web search agent for SimpleQA, Facts Search | |
44 | | -| **KIRA** | Terminal task agent for Terminal Bench 2.0 | |
45 | | -| **tau-bench** | Customer service tool-use agent | |
46 | | -| **pharma_summarizer** | Document summarization agent | |
| 33 | +## Repository layout |
47 | 34 |
|
48 | | -See [vero-agents/README.md](vero-agents/README.md) for details. |
| 35 | +| Directory | Purpose | |
| 36 | +| --- | --- | |
| 37 | +| [`vero/`](vero/) | The `scale-vero` optimization kernel, runtime, CLI, and coding-agent adapters | |
| 38 | +| [`vero-tasks/`](vero-tasks/) | Narrow Python task types and schema-v1 evaluation runner | |
| 39 | +| [`harness-engineering-bench/`](harness-engineering-bench/) | Harbor-native target programs and end-to-end optimization benchmarks | |
49 | 40 |
|
50 | | -### [vero-benchmarking/](vero-benchmarking/) |
| 41 | +Start with the [generic C matrix-multiplication quickstart](vero/examples/c-matmul/), |
| 42 | +try the [26-circle packing benchmark](vero/examples/circle-packing/), or read the |
| 43 | +[core guide](vero/README.md). The C example demonstrates the language-neutral |
| 44 | +command protocol without model credentials. Circle packing is a substantive |
| 45 | +coding-agent benchmark with exact geometry checks and inspectable search |
| 46 | +artifacts. |
51 | 47 |
|
52 | | -Scripts and infrastructure for running optimization experiments: |
| 48 | +For a full agent-optimization example, the [GAIA benchmark](harness-engineering-bench/gaia/) |
| 49 | +pairs a tool-using GPT-5.4 mini target with Harbor's canonical GAIA verifier and |
| 50 | +an immutable 20% / 40% / 40% development, validation, and test split. |
53 | 51 |
|
54 | 52 | ```bash |
55 | | -cd vero-benchmarking && uv sync --all-extras |
56 | | - |
57 | | -# Run an optimization experiment |
58 | | -uv run python scripts/run_benchmark.py --scaffold claude-code-vmf --model sonnet --task math |
59 | | - |
60 | | -# Build datasets |
61 | | -./scripts/build_datasets.sh |
| 53 | +cd vero |
| 54 | +uv sync --all-extras |
| 55 | +uv run vero --help |
62 | 56 | ``` |
63 | 57 |
|
64 | | -See [vero-benchmarking/README.md](vero-benchmarking/README.md) for full documentation. |
65 | | - |
66 | | -## Quick Start |
| 58 | +## Paper reproduction |
67 | 59 |
|
68 | | -### Prerequisites |
| 60 | +VeRO was introduced in [*VeRO: A Harness for Agents to Optimize |
| 61 | +Agents*](https://arxiv.org/abs/2602.22480), accepted at ICML 2026. The current |
| 62 | +library generalizes that version/evaluate/select loop from agents to programs. |
69 | 63 |
|
70 | | -- Python 3.11+ |
71 | | -- [uv](https://docs.astral.sh/uv/getting-started/installation/) |
72 | | -- Git |
73 | | -- Access to an LLM provider (via LiteLLM, OpenAI, Anthropic, etc.) |
74 | | - |
75 | | -### Install |
| 64 | +The exact paper implementation is frozen separately from the v0.5 redesign: |
76 | 65 |
|
77 | 66 | ```bash |
78 | | -git clone <repo-url> && cd vero |
79 | | - |
80 | | -# Install core library |
81 | | -cd vero && uv sync --extra optimize |
82 | | - |
83 | | -# Install benchmarking tools |
84 | | -cd ../vero-benchmarking && uv sync --all-extras |
| 67 | +git checkout paper-v1 |
85 | 68 | ``` |
86 | 69 |
|
87 | | -### Run Your First Optimization |
88 | | - |
89 | | -```python |
90 | | -from agents import Agent as OAIAgent |
91 | | -from vero.policy import Policy |
92 | | -from vero.agents.vero import VeroAgent |
93 | | - |
94 | | -policy = Policy( |
95 | | - project_path="/path/to/my-agent", |
96 | | - dataset="/path/to/my-dataset", |
97 | | - agent=VeroAgent( |
98 | | - oai_agent=OAIAgent(name="VeroAgent", model="anthropic/claude-sonnet-4-5-20250929"), |
99 | | - ), |
100 | | - task="main", |
101 | | - train_budget=10, |
102 | | - max_turns=200, |
103 | | -) |
104 | | - |
105 | | -best = await policy.run() |
106 | | -print(f"Best commit: {best.commit}, score: {best.score}") |
107 | | -``` |
| 70 | +Use the `paper/v1` branch or `paper-v1` tag for reproduction. Development of |
| 71 | +the generic program optimizer continues on the `v0.5` branch. The frozen ref |
| 72 | +also preserves the paper-era `vero-agents` and `vero-benchmarking` directories; |
| 73 | +their Harbor-native replacement on `v0.5` is `harness-engineering-bench`. |
108 | 74 |
|
109 | 75 | ## Citation |
110 | 76 |
|
111 | 77 | ```bibtex |
112 | 78 | @article{ursekar2026vero, |
113 | | - title={VeRO: An Evaluation Harness for Agents to Optimize Agents}, |
| 79 | + title={VeRO: A Harness for Agents to Optimize Agents}, |
114 | 80 | author={Ursekar, Varun and Shanker, Apaar and Chatrath, Veronica and Xue, Yuan (Emily) and Denton, Sam}, |
115 | 81 | journal={arXiv preprint arXiv:2602.22480}, |
116 | 82 | year={2026} |
117 | 83 | } |
118 | 84 | ``` |
119 | 85 |
|
120 | | -## License |
121 | | - |
122 | | -[MIT](LICENSE) |
| 86 | +VeRO is licensed under the [MIT License](LICENSE). |
0 commit comments