agentix.runner runs an agent over a dataset of instances — each inside its
own sandbox — and returns a typed Rollout per instance. It is the reusable
form of the per-instance choreography you would otherwise hand-write: set up
the task, run the agent, score the result. An RL or eval loop calls
run_rollouts(...) directly; the agentix-run CLI wraps the same function.
What it does
For each instance, two sandboxes back to back:- Agent sandbox —
dataset.setup(sandbox, instance)prepares the task, thenagent.solve(sandbox, instance, model=...)produces a patch. - Score sandbox (fresh) —
dataset.score(sandbox, instance, patch)grades it, so scoring always starts from a clean task image.
n_concurrent. A failure in one
instance is recorded on its Rollout.error and never aborts the batch.
The runner is built only on the stable surface — provider.session(config)
for sandboxes and sandbox.remote(fn, ...) for in-sandbox calls (plus the
bundle). It carries no benchmark- or agent-specific logic.
Adapters
A dataset and an agent plug in through two small Protocols.setup/score and solve receive the live sandbox, so they drive work with
sandbox.remote(fn, ...) — for example the agentix.plugins.datasets.swe
prepare_env / score functions, or an agent’s run callable. The adapter
owns any agent-specific wiring (LLM bridge, model selection, patch
extraction); see Integrate an agent and
Integrate a dataset.
Result
CLI
The library is the real interface;agentix-run is a thin wrapper for manual
runs that resolves module:attr adapters and a provider backend:
Worked example
examples/run-swe-rollouts
runs SWE-bench through the runner with a SweDataset + ClaudeCodeAgent
adapter; --ground-truth swaps in a gold-patch agent that reuses the same
scoring path.