Source: arXiv — 2026-07-15
Summary
MemCon reframes LLM agent memory as a controlled process: instead of fixed, hand-designed rules deciding when to retrieve, inject, or forget information, it models memory operations as actions in a Markov Decision Process and learns an online policy for picking the right one. The action space is six operations — Retrieve, PlanInject, Re-Retrieve, Consolidate, Forget, and NoOp — each with its own parameters (how many results to pull, how deep to traverse a knowledge graph, etc.), chosen via a lightweight tabular contextual bandit using UCB exploration that learns from nothing but task-by-task success/fail feedback, with no pretraining and no extra LLM calls. It's backend-agnostic, wrapping around any existing memory implementation, and across 6 benchmarks, 3 agent frameworks, and 3 LLM backbones it beats memory baselines by up to 15.2 points in task success while cutting token consumption 5-20%.
Key Takeaways
- The core insight: how much to retrieve, when to inject a plan, and when to forget shouldn't be static rules — they're context-dependent decisions that should change based on what state the task is currently in.
- The action space is explicit and small: Retrieve, PlanInject (inject a distilled plan into context), Re-Retrieve, Consolidate, Forget, and NoOp — each parameterized (e.g., top-k results, graph-hop depth) rather than a single fixed retrieval call every time.
- State tracking covers both task progress (what phase of the task the agent is in, whether it seems "stuck," what locations/steps it's already visited) and memory status (how full memory is, whether a plan is currently available, what learning phase the policy itself is in) — the decision depends on both.
- The learning method is deliberately lightweight: a tabular contextual bandit with UCB (upper-confidence-bound) exploration, learning online during actual deployment from nothing but binary task success/failure — no pretraining phase, no extra LLM calls to compute rewards, and it converges within tens of tasks.
- Being backend-agnostic matters practically: MemCon wraps around whatever memory system a team already has rather than requiring a rip-and-replace, which is why it could be tested across 3 different agent frameworks and 3 different LLM backbones and still show consistent gains.
- Measured results: up to 15.2 points of task-success improvement over memory baselines, plus a 5-20% reduction in token consumption — meaning it isn't just more accurate, it's also cheaper to run, because it stops retrieving/injecting when the state doesn't call for it.
Reel Script
Hook (~18s, ~40 words): Most agent memory systems retrieve the same way every single time — same top-k, same context injection — regardless of whether the agent actually needs it. A new framework instead learns, task by task, exactly when to remember and when to shut up.
Core Concept (~75s, ~165 words): Think about how most "agent memory" works today: you write a rule like "always retrieve the top 5 similar past examples before every step." That's a fixed heuristic — it doesn't know if the agent is stuck, cruising, or already has everything it needs. MemCon's fix is to treat memory management itself as a decision problem, formally a Markov Decision Process — a fancy term for "a sequence of states where you pick an action, and that action changes what state you're in next." The available actions are things like: retrieve more context, inject a condensed plan, re-retrieve because the last pull wasn't useful, consolidate what's been learned, forget stale information, or do nothing at all. The system tracks where the agent is in the task and what its memory currently looks like, and picks the action from there. Instead of some engineer hand-tuning those rules, MemCon learns the policy live, during actual use, using a lightweight statistical method called a contextual bandit — imagine a slot machine that's also paying attention to context clues before deciding which lever to pull, gradually favoring whichever action worked best in similar past situations.
Hands-On (~50s, ~115 words): The six actions worth sketching on a whiteboard: Retrieve, PlanInject, Re-Retrieve, Consolidate, Forget, NoOp — each with its own tunable parameters like how many results to pull or how many hops through a knowledge graph to traverse. The learning algorithm is a tabular contextual bandit with UCB exploration — no neural net, no pretraining, no extra LLM calls to score itself — and it converges within tens of tasks using only pass/fail feedback. Tested across 6 benchmarks, 3 agent frameworks, and 3 different LLM backbones, it beat fixed-heuristic memory baselines by up to 15.2 points in task success, while using 5-20% fewer tokens — because it correctly learns when NOT to retrieve.
Takeaway (~25s, ~55 words): The real lesson isn't "use MemCon" specifically — it's that memory retrieval frequency and depth are tunable, learnable parameters, not settings you eyeball once and forget. If your agent's memory system is still running the same fixed retrieval rule regardless of task state, that's the next thing worth measuring and optimizing.