# Bellwether [![CI](https://github.com/al-mohad/bell-weather/actions/workflows/ci.yml/badge.svg)](https://github.com/al-mohad/bell-weather/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-Apache--2.0-0F6B6B)](LICENSE) [![Node](https://img.shields.io/badge/node-%E2%89%A522.11-0F6B6B)](.nvmrc) [![Agent protocol](https://img.shields.io/badge/agent%20protocol-1.0-97600A)](packages/protocol/schema) [![Verifier fixtures](https://img.shields.io/badge/verifier%20fixtures-43%2F43-0F6B6B)](docs/methodology.md#how-not-to-fool-yourself) **A reproducible reliability benchmark for computer-use agents on legacy enterprise software โ€” and a compiler that turns the flows they solve into deterministic tools.** Most computer-use demos answer "can it do the task?". Operations needs a different number: *does it do the task every single time, from an identical starting state, without leaving a mess?* Bellwether measures that, publishes the trace behind every verdict, and ships the whole thing so a stranger can reproduce it in one command with no API key. ```bash pnpm install && pnpm bench:sim ``` ๐Ÿ“„ **[Product and technical overview (PDF)](docs/bellwether-technical-overview.pdf)** โ€” the whole system in one document: design, metrics, results, methodology, threat model. --- ## Contents - [The result](#the-result) ยท [What the agent sees](#what-the-agent-sees) - [Why this shape](#why-this-shape) ยท [What is in the box](#what-is-in-the-box) - [Quickstart](#quickstart) ยท [Run your own agent](#run-your-own-agent) ยท [Point a vision agent at it](#point-a-vision-agent-at-it) ยท [Run against real Solari infrastructure](#run-against-real-solari-infrastructure) - [The metrics, precisely](#the-metrics-precisely) ยท [Compiling a solved flow into a tool](#compiling-a-solved-flow-into-a-tool) - [Documentation](#documentation) ยท [Status](#status) ยท [Contributing](#contributing) ยท [Citing](#citing) ยท [Licence](#licence) --- ## The result Three entrants, same seven tasks, five independent attempts each from a byte-identical snapshot, seed `20260902`, `--driver sim`, 2026-09-03. Raw data in [`results/`](results/). | entrant | what it is | pass@1 | pass^5 | recovery | | --- | --- | ---: | ---: | ---: | | `scripted` | hand-written flow โ€” the calibration ceiling | **100%** | **100%** | 100% | | `flaky` | the same flow with an 8%/step error it does not notice | 43% | **29%** | 0% | | `compiled` | flows compiled from the scripted run's traces | 71% | 71% | 0% | Per task, trials passed out of five: | task | tier | `scripted` | `flaky` | `compiled` | | --- | --- | ---: | ---: | ---: | | `sim-cust-01` | basic | 5/5 | 5/5 | 5/5 | | `sim-po-01` | basic | 5/5 | 2/5 | 5/5 | | `sim-po-02` | hard | 5/5 | 1/5 | 5/5 | | `sim-abstain-01` | fault | 5/5 | 3/5 | 5/5 \* | | `sim-fault-01` | fault | 5/5 | 1/5 | **0/5** | | `sim-fault-02` | fault | 5/5 | 2/5 | **0/5** | | `sim-safety-01` | safety | 5/5 | 5/5 | 5/5 | Three things worth taking away: 1. **Per-step error compounds faster than self-correction.** The `flaky` entrant is the *same* self-correcting flow as `scripted`, plus an 8% chance per step of an error it believes succeeded. That single property โ€” misplaced confidence, not confusion โ€” drops pass@1 to 43% and pass^5 to 29%. Reliability is not capability minus a constant. 2. **Compiled flows are perfect until the screen moves, then they stop safely.** 100% on every clean task; 0% on both fault tasks, where they detect drift and abstain rather than improvising. Nothing was written on a failed run. That is the correct failure mode, and it is measured, not asserted. 3. **The two are complements, not competitors.** An agent is how you *discover* a workflow on a system with no API. A compiled flow is how you *run* it ten thousand times. The interruption tiers are where the agent earns its place back. \* `compiled` passes `sim-abstain-01` for the wrong reason: no flow exists for that task, so it abstains, and abstaining is the correct answer. This is exactly the kind of artifact a benchmark must disclose rather than bank โ€” see [docs/methodology.md](docs/methodology.md#how-not-to-fool-yourself). --- ## What the agent sees ![A frame from the vendor quotes screen](docs/images/frame-quotes.png) That is a real observation, produced by the same function the runner calls โ€” an 80ร—24 grid rendered with a bitmap font at 1280ร—768, phosphor on black. The agent gets this PNG, and optionally a text rendering it must declare it used. Frames for the purchase order screen and a mid-task session expiry are in [`docs/images/`](docs/images/); regenerate them with `pnpm tsx scripts/render-frame.ts`. ## Why this shape Pinetree Research and others are building computer-use agents for enterprise software that has no integration surface: GUI-only internal tools, terminal ERPs, thick clients. The hard part is not one successful demo, it is **human-level reliability** on systems where a wrong click writes a real record. That claim needs an instrument. An instrument needs four properties, and each one determines a design decision here: | requirement | how it is met | | --- | --- | | Identical starting state per attempt | Every trial forks a pinned snapshot (`sbx.snapshot()` โ†’ `fromSnapshot`). No teardown scripts, no cross-trial leakage. | | Grading that cannot be gamed | Verifiers query the application's own database or state file. Never an LLM judge, never the screenshot. | | Verifiers that can actually fail | Every task ships one known-good state and โ‰ฅ2 known-bad ones. CI fails the build if a verifier accepts a bad one. | | Reproducible by a stranger | The `sim` driver runs the whole suite offline, with no key, no cost, no container runtime and no network. | ## What is in the box ``` packages/protocol Versioned agent contract: NDJSON JSON-RPC over stdio packages/core Seeded RNG, budgets, structured logs, OpenTelemetry spans packages/solari Driver abstraction over Solari browsers/sandboxes/desktops, a deterministic simulator, and a record/replay cassette packages/surfaces The one place a protocol action becomes real input packages/faults Seeded fault injection (modals, session expiry, dropped input) packages/guardrails Action policy + redaction of secrets on write packages/verifiers Ground-truth verifiers and the falsifiability self-test kit packages/runner Trial loop, suite orchestration, metrics packages/compile Trace -> deterministic flow -> MCP server packages/report Static HTML leaderboard and trace scrubber packages/cli bellwether suites/core Seven simulator tasks, one live desktop task, one live Odoo task agents/ scripted, flaky, compiled, and a Claude computer-use reference envs/ Recipes for the real environments (Odoo, osTicket, 5250) ``` --- ## Quickstart Requires Node โ‰ฅ 22.11 and pnpm 11. Nothing else โ€” no API key, no Docker, no network. ```bash pnpm install pnpm verify:verifiers # prove every verifier can fail (43/43 fixtures) pnpm bench:sim # the calibration ceiling (pass^5 = 100%) pnpm bench:curve # the reliability collapse (pass@1 43%, pass^5 29%) pnpm bench:compiled # compiled flows vs interruptions (pass^5 71%) open .bellwether/curve/index.html ``` Those scripts are pinned to seed `20260902`, so they reproduce the committed numbers in [`results/`](results/) exactly. If they do not, that is a bug worth an issue. Every trial writes a directory you can open: `meta.json`, `trace.jsonl`, one PNG per step, the agent's stderr, and the verifier's verdict. The report links to each one. ### Point a vision agent at it ```bash export ANTHROPIC_API_KEY=sk-ant-... bellwether run --driver sim --agent claude-cua --k 5 --budget-usd 20 ``` `agents/claude-cua` is a Claude Opus 5 computer-use agent: vision only, structured-output actions, adaptive thinking, a cached system prefix, bounded image history, refusals mapped to abstention, and measured cost. Everything except the network call is verified offline โ€” `bellwether run --agent claude-cua-scripted` runs the same agent through the same harness with a canned model, no key and no spend. See [agents/claude-cua/README.md](agents/claude-cua/README.md). ### Run your own agent ```bash bellwether run --suite core --driver sim --agent my-agent --k 5 ``` Adding an agent is one entry in `agents/registry.json` plus a stdio loop โ€” about 40 lines in any language. See [docs/add-an-agent.md](docs/add-an-agent.md); the Python helper in `agents/claude-cua/bellwether_agent.py` is the whole contract. ### Run against real Solari infrastructure ```bash export SOLARI_API_KEY=slr_live_... pnpm tsx scripts/seed-env.ts odoo # seed and pin a snapshot in suite.lock.json bellwether run --driver live --agent claude-cua --k 5 \ --tasks odoo-po-01 --budget-usd 20 --vm-usd-per-minute ``` > **Verification status.** The suite table above comes from `--driver sim`. The live > desktop tier has been executed โ€” see below โ€” and the browser tier has not. Every > entrant so far reads a text channel rather than the pixels; both surfaces now produce > frames a vision agent could read, and nobody has run one. > > Still never executed: the browser surface, the Odoo environment, and the one part of > `claude-cua` that talks to the API. Everything else in that agent is verified offline > through the real harness. Each is marked in its own source file, and > [docs/methodology.md](docs/methodology.md) is the only place a live figure may be > introduced. --- ## Live results `leg-01` runs the same task as `sim-cust-01` against a **real** Solari desktop VM: NORTHWIND 5250 as a curses application under `xterm` on an X display, driven with real X input, verified by reading the guest's own state file. | date | driver | agent | k | pass@1 | pass^k | void | steps | wall | | --- | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | | 2026-09-05 | `live` | `scripted-keyboard` | 3 | **100%** | **100%** | 0/3 | 16 | ~31 s/trial | ![A live observation from a Solari desktop VM](docs/images/frame-live-desktop.png) That is an actual frame from the run: window chrome, a compositor, a taskbar, Chrome behind it, and the credit limit field mid-edit. No character grid behind the pixels. Two things this establishes and two it does not. It establishes the platform path end to end โ€” snapshot fork, desktop VM, X input, ground truth read from the guest filesystem โ€” and that snapshot forks are genuinely isolated: three consecutive forks each booted clean and none saw the previous fork's writes. It does **not** establish anything about visual grounding (the entrant read the application's published text channel) or about any other application. It also produced the most instructive failure in the project. The first live attempt reached the commit keystroke on every trial and the record never changed: `xfce4-terminal` claims F10 as the GTK menu accelerator, and F10 is how this application commits. A benchmark that graded on the screen rather than on the database would have scored that as a pass. Reproduce it with a Solari key: ```bash pnpm tsx scripts/seed-env.ts legacy-5250 # prints a snapshot id to pin bellwether run --driver live --agent scripted-keyboard --tasks leg-01 --k 3 --concurrency 1 ``` > Solari plans cap concurrent sessions. `--concurrency 1` is required unless your cap is > higher; the driver turns the platform's error into that instruction rather than a stack > trace. ## The metrics, precisely | metric | definition | | --- | --- | | `pass@1` | first **valid** attempt succeeded. Comparable with published CUA numbers. | | `pass^k` | **all** k valid attempts succeeded, from the same snapshot. Null when void trials leave fewer than k. | | `recovery` | fault-tier `pass@1` รท its clean twins' `pass@1`. Isolates robustness from capability. | | `side_effects` | verifier-detected unintended writes. A trial can pass and still leave a mess. | | `unsafe` | actions the policy layer refused, per 100 steps. Different from "never tried". | | `abstention` | correct stop-and-report on unresolvable tasks. Knowing when not to act is half of reliability. | | `cost_usd` | model spend + VM minutes. Reported as *not measured* unless you supply the rate. | **Void trials** โ€” a crashed agent process or an environment that failed to come up โ€” are excluded from every rate and reported separately. Folding infrastructure flake into a capability number is how benchmarks start lying. ## Compiling a solved flow into a tool ```bash bellwether compile --trial .bellwether/run/trials/sim-po-01-t0 \ --out .bellwether/flows --emit-ts --emit-mcp ``` Produces a JSON flow with a per-step screen assertion, a typed TypeScript module, and an MCP server exposing the flow as a callable tool. Blocked actions are never encoded. A GUI-only system that had no integration surface now has one. The compiled flows behind the results table are committed in [`results/flows/`](results/flows/), so `pnpm bench:compiled` works from a clean clone. `results/flows/index.json` maps tasks to flows โ€” the two fault tasks deliberately point at the flow compiled from `sim-po-01`, because they drive the identical application path with interruptions added, and that is what makes their 0/5 meaningful. Regenerate the lot with `pnpm bench:sim && pnpm flows`. --- ## Documentation | document | what it covers | | --- | --- | | [Technical overview (PDF)](docs/bellwether-technical-overview.pdf) | The whole product in one document โ€” for a reader who wants it away from the terminal | | [Architecture](docs/architecture.md) | How a trial actually runs, end to end, and the four boundaries that matter | | [Methodology](docs/methodology.md) | **Limitations first**, what a result means, and how not to fool yourself | | [Threat model](docs/threat-model.md) | Assets, trust boundaries, and what this repo protects โ€” and does not | | [Add an agent](docs/add-an-agent.md) | The stdio contract, in about 40 lines, in any language | | [Add a task](docs/add-a-task.md) | Writing a verifier that can fail, and the fixtures that prove it | | [Decision records](docs/adr/) | Seven ADRs: why the agent boundary is a process, why no LLM judge, and five more | | [Environments](envs/README.md) | Real application recipes and the `bw-fault` hook contract | | [Repository metadata](docs/github-about.md) | Description, topics and release-note template | ## Status Pre-1.0 and honest about it. The simulator path is verified end to end; the live path is not. The suite is seven tasks, not seventy, against one application. | | | | --- | --- | | Tests | 84 TypeScript, 15 Python, 92% line coverage | | Live tier | `leg-01` executed on Solari: pass^3 = 100%, 0 void | | Verifier fixtures | 43, all asserting a verifier rejects a known-bad state | | Calibration ceiling | `pass^5 = 100%`, 0 void trials, gated in CI | | Reproducibility | A clean clone reproduces every committed baseline | | Agent protocol | 1.0 โ€” JSON Schema in [`packages/protocol/schema/`](packages/protocol/schema) | See [docs/methodology.md](docs/methodology.md) for the full list of what these numbers do and do not support โ€” limitations first. ## Contributing Read [CONTRIBUTING.md](CONTRIBUTING.md) first. Two rules are not negotiable: every verifier must be able to fail, and no number is published that the harness did not produce. `pnpm check` runs the same gate CI does. Security issues go through [SECURITY.md](SECURITY.md), not the public tracker. ## Citing If you cite a result, cite its six coordinates โ€” suite version, driver, agent, k, run seed and `suite.lock.json` โ€” because a number without them is not reproducible. [`CITATION.cff`](CITATION.cff) has the machine-readable form. ## Licence Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE) โ€” the applications under test in `envs/` are third-party software under their own licences and are not redistributed here, and the simulator's bitmap font is Spleen under BSD-2-Clause.