Engineering story · AgentOS

What the work cost, to the penny

One real engineering program, attributed to the penny, and a cache discipline that returned four-fifths of the bill

5 min readAgentOSCost attribution for AI workPostgreSQL
One delivery arc · every model call priced
Uncached equivalent$10,603
Actual spendwith the cache doing its job
tied to the task that made each call, rolled up by phase and model
$1,990.52actual spend, to the penny
  • 11,193priced model calls, each tied to its task
  • 3.197 Btokens attributed across the arc
  • 94.5%overall cache hit rate
  • 36,515governed state transitions along the way

Most platforms report a vendor invoice. I wanted to know what the work cost: every model call priced, tied to the task that made it, rolled up by phase and by model, with the cache's contribution counted. I have that answer for one real delivery arc under my governance platform, down to about five and a half cents per governed step.

Why cost is a field

In AgentOS every model call is metered against the work order and task that made it, so cost attaches to the work rather than to a month. Budgets are part of the contract: a work order carries a spend ceiling, and exhausting it stops the work. Cheap is the default and expensive is a choice, because a role contract names its model and reasoning effort as data, and the orchestration, architecture and planning seats use a heavier model than the development seats on purpose.

By phase and model

Cost by phase, approximate · model family · tokens · cache hit
Quality assurancereviewer · 201M · 92% cache$227Developmentbuilder · 450M · 97% cache$210Orchestrationlead · 208M · 97% cache$143Reviewreviewer · 38M · 89% cache$55Architecturelead · 53M · 96% cache$46Gatekeepingreviewer · 22M · 91% cache$36Planninglead · 26M · 97% cache$22

Cache discipline is the difference between a program that is affordable to run for weeks and one that is not. The cache is not an accident: jobs are rendered from the work graph with stable prefixes, grounding bundles are reused, and stored observations were recalled across the program instead of being rediscovered.

Cheaper and smarter the longer it runs

The memory service is the other half of the economics.

Tokens per code question · 536 searches
Manual file exploration29,100Asking the code graph≈5,100

A model that remembers beats a model that recalls, and it costs less too.

What the graph holds

Every cost entry is a node in the program's work graph, so the question "what did this cost and why" is a query, not an audit.

Code-graph edges674,025Indexed code chunks77,527Governed objects26,866Typed relationships26,431Evidence references3,632Status paths103
to scale
Behind the cache: 289,304 stored observations recalled 452,834 times instead of being rediscovered.

What this demonstrates

Economics as an engineering discipline: attribution designed into the control plane, budgets enforced as contracts, and a memory layer that makes the second week cheaper than the first.