kew

the agent is an untrusted author

Offload the work.
Keep the judgment.

The open-source control plane for autonomous coding agents. kew treats every agent as an untrusted author: what it emits is input to check, never proof.

A change never defines its own proof.

What the agent emitsWhat kew does with it
Its git repositoryDoes not publish from it. Reads the files as data, rebuilds the commit on the host and scans it before the push. On the contained route.
Its test editsRuns the base branch’s copy of each edited test against the new code. In the merge verify, on kew’s own repository layout today.
Its cost reportThe cap is priced from usage that only increases. On the contained route.
With the opt-in settings on: reasons, verdicts and gate edits are checked too
Its reason for a test changeOnly a line the reviewer accepts becomes a declaration. With [review] adversarial = true.
The code under reviewThe verdict comes only from the reviewer’s own final result event, bound to the head commit. With [review] adversarial = true.
Its edits to the gatesHeld: two independent reviews, then a human release. With [epic] merge_queue = true, over the files in [epic] merge_gate_paths.

kew’s own repository runs with governed review on.

The web console · an epic of 13 issues demo data

kew’s web console replaying the epic ledger-v2 at its first frame: none of 13 issues done, and #101, selected, in progresskew’s web console replaying the epic ledger-v2: 5 of 13 issues done, one blocked, and no issue selectedkew’s web console replaying the epic ledger-v2: 5 of 13 issues done, and #108, selected, in magenta because its pull request is open and the decision is a person’skew’s web console on the epic ledger-v2 as it stands: 5 of 13 issues done and three that need a person, #107 and #108 among them as magenta cards; the selected #107’s pipeline, its implement run a success, its publish scan clean, review round 2 ready, and its merge waiting on a person; its evidence 4 of 4 attested; and a block that asks for a merge decision and offers to show the failed merge verify kew’s web console on a phone, on the epic ledger-v2 as it stands: 5 of 13 issues done, three that need a person, and #107 in magenta, in review, needs you
The real console on sample data: one epic at three moments of its replay, and as it stands now.The real console on sample data: one epic as it stands now. A card in magenta is where a person is the next move. Open the live demo ↗

Evidence

Built with itself.
Numbers you can check.

kew is the tool that built itself, under its own budgets, its own review gate and its own audit chain. Every merge went through the maintainer’s GitHub account. Dollar figures are API-equivalent list price, not money billed.

kew’s development repository · to 13 Nov 2026

1,156 of 1,664

merged pull requests were opened by an agent, by the agent/issue-N branch name. Bots are in the total.

opened by an agent · 69.5% other branches · 30.5%

One evidence pack · 1 to 26 Jul 2026 · list price

211PRs merged
$6.70per merged PR
$1,412.67total spend
43 epics, 304 items

Where the $1,412.67 went.

  • dispatch $1,103.66
  • review $151.59
  • adversarial review $91.96
  • review remediation $50.89
  • planning $14.57
Per-model figures and the method
ModelRunnerRunsOpenedMergedSpendPer merged PR
claude-opus-4-8claude-code299159159$1,128.32$7.10
claude-opus-5claude-code4351$169.51$169.51
claude-sonnet-4-6claude-code545252$110.89$2.13
claude-opus-4-6claude-code200$3.78n/a
deepseek-v4-flashopencode321$0.17$0.17
Qwen3-Coder-30B (local)lemonade1187$0.00$0.00
unknownn/a3500$0.00n/a

From the evidence pack kew report export wrote for kew’s own repository. Opened counts the pull requests each model wrote; runs count all of its runs, reviews included. The models ran in different periods and on different work, so the per-PR figures are not a like-for-like comparison.

35 runs carry no recorded model. They are in the totals rather than dropped from them, so the cost per merged PR is not flattered by hiding them.

The merged column sums to 220, the headline to 211: the column reads each PR’s state from the run that wrote it, the headline from the PR’s latest run record. The pack was written before kew had recorded every merge in this window, so both figures are lower than the ledger’s count today.

Verify it here

Three of kew’s real anchor records, hashed with the algorithm kew uses: each hash is checked against the record, each prev against the whole previous record.

chain intact 3 hashes, 2 links verified at build
anchor #147

2026-07-06 · count 147

canonical [147,"d097580f0778c46aef07b1086016ad0d1efe3a362d858759cb09e28b9eefc161",147,"2026-07-06T05:44:37.922021+00:00",null]
sha-256 64c9f3d58e…6b23f1

matches the record

prev binds nothing

Written before the anchor chain existed, so this link cannot be checked.

anchor #1471

2026-07-24 · count 1471

canonical [1471,"507c7dce777d04e88099a953d34b6797409a3c6ee6a578004f45f0989a82713e",1471,"2026-07-24T05:26:08.261545+00:00","64c9f3d58e1c2f0c5a73901a581820addffa76b67a502fa2ebbcf607376b23f1"]
sha-256 0b30eb5143…5b59c8

matches the record

prev binds 64c9f3d58e…6b23f1

matches anchor #147

anchor #1731

2026-07-25 · count 1731

canonical [1731,"b4f05a1fc884a78805035eb2fb94ec5662e8399988abd0ed2244380a20be249d",1731,"2026-07-25T22:57:25.130705+00:00","0b30eb5143d2e39fb5c25300599fad81f23dc3dd8b442cf01015252d275b59c8"]
sha-256 30e33c1e11…ed2153

matches the record

prev binds 0b30eb5143…5b59c8

matches anchor #1471

How the anchors are made

A scheduled job on the ledger host commits anchors to git, out of band. It does not run every day; the record has gaps of weeks. Rewriting the audit log would mean rewriting that git history too, which is what makes a silent re-chain detectable rather than merely unlikely.

What you can check from this page

  • Recompute every anchor hash from the record shown, with the same algorithm kew uses.
  • Check that each anchor’s prev binds the whole previous anchor record.
  • Watch a single altered value break the link that binds it.
  • Cross-foot the pack’s arithmetic: total spend against cost per merged PR, and the run kinds’ spend against the total.

What you cannot

  • Recompute the chain head from this page. The pack ships the head hash and the event count, not the events, so there is no preimage here.
  • Independently corroborate the costs or merge states. They come from kew’s own run store.

The loop

Six stages.
You own two of them.

  1. 01 · you You scope the work. Label an issue ready and it enters the queue.
  2. 02 It dispatches into isolation. Every agent gets a standalone clone with its own .git and branch.
  3. 03 It works under a hard cap. Once a cap is reached, every dispatch is refused at admission.
  4. 04 A second agent attacks the first one's work. Opt-in. With it on, the reviewer is a fresh context and the verdict is bound to the pull request head it reviewed.
  5. 05 · you You keep the judgment. What arrives is a pull request, not a merge.
  6. 06 Every decision is attested. Each event is hash-chained to the one before it.

05 in the consoledemo data

The needs-you block in kew’s web console, headed Needs you and Merge decision. Under Do this it offers a magenta control to see the failed merge verify and a control to open PR #207 to merge, and it says the merge verify failed at 69566afe, that 2 of main’s tests fail on this PR, and that the merge decision is the person’s.

How a change leaves the agent’s sandbox · the contained route

  1. Untrusted The agent’s checkout It can write anything here, .git included: hooks, config, replace refs, a push URL.
  2. Second container Copy the files out No network, no credentials. The changed files leave as plain bytes.
  3. Host Rebuild the commit Each file is checked. The commit is made in a repository only the host has touched.
  4. Host Scan, then push Every object the push would send is scanned for the credentials the host holds and for known key shapes. Then one commit goes to the branch the operator configured.
Each rule, with its code, its tests and its limits →

Get kew

Install from PyPI

uv tool install "kew-cli[serve]"
Or, inside your repository, with npm npx create-kew

Python 3.13. Requires git, gh, a container runtime and a runner. Works with GitHub Issues, and with Linear Experimental. Apache-2.0 ↗.

A CLI, a TUI and a web console over six runners:
  • claude-code
  • opencode
  • codex
  • pi
  • hermes
  • lemonade · experimental