What should an agent remember before it knows the question?
Long-running agents encounter conversations, documents, and tool traces long before they know which details a future request will need. Archiving everything does not make those details cheap to retrieve or fit into a model's context.
EMBER studies Budgeted Pre-Query Retention: memory is written while the future question is hidden, only a fixed amount of source evidence can survive, and the reader later answers without returning to the full raw history. The challenge is choosing evidence that will still be useful and findable.
Evidence capsules, not generic summaries
The writer uses answerability probes to identify source spans that could support later information needs. Each retained capsule pairs a verbatim source excerpt with a title, entity anchors, retrieval keys, and update metadata. The evidence stays grounded in the original stream, while its retrieval handles make it searchable after the question arrives.
A deterministic budget layer validates source grounding, counts excerpt tokens, and applies the writer's insert, merge, overwrite, or skip proposals. At read time, retrieval and evidence selection operate on the retained capsules. The reported budget caps source-excerpt tokens; retrieval metadata is accounted for separately.
- Choose what evidence survives before the future question is available.
- Keep verbatim source excerpts together with useful retrieval handles.
- Retrieve and select retained evidence for the reader when a query arrives.
Learning from the eventual answer
EMBER trains Qwen2.5-7B and Qwen2.5-14B memory-policy backbones with an answer-gated evidence-chain reward. A rollout first writes memory, then reveals the question, retrieves and selects evidence, and produces an answer. Earlier memory decisions receive delayed feedback from that complete chain.
The clipped GRPO-style update targets a curriculum-selected writer action or read-selection turn; the answer turn is score-only. Training samples evidence budgets from 512 to 8,192 tokens and includes multi-hop, update, temporal, and abstention episodes, so the policy learns which evidence to preserve as the budget changes.
More useful evidence at the same retained budget
On LongMemEval-RR, EMBER-14B reaches 0.3017 answer F1 at an 8,192-token retained source-evidence budget, compared with 0.1765 for the strongest non-EMBER budgeted baseline. This comparison uses a Qwen2.5-14B memory writer, a GPT-4o reader, and top-10 retrieval.
The evaluation measures retained evidence, evidence reaching the reader, and final answer quality separately. This makes it possible to distinguish evidence forgotten during writing from evidence missed during retrieval. The budget frontier shows how learned retention improves the use of a limited evidence state.

Read the paper abstract
EMBER studies Budgeted Pre-Query Retention for long-horizon agents: an agent ingests a stream before future queries are known, keeps only a fixed budget of source evidence, and later answers from that retained memory without returning to the full raw history.
The system learns a retention policy that uses write-time answerability probes to identify source spans likely to support future answers. Instead of storing generic summaries or predicted future questions, EMBER stores evidence capsules: source excerpts paired with retrieval keys that remain searchable at read time.
On LongMemEval-RR, EMBER-14B reaches 0.3017 F1 at the 8192-token retained source budget, compared with 0.1765 F1 for the strongest non-EMBER budgeted baseline. The result reframes long-term agent memory as learned evidence retention under strict context and memory budgets.

