AGENT MEMORY · RETRIEVAL WORKBENCH
Short-term context: current session only
Follow real ranking calculations from stored memory cards through scope filters into a bounded context tray.
Scroll the memory cards horizontally to inspect all ten records. The table below provides their full text and exclusion reasons.
Your experiment
Only current-session records are allowed and the question is the deployment region. The tray fills with two working records that share the word deployment but never name a region. Allow previous sessions, then shrink the age limit until the region fact is excluded again.
Make a prediction, capture a baseline, change one policy and advance through all four stages. An empty context is a valid result; the table explains every exclusion.
Selected context
The tray is populated at the final stage. No answer is generated: compare the selected source facts yourself.
Inspect every record
| ID | Memory text | Cosine | Blended score | Outcome |
|---|
Offline teaching model, not an ADK service implementation or a trained semantic encoder. The ten records and supporting-fact labels are synthetic fixtures. Retrieval uses lexical TF-IDF cosine; semantic refers to the type of stored fact, not neural similarity. Score = (1 − recency weight) × cosine + recency weight × 2^(−age/24h). Zero lexical matches are excluded. Greedy packing skips records that do not fit. Budgets count whitespace-separated words, not model tokens. Memory types, tenant rules, age limits and latest-key replacement are explicit application policies; no LLM accuracy, production capacity or privacy guarantee is measured. ADK memory concepts · Cosine similarity reference.
Short-term means this session
Short-term context is what the agent can use from the current session: the working ticket M5 (“Current ticket INC-42 concerns a database timeout during deployment”), the status note M10 (“The current deployment status is pending review”) and a meeting note M8. Everything else in the fixture was written in previous sessions: facts such as the production region M2, the retry budget M1, a past incident and two procedures. Include previous sessions is the switch between a session-only context and one that may also recall durable memory.
The opening run: a full tray with no answer
The page opens with Include previous sessions off and the question “What is the deployment region?”. Six Team A records are excluded as past-session records, Team B’s M9 is behind the tenant boundary. The two current working records M10 (cosine 0.168) and M5 (0.129) share the word deployment, so both are packed: 16 of 40 words used, yet neither states a region and supporting coverage is 0 of 1. A tray that is full is not a tray that answers; the region was stored in an earlier session.
Failure boundary: when the earlier session is allowed
Turn on Include previous sessions: M2, “Deployment region is Mumbai for the production service”, ranks first at cosine 0.514, and the tray becomes M2, M10, M5 (24 words, coverage 1 of 1). M2 is 20 hours old, so Maximum age is a second boundary: at 20 hours it is included, at 19 it is excluded and the procedural record M7 takes the third place, leaving M10, M5 and M7 and no region again. Team B’s London fact M9 never enters for Team A; with previous sessions still allowed, switching Active tenant to Team B returns only M9.
The other controls in a session-only context
With previous sessions off, choose Memory store Working context: M10 and M5 are both working records, so the tray is unchanged; choose Semantic facts and the tray is empty because the only semantic region fact lives in a previous session. Maximum retrieved records 1 keeps only M10; a Context word budget of 7 keeps only M10 (7 words). Maximum age 0 excludes even the 0.05-hour-old status note. Keep latest fact per key matters only when older versions are reachable: allow previous sessions and ask about the retry budget, and turning it off lets the superseded five-attempt fact M6 back into the tray beside M1.
Reading the run and its limits
Play reveals the stored cards, the scope filters, cosine ranking and context packing ten seconds apart over thirty inspection seconds; Next stage, Restart inspection and Speed control the replay, and an input change recomputes and restarts it. Recency weight blends cosine with 2^(−age/24h); in a session-only context every eligible record is minutes old, so it changes scores but rarely the order. This is a lexical TF-IDF teaching model over ten fixed sentences, not a token-level context window, a summariser or an ADK session service, and no model reads the tray. Real short-term context also carries the conversation turns themselves.