One engineer working a heavy week on agentic coding can put roughly $1,000 of Claude/API spend across the wire. Nexus sits between your coding agents and the model providers — compressing context before the meter starts, protecting the prompt cache, routing each request to the cheapest model that can actually handle it, serving repeat work locally for free, and giving every session the memory it needs so nobody pays to re-explain the project on Monday morning.
of the total bill removed by compression, cache protection and routing together
Benchmark
kept per engineer per working year, all four levers plus Nexus
Modelled · $1k/week
classification overhead before a request is routed
Measured
cost of any workflow Nexus has already learned
By construction
Every turn resends the whole history. A forty-turn session pays for turn one forty times. Meanwhile the same model handles "what does this flag do" and "refactor this service" at the same price — and your assistant starts each morning knowing nothing about the project it worked on yesterday.
On a typical long-running agent session, input tokens dominate the bill — and most of them are text the provider has already seen.
Share of baseline spend, benchmark traffic mix. Output is the part you genuinely cannot avoid.
The first ten minutes of every session are spent rediscovering things the team already knows: which service owns this, why that workaround exists, what was decided last week and by whom. Your agent greps, reads, summarizes, and bills you for all of it — then forgets the moment the window closes.
That's the half Nexus fixes. Not a cheaper way to re-derive context — no re-derivation at all.
Left: what the developer sees — an ordinary agent session, nothing installed but a provider entry. Right: what Nexus did to that request on its way out, and what it cost. Pick a request to replay it.
Your client points at a local port instead of the provider. Everything downstream is unchanged — same wire format, same streaming, same tool calls. Requests that can be answered locally never leave the machine; the rest leave smaller and cheaper.
Nothing about your client changes. One environment variable, or one provider block. Keys stay in your own environment, requests stay on your own machine until they're forwarded, and if the proxy is down the client falls back to talking to the provider directly.
Compression, cache protection and routing each make a request cheaper — but no amount of any of them reaches zero. The learning loop is different: every workflow it absorbs is permanently free, so savings grow with use instead of plateauing.
Prior turns are rewritten by deterministic regex before the request leaves the machine — collapsed whitespace, trimmed tool output, redundant phrasing removed. The current turn is never touched, and identical input always produces identical output, so retries and caches stay coherent.
15–40% of prior-turn input tokens · ~1 ms in-process · sha256-keyed, bounded cache
A prompt cache hit costs a tenth of a fresh token — but only while the prefix is byte-identical. Aggressive compression is the fastest way to destroy that discount and end up worse off. Nexus tracks every live cache span and refuses to touch any block inside one.
Safe mode default · locks all messages up to the last cache checkpoint
Each request is classified in under a millisecond into one of four difficulty buckets, then handed to the lowest-cost endpoint across every configured provider that still satisfies the bucket's feature and context requirements. Nothing is hardcoded: add a cheaper provider, or wait for one to cut prices, and the router moves on its own.
Capability gates outrank cost · circuit breaker trips at 5% fallback rate and rolls back automatically
Software work is a closed set of moves — read a file, run the tests, stage and commit, push to a host, restart the service, parse a response. New arrangements of those moves appear constantly; new moves almost never do. Nexus watches idle sessions, classifies their commands into an action taxonomy, and when an arrangement recurs five or more times it generates a parameterized local handler plus an independent set of golden tests. Once the handler passes, matching requests are served locally and the model never sees them.
Read-only workflows auto-enable · anything that writes, transfers or commits waits for explicit approval · handlers run out-of-process with a hard timeout and re-validate nightly
Every failure falls through to the model transparently.
Nexus combines a local optimization proxy with a self-hosted context server. It compresses, cache-protects and routes each call, then removes the calls that only exist because the assistant forgot. Memory, tasks, a knowledge graph and semantic search are shared across every client, so a session opens already knowing where it is.
That single comparison is worth 13,020 tokens — and an engineer running agents full time opens a cold context five or six times a day. But the rediscovery tax is the small half of the argument. The big half is what happens to every subsequent turn.
A conversation's cost per turn doesn't stay flat — it climbs, because turn 40 pays to resend turns 1 through 39. Cost across a session is therefore quadratic in its length, not linear. Prompt caching blunts the slope, it does not change the shape.
Without durable memory, engineers are pushed the wrong way down that curve. Ending a session means losing state, so they nurse one enormous context all day, stuff ever-larger instruction files into the system prompt, and paste the same design docs back in after every compaction.
Nexus makes short sessions safe. State lives outside the window, so an engineer can close a 60-turn context and open a fresh one that bootstraps in 1,180 tokens — and stay near the cheap end of the curve all week.
retrieval on demand replaces a permanently large prefix
small stable prefixes also cache more reliably
| At turn | One long session | Bootstrapped |
|---|---|---|
| 20 | 429,000 | 183,000 |
| 40 | 1,218,000 | 366,000 |
| 60 | 2,367,000 | 549,000 |
Modelled. 12,000-token cold prefix vs. 4,200-token bootstrapped prefix, 900 tokens added per turn, sessions reset every 10 turns. Assumptions stated in full on the evidence page.
| Mechanism | What it removes | Per engineer / week |
|---|---|---|
| No rediscovery | Cold-start greps, file reads and summarizing at the top of every session | ~9.5 M tok |
| Shorter prefixes | Retrieval on demand instead of a permanently large system prompt and pasted docs | ~14.8 M tok |
| No re-litigating | Turns spent re-explaining a decision — and these land deep in the session, where turns cost the most | ~8.3 M tok |
| Survives compaction | The re-summarize-and-recover cycle after a context window fills | ~6.8 M tok |
| Total | Roughly a ninth of a full-time engineer's heavy weekly token volume, removed before the proxy even sees it | ~39.3 M tok |
Nexus compounds its own savings instead of double-counting them. Shared memory shrinks the volume of tokens entering the pipeline; the local optimizer then compresses, cache-protects and reroutes whatever is left. The calculator applies those stages in sequence instead of picking the larger number.
Every agent client your team uses, plus the browser, plus a phone — all reading and writing the same store. Start a task on your laptop, finish it from your phone, and the next session knows both happened.
MCP over stdio · Streamable HTTP with OAuth 2.0 + PKCE · REST
Memories live in named namespaces, so every search, list and write is scoped. Retrieval runs query expansion, weighted fusion across keyword and vector lists, then a cross-encoder re-rank — the difference between "there's a memory about this somewhere" and getting the right one first, which is the difference between a 1,180-token bootstrap and a 9,000-token one.
900-token markdown-aware chunks · never split inside a code fence
The blended rate defaults to the low end of the benchmark band. Drag it anywhere you find credible; the arithmetic is the same either way.
| Line | Monthly | Annual |
|---|---|---|
| Current API spend | — | — |
| Removed by Nexus — shorter, bootstrapped contexts | — | — |
| Removed by compression, cache & routing | — | — |
| Removed by learned workflows | — | — |
| Net spend after | — | — |
Assumptions: savings apply to metered API spend only, not seat-based subscriptions. The four levers are applied in sequence — Nexus memory shrinks the token volume first, Nexus optimization works on what is left, and learned workflows intercept a share of what remains — so no saving is ever counted twice. Engineer time recovered by Nexus is deliberately excluded; it is real, it is larger than the token saving, and it is not in this number. Where each figure comes from →
A cost-reduction pitch is only worth as much as its worst-supported claim, so here is the provenance of each one up front rather than in a footnote.
| Claim | Basis | Status |
|---|---|---|
| 54–60% combined reduction | 200-request synthetic suite, 70/20/10 traffic mix, published list rates | Benchmark |
| 15–40% compression on prior turns | Regex compressor across recorded session bodies; the low end is what cache-safe mode allows on cache-heavy traffic | Benchmark |
| Routing across four providers, live | Reference deployment session logs span four distinct upstream providers | Observed |
| Local interception works end to end | 135 interception results across 70,929 request events in the reference logs | Observed |
| < 1 ms classification | In-process timing of the classifier stage | Observed |
| Nexus context reduction | Arithmetic of resending history: a 60-turn session vs. six bootstrapped 10-turn sessions, assumptions published | Modelled |
| Your annual saving | Your inputs, above, times the rate you chose | Modelled |
Cache-safe mode is deliberately conservative: on traffic that is already heavily cached, compression gives up most of its ground rather than risk a broken prefix, because a lost cache hit costs about ten times what the compression saved. That trade is the right one, and it is why the honest compression range starts at 15% and not at 40%.
Two weeks, observe-only. The proxy logs what every request would have cost direct versus what it actually cost — per session, per model, per engineer. You decide on your measured numbers, not on this page.
One environment variable, or one provider block. Nothing else about the workflow changes.
Routing off. You get a measured traffic mix and compression ratio for your own codebase, with zero behavioural change.
Week two runs with routing enabled, so you compare the two weeks against each other rather than against our benchmark.
Off your own dashboard. If the measured saving doesn't justify the engagement, it doesn't.
Book a consultation and we'll scope a two-week observe-only pilot on one of your teams.
Book a Consultation