Skip to main content

VeRO: a harness for agents to optimize programs, text, and agents

Paper License: MIT Python 3.11+

VeRO gives an optimizer something to edit, a controlled way to evaluate it, and durable memory of everything it tried. The target is anything you can put under Git and score — a program (one function to a whole repo), text (a prompt, spec, or config), or an agent (its scaffold, tools, and prompts).

VeRO runs the same version → evaluate → select loop over all of them. Where each candidate is produced and contained is a swappable backend, and Harbor is the recommended one: it runs the whole coding agent inside a reproducible, credential-isolated container and scores it against a trusted evaluation sidecar. That is the right default for optimizing agents and for any untrusted or reproducibility-critical run. Lighter local backends exist for trusted work that does not need containment.

  ┌─────────────────────────┐   submit candidate    ┌─────────────────────────┐
  │  candidate production   ├──────────────────────►│  evaluation service     │
  │                         │                       │                         │
  │  coding agent, command, │◄──────────────────────┤  owns cases + scoring   │
  │  or custom strategy;    │  score + diagnostics  │                         │
  │  edits its own Git      │                       │  development: may ask   │
  │  worktree per candidate │                       │  validation:  aggregate │
  └───────────┬─────────────┘                       │  test:        withheld  │
              │ commit                              └───────────┬─────────────┘
              ▼                                                 │ report
  ┌─────────────────────────┐    next round     ┌───────────────▼─────────────┐
  │  candidate history:     │◄──────────────────┤  selection: keep the best   │
  │  every version kept,    │                   │  feasible candidate         │
  │  each one re-selectable │                   └─────────────────────────────┘
  └─────────────────────────┘

  Every model call on both sides goes through the inference gateway, which holds
  the provider key and meters spend in tokens against a per-scope budget.

Install

uv sync --extra optimize        # or --all-extras for the full toolchain
uv run vero --help

The published distribution is scaleapi-vero (pip install scaleapi-vero); it imports as vero. Do not install scale-vero from PyPI — that name is an unrelated placeholder squatted in July 2026, not VeRO.

Python 3.11–3.13. 3.14 is excluded because litellm does not build there.

Quickstart — no credentials needed

The C matrix-multiplication example is deterministic and runs with no model credentials at all. Its editable target contains only C; a trusted external harness compiles it, checks correctness, and measures latency.

cd examples/c-matmul/target
git init -b main && git add .
git -c user.name=vero -c user.email=vero@localhost commit -m baseline
cd ..

uv run vero evaluate --config vero.toml     # score the baseline
uv run vero run --config vero.toml          # optimize

VeRO evaluates the baseline, gives an isolated worktree to the configured producer, evaluates its commit, selects the faster feasible result, and leaves the original target untouched.

Examples

Each is a complete, checked-in target plus harness — clone-and-run, not a sketch.

Example Optimizes Needs
c-matmul a C matmul kernel, for latency under a correctness constraint nothing — deterministic, no credentials
circle-packing a packing algorithm: 26 circles in a unit square, maximizing the sum of radii a model, via LITELLM_BASE_URL/LITELLM_API_KEY or OPENAI_BASE_URL/OPENAI_API_KEY
harbor-circle-packing the same target, but with the agent contained and scored by a sidecar Docker + credentials
harness-conformance nothing — it checks the stack: whether a new agent or model can actually drive a run credentials for the pair under test

Run harness-conformance before spending a real benchmark on a new harness or model. Every harness addresses its provider differently, and it costs minutes to find that out instead of hours.

A real run, end to end

harbor-circle-packing runs a coding agent in a container, scores each candidate through a trusted sidecar, and finalizes on a test partition the agent never touches. One run with mini-swe-agent and claude-sonnet-5:

circle-packing search progress

0.9598 → 2.5766 on the held-out partition, shipped: true, in about an hour. The best published result for 26 circles is ~2.635. The agent wrote a 15 KB Lubachevsky–Stillinger-style growth algorithm with LP refinement — no hardcoded coordinates.

Two details worth reading off the left panel. The red point is an infeasible candidate: it scored 2.5341 but overlapped, the harness rejected it on the valid == 1 constraint, and the agent's next commit was "Add safety margin to guarantee strict feasibility". And the last five evaluations are flat — it found the idea early, then polished.

The cautionary half. The same task run with codex and no prohibition on hardcoding scored 2.6360 in eight minutes — higher than the honest run — by copying the published Packomania table into 26 coordinate literals. It satisfies the objective exactly and held-out scoring cannot catch it, because every partition here holds one deterministic case, so a memorized answer transfers perfectly. The instruction now forbids it. The general lesson is the one this suite is built around: a fixed single-instance objective measures lookup and problem-solving identically, and only varying the instance across partitions separates them.

Regenerate the figure from any session directory:

python examples/circle-packing/make_figure.py <session-dir> -o results/progress.svg

Which backend

Backend Best for Entry point
Harbor — recommended optimizing agents; untrusted or reproducibility-critical runs vero harbor run
Command harness any language; a trusted local evaluator driven over versioned JSON vero run
Python tasks Python evaluators via scale-vero-tasks, no JSON contract to write PythonTaskBackend
Native in-process fast trusted local runs; a coding agent editing a host-bound sandbox vero optimize

The target and evaluator do not have to be Python: external evaluators and producers connect over command protocols.

What you get

Any target a program, text, or an agent — anything Git-versioned and scoreable
Any producer a coding agent (any provider via LiteLLM), an external command, or a custom strategy
Durable and inspectable every candidate is versioned and re-selectable; tool calls and evaluations stream to an event log
Population search EvolutionaryStrategy fans out N offspring per round with tournament selection
Metered per-scope token accounting through the gateway, with per-case cost and latency distributions

Where things are

Path What
docs/guide.md the full guide: Harbor, command harness, Python API, tasks, sessions, concepts, safety boundaries
docs/harbor-architecture.md how the contained run is assembled, module by module
docs/agent-setup-guide.md getting a coding agent wired up
examples/ c-matmul (no credentials), circle-packing, harbor-circle-packing, harness-conformance
src/vero/ the library: optimization kernel, runtime, gateway, sidecar, CLI, agent adapters

For end-to-end agent-optimization benchmarks, see ../harness-engineering-bench/, which also documents how each coding agent must be pointed at the gateway — the one thing that reliably costs a run when it is wrong.

Paper and reproduction

VeRO was introduced in VeRO: A Harness for Agents to Optimize Agents, accepted at ICML 2026. The paper studies agent-harness optimization; the current library generalizes the same version/evaluate/select loop to programs more broadly.

The frozen code for reproducing the paper is preserved on the paper/v1 branch and at the paper-v1 tag:

git checkout paper-v1

The same pre-v0.5 tree is also readable in place under ../legacy/. Note that it is scale-vero 0.4.7 and this is 0.5.0, both importing as vero, so they cannot share a virtualenv.

Development

uv sync --all-extras
uv run pytest tests/test_v05_*.py

VeRO is licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scaleapi_vero-0.5.0.tar.gz (738.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scaleapi_vero-0.5.0-py3-none-any.whl (482.5 kB view details)

Uploaded Python 3

File details

Details for the file scaleapi_vero-0.5.0.tar.gz.

File metadata

  • Download URL: scaleapi_vero-0.5.0.tar.gz
  • Upload date:
  • Size: 738.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scaleapi_vero-0.5.0.tar.gz
Algorithm Hash digest
SHA256 658977c0069693a8aa7f0377daa87543f886f2aa84280f7e91f6de309d9fedfa
MD5 9f6059268b68fe16cbb43c6316037e57
BLAKE2b-256 fee818d2daeba4f70caba0b20b7229ede0ee0d418d8f3e19f2cb331d1b3d021a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scaleapi_vero-0.5.0.tar.gz:

Publisher: publish.yml on scaleapi/vero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scaleapi_vero-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: scaleapi_vero-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 482.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scaleapi_vero-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3fc0f561494f88ea55982cb0216e11293b166c9b3b6c2270c81e626e783b6c5
MD5 f0d8ecb7658394148fb7b2952326ae7d
BLAKE2b-256 b1502d9cd482c724899ea418da342b36b17a650d47f67e9cdb6df3ce245aad7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scaleapi_vero-0.5.0-py3-none-any.whl:

Publisher: publish.yml on scaleapi/vero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.0

2 files

This release

0.5.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page