SurrealDB home

Token reduction calculator

Agents without shared context pay for it on every turn. See what it costs your workload.

An agent that has to rebuild its context calls more tools, re-sends every result on every later turn, and asks people questions they already answered. Pick a use case, set your volume and model, and compare it with agents that share one context layer in SurrealDB.

Calculator

How much does missing context cost? An estimate you can check line by line.

Each use case is a concrete plan of tool calls, with a payload size for each call. Every number is an assumption you can change under "How this is estimated".

Scenario
Volume
Model and price

Estimated saving per month

    The task

    Without shared context

    With SurrealDB

    How this is estimated

    Why does the gap grow so fast?

    A tool-calling agent re-sends the whole conversation on every turn. A payload fetched at step 1 is paid for again at every later step, so n sequential calls cost roughly n² in input tokens. Tools within one step are assumed to run in parallel, which is the assumption most favourable to the agent without shared context.

    With prompt caching, re-sent context costs the cache-read price instead of the full input price. The system prompt and tool schemas are treated as already cached, on both sides. The cache-write premium on new tokens is left out, which also favours the side without shared context.

    These are modelled estimates, not measurements. Service latencies are order-of-magnitude figures for systems of this kind. Customer reply time is not counted in wall clock. Prices are Anthropic list prices in USD as of , at prompt sizes under 100K tokens.

    The estimate covers answering the task. It leaves out the cost of filling the context layer: ingesting and extracting from your systems, the earlier session or first visit that wrote what is recalled later, and running SurrealDB itself. Writes made during a handoff are counted.

    The call plans

    Edit any payload size and the results update. A step's calls run in parallel.

    Per-turn assumptions

    Service latency, ms

    Where the tokens go

    Three costs that a shared context layer removes. All three grow with every agent you add.

    01

    Re-sent payloads

    Every tool result stays in the conversation and is sent again on each later turn. Seven lookups cost far more than seven times one lookup.

    02

    Tool schemas in every prompt

    Each system of record the agent can call adds its tool descriptions to the context. One query tool over one context layer replaces them.

    03

    Work done twice

    A new session, a handoff or a returning customer starts from zero. With shared context, the next agent recalls what the last one found, and the customer does not repeat themselves.

    Bring us your numbers. We will work through the estimate with you.

    Tell us which agents you run, which systems they call and how often. We will replace these assumptions with yours and plan a shared context layer in SurrealDB.

    Talk to us