Skip to content
The AI Agent Factory

37.2 The worked example

Approved by
Panaversity ·
7 min read

In everyday life. Two bakeries sell the same bread at the same price. One buys flour from a wholesaler, the other from the supermarket. To compare them fairly, you compare against the best price the second bakery could get, not the worst.

What you will learn. One worker's full monthly statement on four setups, where the difference comes from, and how big it really is.

Why it matters. It is easy to make an open stack look much cheaper by comparing it with an expensive setup nobody should use. This page does the fair comparison.

The medium worker

From Chapter 32: 300 invoices a month, about 10 model calls each, and 12,000 input and 1,000 output tokens per call. The worker has 60 hours of active runtime and a monthly learning cycle. A person checks 10% of the work, the rate of a worker in about its fourth month of learning (a new one starts at 25%, 37.5), for 3 minutes each, at $12 an hour, an offshore reviewer's cost. Revenue: $100 a month. These are the paper's illustration.

Four setups, line by line

LineClaude Managed Agents, Sonnet dreamingPi with Claude, Sonnet dreamingPi hybridPi with economy models
Revenue$100.00$100.00$100.00$100.00
Models, doing the work$9.95$9.95$7.79$2.76
Runtime$4.80$0.35$0.35$0.35
Other running costs$1.20$1.80$1.80$1.80
People reviewing$18.00$18.00$18.00$18.00
Contribution I$66.06$69.91$72.06$77.09
Learning$21.76$21.61$7.66$7.03
Contribution II$44.30$48.30$64.40$70.07

On these numbers, the worker on economy models keeps $70 of every $100, against $44 on Claude Managed Agents with Sonnet dreaming. That is the headline. It is not the fair comparison.

The fair comparison

Chapter 32 introduced the cost-tuned Claude setup: Claude Managed Agents with cheaper learning (Haiku for reflection, a dreaming job you run yourself, because Anthropic's built-in Dreams offers no Haiku model; and most skill work on Haiku). Its Contribution II is $61.97. Against that, the economy setup's advantage is about $8 a month, not $26.

Where the difference comes from:

Source of the savingAgainst Sonnet dreamingAgainst cost-tuned Claude
Runtime and infrastructure$4.00$4.00
Models, doing the work$7.18$7.18
Models, learning$14.59−$3.08
Total$25.77$8.10

Read the last column carefully. Against a well-tuned Claude setup, the economy stack's learning costs more, by about $3, because the economy setup still runs its skill work on DeepSeek Pro, while cost-tuned Claude moved most of its skill work to Haiku. The saving that lasts is $7.18 from model choice in ordinary work, and $4.00 from infrastructure. That is the honest number, and it is the one to use in a memo.

The prices behind it

List prices checked on Sunday, 29 November 2026, as used in model.ts. Recheck before you teach or rely on them. Your lab uses its recorded month.

ItemPrice
Claude Haiku 5.5, prompts up to 100K tokens$0.10 input, $0.50 output, per million tokens
Claude Haiku 5.5, prompts over 100K tokens$0.50 input, $2.50 output, per million tokens
Claude Sonnet 5.5$2.00 input, $10.00 output, per million tokens
Qwen Flash, input up to 32K$0.03 input, $0.13 output, per million tokens
DeepSeek Flash, peak / off-peak$0.30 / $0.15 input, $1.20 / $0.60 output, per million tokens
Claude Managed Agents runtime$0.08 per session-hour
Durable Object, activeabout $0.00576 per hour; nothing while hibernating
Workflows, medium workerabout $0.02 a month
Review$12 an hour, 10% of assignments, 3 minutes each

The medium worker's calls use about 12,000 input tokens, so every call stays in Haiku's lower tier. A worker that sends long documents, or lets its context grow past 100K tokens, pays five times as much per token on Haiku. Lab 37 tests this as one of its sensitivity cases.

The invariant. Compare against the best version of the alternative, and say where every dollar of the difference comes from.

Check yourself. A colleague's slide says the open stack saves "$26 a worker a month". What two questions do you ask? (Against which Claude setup? The $26 compares with Sonnet dreaming; against a cost-tuned Claude setup it is about $8. And which of the saving lasts? About $11 comes from ordinary model choice and infrastructure; the learning part can go either way.)

  • Building Affordable, Self-Improving AI Workers (Panaversity, 29 November 2026), sections 16, 17 and 20, and cost model model.ts
Owner
Panaversity