Google-Blog zum Kontext-Kosten-Problem: Host-seitige Lösung spart massiv Tokens
Laut Google Developers Blog steigen in Produktiv-Agenten Kosten und Time-to-first-Token mit wachsendem Kontext, und veralteter Kontext schadet dem Modell. Ein gröÃeres Fenster löse das Problem nicht. Mit Gemini 3.8 Flash und einer gemessenen Host-seitigen MaÃnahme sank der Token-Verbrauch pro Schritt um den Faktor 169.

Im Dezember 2025 beschrieb der Google Developers Blog, was in Produktivumgebungen mit Agentensystemen geschieht: Kosten und Zeit bis zum ersten Token steigen, wenn der Kontext wächst, veralteter Kontext beeinträchtigt das Modell, und ein größeres Fenster beseitigt das Problem nicht (Hangfei Lin, "Architecting efficient context-aware multi-agent framework for production"). Ein Entwickler in den Google-Entwicklerforen beschreibt, wie eine Sitzung in fünf Runden von etwa 2K auf über 80K Tokens anwächst, wobei Latenz, Drift und Kosten mitziehen (ADK-Thread, September 2026). Die Gemini-Dokumentation zum Caching erläutert die Kostenersparnis, die das implizite Caching weitergibt; sie liefert keine Latenzangabe (Context caching).
All das betrifft eine Konversation, die ihre eigene Historie mit sich trägt. Wir haben es anders gemessen: Man trägt sie nicht mit.
AXI, von Rajnish Choubey, ist eine Schicht auf der Host-Seite, zwischen einem Modell und dem Zustand, den es bearbeitet. Das Modell bleibt unverändert. Bei jedem Schritt schlägt es genau eine Änderung vor; der Host prüft den Vorschlag gegen die Regeln, vervollständigt, was die Regeln vervollständigen können, übernimmt alles oder nichts, und zeigt dem Modell den exakten Zustand erneut in einem kurzen Prompt, der aus dem neu aufgebaut wird, was der Host hält. Nichts bleibt im Chat.
Ein langer, umfangreicher Auftrag auf Gemini 3.8 Flash: ein Service-Graph, Anfrage für Anfrage bearbeitet, 1.500 Anfragen, jede mit etwa 40 Zeilen Routine-Operationslog. Einmal mit dem vollständigen aufbewahrten Chat, der in jeder Runde erneut gesendet wurde (bis er das Fenster des Modells erreichte: 457 Runden, 949.591 Tokens), einmal mit AXI.
Bei einem zweiten Auftrag, einer 400 Runden langen Konversation in schlichten, mehrdeutigen Sätzen, sendete dasselbe Modell 39,9 Millionen Tokens mit aufbewahrtem Chat und 0,53 Millionen mit AXI (76-mal weniger). Sobald der Prompt 150.000 Tokens überschritt, dauerte das erste Token beim aufbewahrten Chat im Median 5,57 s, wobei 97,0 Prozent seines Prompts aus dem Cache kamen; bei AXI blieb es bei 2,41 s.
Und eine andere Frage, auf demselben Modell: 4.000 aufeinanderfolgende Schritte eines dichten Auftrags mit strengen Regeln. Der Zustand, den der Host hielt, entsprach in 4.000 von 4.000 Schritten exakt dem beabsichtigten Zustand. Die Antworten des Modells selbst waren in 3.954 Fällen exakt richtig; in den übrigen 46 hatte es beim Löschen eines Service und einer Kante die Abhängigkeiten eines Service ausgelassen, und die feste Reparurregel vervollständigte sie. Wörtlich angewandt hätte jede dieser Antworten Kanten hinterlassen, die auf einen gelöschten Service zeigten. Bei den ersten 400 Anfragen hinterließen die wörtlich angewandten Antworten den richtigen Zustand in 85 Schritten, und ein Schritt mit richtigem Zustand kostete das 4,5-Fache.
git clone https://github.com/gaurshalendra2412/axi-runtime cd axi-runtime/python python3 quickstart_replay.py Enter fullscreen mode Exit fullscreen mode Es spielt die gespeicherten echten Antworten des 4.000-Schritte-Laufs durch den eigenen Code des Repositorys ab und berechnet den gehaltenen Zustand bei jedem Schritt neu; es bricht mit einem Fehler ab, wenn ein wiedergegebener Schritt vom gespeicherten abweicht. Wer lieber einen Browser nutzt: Es gibt ein Colab-Notebook mit einem Klick. Mit eigenem Gemini-Schlüssel (ein kostenloser genügt) führt python3 live_check.py dieselbe Prüfvorrichtung live für 15 Schritte aus.
Das sind ein Auftrag und je ein Lauf pro Arm auf einem Modell, und jede Aussage bezieht sich auf den Zustand, den der Host hält, nicht auf das Modell im Allgemeinen oder auf irgendjemandes Server. Eine Antwort, die lesbar ist, im Rahmen der Anfrage bleibt und falsch ist, wird angewandt; das Tor und die Reparatur behalten, was wahr ist, und schneiden ab, was falsch ist. Das ist nicht mit Google affiliiert.
Andere Gruppen bauen Commit-Grenzen um Agentenzustände mit eigenen Einstellungen und Evaluationen: Cordon und MemTX. Die Related-Work-Seite des Repositorys sagt, dass die Idee einer Commit-Grenze nicht von uns beansprucht wird.
Die Tests wurden von Shalendra Gaur erstellt und ausgeführt, mit einem KI-Coding-Assistenten als Werkzeug (im README offengelegt).
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
In December 2025 the Google Developers Blog described what happens in production agent systems: cost and time to first token climb as the context grows, stale context hurts the model, and a bigger window does not remove the problem ( Hangfei Lin, "Architecting efficient context-aware multi-agent framework for production" ). A developer on the Google developer forums describes a session growing from about 2K to over 80K tokens in five turns, with latency, drift and cost following ( ADK thread, September 2026 ). The Gemini caching documentation explains the cost saving that implicit caching passes on; it gives no latency figure ( Context caching ).
All of these are about a conversation that carries its own history. We measured the other way: do not carry it.
AXI, by Rajnish Choubey, is a layer on the host side, between a model and the state it edits. The model is unchanged. At every step it proposes one change; the host checks the proposal against the rules, completes what the rules can complete, commits it all or not at all, and shows the model the exact state again in a short prompt rebuilt from what the host holds. Nothing is kept in the chat.
One long, heavy job on Gemini 3.8 Flash: a service graph edited request by request, 1,500 requests, each with about 40 lines of routine operations log. Once with the whole chat kept and sent again at every turn (until it reached the model's window: 457 turns, 949,591 tokens), once with AXI.
On a second job, a 400-turn conversation in plain, ambiguous sentences, the same model sent 39.9 million tokens with the chat kept and 0.53 million with AXI (76 times fewer). Once the prompt passed 150,000 tokens the kept chat's first token took a median 5.57 s with 97.0 percent of its prompt served from the cache; AXI's stayed at 2.41 s.
And a different question, on the same model: 4,000 consecutive steps of a dense job with strict rules. The state the host held was exactly the intended state on 4,000 of 4,000 steps. The model's own replies were exactly right on 3,954; on the other 46 it had left out a service's dependants when asked to delete the service and an edge, and the fixed repair rule completed them. Applied as written, those replies would each have left edges pointing at a deleted service. On the first 400 requests the replies applied as written left the right state on 85 steps, and a step with the right state cost 4.5 times as much.
git clone https://github.com/gaurshalendra2412/axi-runtime cd axi-runtime/python python3 quickstart_replay.py Enter fullscreen mode Exit fullscreen mode It replays the saved real replies of the 4,000-step run through the repository's own code and recomputes the held state at every step; it stops with an error if one replayed step differs from the saved one. Prefer a browser: there is a one-click Colab notebook. With your own Gemini key (a free one is enough) python3 live_check.py runs the same harness live for 15 steps.
These are one job and one run of each arm on one model, and every claim is about the state the host holds, not about the model in general or anyone's servers. A reply that is readable, inside the request's scope and wrong is applied; the gate and the repair keep what is true and cut what is false. This is not affiliated with Google.
Other groups build commit boundaries around agent state with their own settings and evaluations: Cordon and MemTX. The repository's related-work page says the idea of a commit boundary is not ours to claim.
Tests built and run by Shalendra Gaur, with an AI coding assistant as a tool (disclosed in the README).