StateJar docs

Cost per conversation

What a whole conversation costs with StateJar and without it, with the reply and StateJar's own extraction calls both counted, on a 17-turn, a 40-turn and a 100-turn chat. StateJar cuts the reply bill by up to 85.1%, and on the cheapest reply model the extraction costs more than that saves.

The short answer

Measured offline on synthetic conversations; the method and every caveat are below. No model was called.

Cost per conversation

Reply model gemini-3.5-flash-lite ($0.30 per million input tokens, $2.50 per million output), extraction on the same model, last 3 messages sent, every message extracted.

ChatTurnsWithout StateJarWith: replyWith: extractionWith: totalTotal savedReply bill saved
17-turn demo17$0.0042$0.0024$0.0222$0.0246-485.8%42.3%
40-turn mixed40$0.0195$0.0067$0.0495$0.0563-188.4%65.5%
100-turn chat100$0.1153$0.0172$0.1178$0.1349-17.0%85.1%

A negative figure means StateJar cost more. If the greeting and plain-question messages are never sent to a model (a gate that skips them), the 100-turn total is $0.1212, 5.1% more than without; the 40-turn total is $0.0473, 142.4% more. The offline run has no span detector, so this is the least the extraction can cost, not a promise.

Other reply models

The 100-turn chat, extraction unchanged.

Reply modelWithout StateJarWith StateJarTotal saved
gemini-3.5-flash-lite ($0.30 in)$0.1153$0.1349-17.0%
gemini-3.6-flash ($0.75 in)$0.2754$0.147746.4%
gpt-4o-mini via OpenRouter ($0.15 in)$0.0543$0.1230-126.4%

The dearer the reply model, the more the input StateJar removes is worth, while the extraction bill stays the same.

Tokens behind the money

ChatReply input withoutReply input withExtraction callsExtraction input tokens
17-turn demo7,9942,0753462,961
40-turn mixed49,0886,47671148,400
100-turn chat341,30913,998152365,275

Counted with tiktoken cl100k_base. The 100-turn chat is a new synthetic one: a person planning a cafe, with facts, revisions, recall questions, small talk and requests to write something.

Several sessions

Split the same 100 turns into three sessions and the numbers do not change: a new session starts with only the handle, and the same memory block is rebuilt from it. An app that kept the whole earlier transcript for each new session pays the "without" figure above. An app that drops the transcript at a new session would pay $0.0470 for the reply model on this chat, and then could not answer a question about anything said in an earlier session.

What this does not show

How it was measured

backend/benchmarks/bill_demo.py runs each conversation through the real pipeline (extract, update, hash, retrieve, build the memory block), counts the tokens a reply model would read with and without it, adds the extraction calls, and prices them. The results are backend/benchmarks/bill_results.json and bill_results.md, produced by one command: python benchmarks/bill_demo.py. A test holds every figure on this page to that file.

Your own account's numbers are on the dashboard (tokens sent, saved against sending the whole memory, and the extraction cost) and, for the chat in front of you, in the Playground's Tokens tab. See also save tokens for the pattern, and pricing and payments for who pays for extraction.

Questions

Who pays for the extraction calls? On the hosted service the cloud read is at StateJar's cost within your plan's monthly budget of cloud-read messages, and is not billed to you; with your own provider key it is on your bill. The tables above count it either way, so the totals do not depend on who pays.

Is the saving real if the total is negative? The reply bill really is smaller; the total is larger because reading each message into facts is also a model call. If your reply model is dear, or your chats are long, the total falls too. The break-even table in bill_results.md gives the reply price at which each chat breaks even.

Where are my own figures? Dashboard, "What StateJar saves you", and the Playground's Tokens tab. A figure that cannot be known is a dash, not zero.

This page as Markdown: /docs/cost.md