Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 9 min read Research mediumAdept

How Much Memory Does Your Agent Actually Need?

The right amount of self-distilled agent memory depends on model capability: on AppWorld across eight models, strong models with headroom gain most from injecting the full guideline set (DeepSeek-V3.2 +9.5pp TGC, +16.1pp SGC), weaker models do best with a compact high-confidence core plus per-task retrieved guidelines (gpt-oss-120b +16.1pp TGC), and saturated models like GLM-5 show no gain. Curated retrieval can be both the most accurate and cheapest option, adding only 5% tokens versus 51–78% for full injection, and prompt caching of a stable guideline prefix keeps the full set affordable in production. ALTK-Evolve distills guidelines from successful and failed trajectories without weight updates or human annotation. Planned next steps include a learned guideline selector to replace cosine-similarity ranking.

Assumes: LLM agents and ReAct loopsretrieval by embedding similarityprompt caching

Related posts

  • Thinking of ACE? We Can Do It with Fewer Tokens

    Hugging Face hardMaster

    ALTK-Evolve and ACE both turn an LLM agent's past trajectories into reusable lessons without weight updates. Both avoid compressing those lessons into short summaries. They differ in delivery. ACE injects its full evolving playbook on every step. ALTK-Evolve consolidates support-counted, typed guidelines and sends either a high-support core plus task-selected guidelines or the full set, depending on model capability. On AppWorld with the same ReAct agent, ALTK-Evolve reaches 89.3 vs 80.4 TGC on DeepSeek-V3.2 at about 40% of ACE's tokens (263K vs 634K per task). On gpt-oss-120b it roughly ties on accuracy at about one-seventh the cost, and selective retrieval wins mainly on hard tasks.

  • The components of agent memory

    Anthropic Engineering mediumAdept

    Agent memory works best as a layered hierarchy: transcripts as an event log, notes Claude writes in-session, richer representations such as wikis, and context injected into every session, with an offline "dreaming" pass that reflects on transcripts to correct and reorganize memory. On a CL-Bench database task, newer Claude models closed the learning loop by recording validated rules, raising mean reward from about 0.56–0.66 to about 0.83. In Pokémon Red, a model that kept 10 focused files earned four badges, while one that logged everything into 413 files earned one. Stronger models do better when told what memory is for rather than given fixed rules, and dreaming caught a wrong navigation note that otherwise trapped the agent in a loop.

  • How to build a retrieval system for agents

    Turso mediumAdept

    Memelord is a fully local memory system for coding agents that keeps a per-project SQLite database (via Turso) of corrections, insights and user-requested memories, embedded with all-MiniLM-L6-v2 and retrieved by cosine vector search at task start. Each memory carries a weight updated by exponential moving average from the agent's 0-3 usefulness ratings, plus time decay for unused memories, and memories flagged as wrong are deleted immediately. Integration with Claude Code uses an MCP server and lifecycle hooks, and a TypeScript SDK accepts a bring-your-own embedding function for custom agents. The argument is that retrieval beats dumping lessons into .md system prompts, which wastes the finite context window.

  • ReasoningBank: Enabling agents to learn from experience

    Google Research hardMaster

    ReasoningBank is an agent memory framework that distills generalizable reasoning strategies from both successful and failed trajectories, stored as structured items (title, description, content) in a closed loop of retrieval, LLM-as-a-judge self-assessment, extraction and append-only consolidation. Memory-aware test-time scaling (MaTTS) feeds parallel (self-contrast across k trajectories) or sequential (iterative refinement) exploration back into memory. With Gemini-2.5-Flash and ReAct, it beat a memory-free baseline by 8.3% on WebArena and 4.6% on SWE-Bench-Verified, saved about 3 steps per task on SWE-Bench, and MaTTS (k=5) added another 3% success on WebArena. Learning from failures yields preventative rules, and memories evolve from simple checklists into compositional strategies over time.

  • Your Agent Aced the Task. Will It Do It Again?

    Hugging Face mediumAdept

    LLM agents that score well on average often fail to repeat their successes: a GPT-4.1 ReAct agent on AppWorld reaches 77.4% Mean@5 but only 53.0% Pass^5 (success on all five runs), a 24.4-point consistency gap, even at temperature 0. The gap comes from flat next-token distributions at certain decision points, where near-ties flip under platform noise and the flips compound across a trajectory. IBM's Consistency Analyzer in ALTK-Evolve finds these flip-prone steps from a single recorded trace by resampling k completions per step, with no ground truth or replay needed, and turns them into injected guidelines. The guidelines cut the gap to 12.0pp (Pass^5 53.0% to 69.0%) without lowering mean accuracy, and they transfer to similar tasks. The authors recommend reporting Pass^k next to Mean@k.

The quest for software engineering knowledge.

Look:
Layout: