One endpoint, every model, and a bill that keeps getting smaller.
Point your agents at Operant. You use one base URL and change no code. Operant prices every turn. Then it adapts on its own. It reads repeats from cache, masks what is stale, and moves learned work to cheaper models.
Create a workspace
The bill, before and after.
Every saving sits on a per-call counterfactual ledger. Operant runs it in shadow, checks it at an eval gate, and a person ratifies it before it serves live traffic.
How the ledger works ->Illustrative ledger. The counterfactuals are stated estimates. For each, Operant prices the same tokens at the model the agent asked for, restores masked tokens, and unwinds the gateway-shaped cache.
Three adaptations Operant makes on its own.
Repeats are read from cache
Agents re-send the whole conversation every turn. Operant sets the cache_control breakpoints that the caller did not. The prefix that grew last turn becomes a cache read this turn. Operant bills it at about 0.1×.
- Additive only, with no reordering or content change
- Operant does not change callers that already set their own breakpoints
- The ledger records exactly the tokens that are read from cache
What the agent sends · turn 7
What Operant sends
{ "role": "user", "content": [ { "type": "tool_result", "tool_use_id": "toolu_01Rj…","content": "…", "cache_control": { "type": "ephemeral" } } ] }
Cache-read share of input tokens per day, last 30 days · $612.40 still re-sent uncached over the window (measured)
Illustrative turn and figures. Cache-read pricing and breakpoint limits are the provider's; Operant only decides where the breakpoints go.
Stale tool output is masked
On a late turn, most of the input is old tool results. The model already acted on them. A rule can mask results older than n turns with a short, deterministic placeholder. The trace keeps the original bytes.
- Cache-cooperating, so the compressed form also caches
- Governed like a route: shadow → eval gate → ratify → demote
- Audited both ways: what the app said, and what Operant sent to the provider
What the agent sends · turn 9
What Operant sends to the model
Illustrative turn. Placeholders name the turn and the tool, so the model can re-fetch; the trace keeps the original bytes.
Recurring work moves down the ladder
Operant clusters conversations by goal, writes the skill a smaller model needs, and proposes a rule: this pattern → cheaper model + skill. It takes traffic only when the gate passes and you ratify.
- Learned rules sit beside yours in the same router
- One click back. The frontier model is always the failover
- Savings are counterfactual, and Operant states them plainly
Condition managed by the cortex; the skill is edited on its page. The target model, reordering and demoting stay here — an active rule must be demoted to shadow before its target can change.
The gate replays held-out exemplars through the candidate and asks a judge model for parity against the frontier's answers. 100% here means every exemplar passed.
What the agent sends · turn 7
What Operant sends
{ "role": "user", "content": [ { "type": "tool_result", "tool_use_id": "toolu_01Rj…","content": "…", "cache_control": { "type": "ephemeral" } } ] }
Cache-read share of input tokens per day, last 30 days · $612.40 still re-sent uncached over the window (measured)
Illustrative turn and figures. Cache-read pricing and breakpoint limits are the provider's; Operant only decides where the breakpoints go.
What would you route first?
A handful of patterns account for most of an agent bill. These are the ones Operant learns first.
Support
For teams whose product answers customers.
Locate the charge, refund, explain the cause, prevent recurrence.
Operant issues the reset. It tells the user when the lock lifts.
Find the error, fix it, write back what happened.
What the ledger says.
“ Across 296 coding sessions, an Explore-style sub-agent thread recurs in 71% of them — the sessions’ goals never repeat; the sub-agent’s does. ”

“ Sessions longer than 20 calls re-send 41,200 stale tool tokens per turn on average; masking on the main thread would drop it by 62%. ”

“ Without Operant this conversation would have cost $0.55; it cost $0.14 — −$0.41 (75%) saved. ”

“ Your spend has a fat head. The top 4 patterns account for 63% of spend — routing them to a cheaper model could save 44%. ”

“ Gate 100% — 12 of 12 exemplars at parity · judge claude-opus-5 · you can demote at any time. ”

“ 41,900 of 46,300 input tokens read from cache instead of re-sent. ”
A few things people ask first.
No. Operant speaks the Anthropic and OpenAI wires. You change one base URL. You keep your prompts, tools, and SDKs. Address a router as the model, and the gateway chooses for each turn.
Yours. Store a provider key, encrypted at rest. Mint an Operant key for each agent. The gateway strips the Operant key, injects yours at forward time, and stamps every call with the key that sent it.
You decide. Observe-only is the default and changes nothing on the wire. Capture is tiered. The trace shows both what the app said and what Operant sent to the provider. You can revoke in a minute. Point the base URL back.
Nothing changes without proof. Every lever runs in shadow. It passes an eval gate on held-out traffic. It takes live traffic only when you ratify. One click demotes it. The frontier model is always the failover.