What Should an AI Agent Earn for Shipping Code?
A Budget Is Also a Coordination Mechanism
A team of agents can spend tokens on planning, coding, review, and QA before it ships anything. A fixed allowance is simple, but it cannot respond when one role makes progress and another stalls. Agora tests whether a shared treasury can react to measured work while keeping a hard limit on total spend.
The runtime assigns a Product Manager, Architect, Coders, Reviewer, and QA agent to a real git workspace. Patches pass through review and pytest. The resulting test and ticket signals feed the budget for the next round.
Fixed Allocation
- Each role receives a preset share, regardless of its latest contribution.
- A tight global budget can leave productive work short of tokens.
- The allocation rule is easy to understand and serves as the experiment's baseline.
Agora's Dynamic Allocation
- Measured progress: Pytest results, accepted tickets, and review outcomes contribute to value.
- Banker: Calculates per-role ROI and steers later budgets using smoothed scores.
- Expiring Wallets: Unspent tokens perish at the end of each round to eliminate hoarding and inflation.
A green build is evidence of progress. It is not, by itself, proof that the software is useful or ready for production.
The Architecture: A Treasury Around a Real Workspace
Agora combines role-specific agents, a git workspace, a review gate, pytest, and a budget allocator. LLM calls consume each role's token wallet. Review can veto a patch; QA checks the resulting workspace. The run ends with a verdict and an auditable transcript.
The first rounds use an equal split while the system gathers evidence. Later rounds use measured value per token. Coordination roles receive lineage credit for accepted work, so planning does not disappear merely because it does not directly change tests. The global budget remains capped.
Four Mechanisms That Make the Budget Inspectable
The allocator matters only if the signals and the resulting spending can be checked.
1. Lineage Coordination Royalty
Planning roles do not directly write code. Agora credits upstream ticket lineage when work is accepted, including a 20% PM credit configured in the project.
2. Expiring Wallets & Anti-Hoarding
Tokens issued in Round N cannot be saved for Round N+1. Unspent tokens expire, and the total amount issued is capped by the run budget.
3. Write-Protected Acceptance Suites
Acceptance tests are kept outside the coder workspace. QA runs them against the proposed software, alongside the visible tests, to catch failures that self-reported completion would miss.
4. Structural Git Rollback on Veto
A reviewer veto triggers a git rollback of the rejected diff. An integration test checks that the bad diff is removed while an earlier accepted change remains.
The Softmax ROI Engine: Where the Next Budget Goes
Think of the treasury as 100 units of inference capacity for the next round. An equal split funds every role the same way. Agora instead scores verified contribution against tokens spent, smooths the scores across rounds, and uses softmax to set the next shares. The chart shows the decision a finance leader would see: who receives more capacity, and where it comes from.
A 100-unit budget, reallocated by measured ROI
Each pair compares an equal split with a possible next-round allocation.
Illustrative allocation, not a measured Agora run or a forecast of savings. Fixed shares are rounded from one sixth; bars use a common 0–35% scale.
Softmax turns the smoothed scores into shares while avoiding a winner-takes-all decision. This is a budget policy, not a guarantee that the best agent always receives the most tokens: measured value is an imperfect proxy, and coordination roles need explicit credit.
What the Runs Actually Show
The project reports 53 passing tests across the runtime. Integration tests cover a shipped HTTP API, reviewer veto and rollback, budget shifts, and budget exhaustion. Two golden tests check repeatable transcripts and replay hashes. These are tests of the system, not 53 independently completed software projects.
In the 18-cell deterministic matrix, one tight-budget comparison reached green with 1,483 tokens under dynamic allocation versus 1,760 with the fixed baseline: 15.7% fewer tokens in that comparison. The matrix uses a scripted FakeLLM, so it cannot establish a general cost saving with real models. Live-provider runs verified token and dollar accounting on a trivial ticket; the documented live HTTP API attempts did not converge within the tested free-tier budgets.
| Metric Dimension | Observed in Agora | Limit |
|---|---|---|
| Budget Distribution | Later rounds shift budget toward measured contribution. | Value attribution depends on tests and ticket signals. |
| Budget Exhaustion | A kill switch halts a run and preserves its artifacts. | It cannot make an underfunded task succeed. |
| Verification | Pytest and hidden acceptance checks inform the verdict. | Test coverage bounds what can be claimed. |
| Token Comparison | 15.7% fewer tokens in one deterministic tight-budget cell. | No measured general savings claim for live models. |
| Audit Trail | Ledger, events, messages, LLM usage, pytest results, and replay artifacts. | Artifacts support inspection of the recorded run. |
What I Would Test Next
Agora makes agent spending and software progress inspectable in one runtime. The next useful experiment is a repeated live-model comparison on the same tasks and budgets, with completion rate, tokens, dollars, and regressions reported together. That would show whether the deterministic allocation advantage survives model variance.