RETAIN · COMPRESS · VERIFY
Context compression: compare space saved with evidence retained
Replay a deployment conversation and test whether a region fact survives.
Exact retained evidence
Inspect current arrival JSON
The export includes all computed arrivals and a separately labeled inspection position.
Find the first unsupported mention
The user selects Mumbai as the deployment region in T2, which has seven teaching tokens. The pinned system turn T1 has eight, and the agent repeats Mumbai in T3 using seven. Choose Context budget 24 and Evict oldest, then seek to thirty seconds. The fourth turn adds eight tokens, raising the attempted window to thirty. Evicting T2 leaves T1, T3 and T4 at twenty-three. Mumbai is still mentioned by the agent, but its user-backed evidence has disappeared. The status and retained-turn list distinguish these outcomes explicitly; seeing a familiar word alone does not establish its source.
Compare equal-size summaries with different evidence
Continue to sixty seconds with the 24-token budget: eviction retains T1, T7 and T8 for twenty-three tokens, so the final region answer is unsupported. Choose Summarize older turns with Preserve critical fact. The final window now contains T1, the six-token summary S with source T2, and T8: twenty-two tokens and a supported answer, deployment region: Mumbai. Select Drop critical fact and the window still uses twenty-two tokens, but the answer becomes unknown. At budget 36 eviction ends with thirty-six tokens; at 48 it ends with forty-four; neither retains user-backed region evidence. At 64 all eight turns fit in fifty-eight tokens, preserving the original user instruction. Record both the token total and the source IDs before calling compression successful.
Distinguish a mention from evidence
The green rows carry user-backed evidence, identified by source turn T2. An agent response can repeat the same fact while its original user turn has been evicted. The status deliberately reports fact mentioned separately from user-backed evidence. This fixture requires either T2 itself or a summary that explicitly retains its provenance before answering. This is a conservative teaching policy, not an ADK rule or a claim that repeated text is unreadable to a model. Turn annotations are explicit fixture data; there is no semantic fact extractor, inference call or automatic truth detector.
Read the exact overflow operations
Context budget selects 24, 36, 48 or 64 teaching tokens. The system instruction T1 stays pinned and counts against that budget. Evict oldest removes the earliest retained non-system turn until the total fits. Summarize older turns replaces such turns with one six-token summary, recording every affected turn ID. Preserve critical fact copies user-backed evidence into that summary. Drop critical fact deliberately omits it. Agent-only restatements cannot create provenance. Fidelity has no effect on eviction. The summary remains pinned after creation while additional original turns are folded into it; this policy is a small local algorithm, not the ADK event-window implementation.
Control the replay and retain an observation
Play messages reveals eight arrivals over sixty seconds, one every 7.5 seconds; no message has arrived at zero. Pause messages freezes the inspection and Resume continues. Restart rewinds without changing the policy. Timeline pauses and seeks, and Speed changes only playback pace, including during a running replay. Changing budget, policy or fidelity recomputes the fixture and returns to zero. At sixty seconds Replay starts again. Buttons work with Space and the timeline with arrow keys. Capture baseline stores the visible token and provenance status for comparison; Replace baseline updates it and Clear baseline removes it. Notes persist in this browser and can be exported separately. Expand experiment enlarges the workspace.
Inspect the evidence without inventing measurements
The retained-message list and expandable exact-state JSON describe the current arrival only. Export fixture JSON includes every computed arrival and separately labels the inspection position; it is intentionally not a partial trace export. Teaching tokens are fixed weights, not tokenizer output or a billable count. Six-token summary cost is a model assumption even when its displayed sentence is longer. No latency saving, answer-quality score, external storage, durable preference, privacy control, deletion guarantee or model service is measured. ADK compaction summarizes older event history using configurable windows and a summarizer; this lesson isolates budgeting and provenance instead of claiming to implement that API.