NewThe waste audit is open

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
Operant console overview, drilling into a conversation savings ledger

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 ->
call #1 · $0.31 → $0.31
$0.31
call #2 · $0.58 → $0.19
$0.19
call #3 · $0.74 → $0.22
$0.22
call #4 · $0.78 → $0.15
$0.15
Σ · $2.41 → $0.87
$0.87

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

system prompt + 14 tool schemas 6,200 tok
turns 1–3 · user, assistant 3,100 tok
tool_result · read_file ×3 11,400 tok
turns 4–6 · user, assistant 4,300 tok
tool_result · grep, run_tests 19,200 tok
turn 7 · the new user message 140 tok
input44,340 tok · full price

What Operant sends

system prompt + 14 tool schemas cache read
cache_control · breakpoint 1
turns 1–3 · user, assistant cache read
tool_result · read_file ×3 cache read
turns 4–6 · user, assistant cache read
tool_result · grep, run_tests cache read
cache_control · breakpoint 2
turn 7 · the new user message 140 tok · full price
billed as44,200 × 0.1 + 140 ≈ 4,560 tok
the rewrite · one annotation per breakpoint, nothing else changes
{ "role": "user", "content": [ { "type": "tool_result", "tool_use_id": "toolu_01Rj…","content": "…", "cache_control": { "type": "ephemeral" } } ] }
Cache health

Cache-read share of input tokens per day, last 30 days · $612.40 still re-sent uncached over the window (measured)

12%2026-07-30 → 2026-08-28 · cache shaping switched on 2026-08-0686%

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
RULES — EVALUATED TOP-DOWN, FIRST MATCH WINS
↑↓ManualPlan-status checks → Haiku, without the old tool dumpsTurn offEdit
WHENmetadata.task == "evaluate"claude-haiku-4-5 · 100%failover → claude-sonnet-5masks tool results > 2 turns old

What the agent sends · turn 9

system + tools 5,800 tok
turn 2 · tool_result · read_file plan.md 7,900 tok
turn 4 · tool_result · list_dir, read ×4 12,600 tok
turn 6 · tool_result · run_tests (log) 9,300 tok
turn 8 · tool_result · git diff 3,100 tok
assistant / user text, turns 1–8 2,900 tok
turn 9 · “is the plan on track?” 60 tok
input41,660 tok

What Operant sends to the model

system + tools 5,800 tok
[tool result masked · 7,900 tok · turn 2 · read_file plan.md — call the tool again if needed] 38 tok
[tool result masked · 12,600 tok · turn 4 · list_dir, read ×4] 34 tok
[tool result masked · 9,300 tok · turn 6 · run_tests] 31 tok
turn 8 · tool_result · git diff 3,100 tok
assistant / user text, turns 1–8 2,900 tok
turn 9 · “is the plan on track?” 60 tok
input11,963 tok · −71%

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
← Routersrouter/standardLivePauseCopy endpoint snippet
RULES — EVALUATED TOP-DOWN, FIRST MATCH WINS
↑↓LearnedPattern: Compliance evidence packGate 100%Active$812/mo + $96/mo tokens (est.)
matches by cortex classifier · → claude-haiku-4-5 + skill compliance-evidence-pack v2 · failover → claude-sonnet-5 · masks tool results > 2 turns old (would drop 32M tok/mo, est.)
Demote to shadowRe-run gate

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.

↑↓LearnedPattern: Weekly incident digestGate 92%Shadow$318/mo (est.)
matches by cortex classifier · → claude-haiku-4-5 + skill incident-digest v1 · failover → claude-sonnet-5
Re-run gateRatify to activeEdit target
DEFAULT ROUTEsticky: user_id → key
claude-sonnet-5 · 100%failover → claude-opus-5

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 would you route first?

A handful of patterns account for most of an agent bill. These are the ones Operant learns first.

ChatRouterTraceLedger

Support

For teams whose product answers customers.

Refund and duplicate-charge handling

Locate the charge, refund, explain the cause, prevent recurrence.

Account unlock

Operant issues the reset. It tells the user when the lock lifts.

Billing-error resolution

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. ”
Insight
Operant cortex · demo estate
“ 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%. ”
Insight
Operant cortex · demo estate
“ Without Operant this conversation would have cost $0.55; it cost $0.14 — −$0.41 (75%) saved. ”
Savings ledger
one conversation · illustrative
“ Your spend has a fat head. The top 4 patterns account for 63% of spend — routing them to a cheaper model could save 44%. ”
Patterns banner
Operant console · demo estate
“ Gate 100% — 12 of 12 exemplars at parity · judge claude-opus-5 · you can demote at any time. ”
Eval gate
rule: compliance evidence pack
“ 41,900 of 46,300 input tokens read from cache instead of re-sent. ”
OP
Call annotation
cache lever · illustrative
FAQ

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.

Every dollar of agent spend, priced —
and the waste removed.