DatabricksThe Databricks AI Research TeamProblem & solution
MemCurrent: Designing Persistent Memory for Production Agents
Summary
Enterprise agents operating at scale must balance answer quality against cost and latency, a trade-off that memory can address if designed carefully. MemCurrent is a persistent memory architecture that stores both episodic memory (raw session traces) and derived memory (distilled learnings in a structured file system indexed by memory.md). It accesses memory through three patterns: plugins for automatic context logging and injection at session start, tools the agent calls explicitly during a session, and an offline dreaming pipeline that consolidates memory asynchronously. On an internal benchmark built from 114 real-world test cases across 29 users, MemCurrent triples the agent’s pass rate compared to no memory while reducing token consumption by 31% and latency by 26%. It also matches full-context accuracy on open-source benchmarks at roughly 12x fewer input tokens, placing it on the cost–accuracy Pareto frontier.
Context
AI agents in production need to carry context across tasks to improve accuracy and reduce repeated errors. However, simply feeding all past history is costly and can introduce noise. MemCurrent addresses this by intelligently managing what to retain and how to update it.
Approach / What changed
MemCurrent combines episodic memory (raw session traces persisted in an append-only database) with derived memory (distilled learnings stored as files in a mutable table simulating a hierarchical file system, indexed by a memory.md file). It uses three access patterns: plugins for automatic context logging and injection, tools for agent-controlled reads and writes, and an offline dreaming pipeline for background consolidation, cleaning, and conflict resolution. Memory is read layer by layer: the index is injected at session start, and search_memory and fetch_memory tools are available during the session.
Takeaways
MemCurrent uses three memory access patterns: plugins for automatic logging and injection, tools for agent-driven reads and writes, and an offline dreaming pipeline for background consolidation. Each balances immediacy of updates against runtime overhead.
On an internal benchmark built from 114 real enterprise test cases across 29 users, MemCurrent triples the agent’s pass rate over no memory while reducing token usage by 31% and latency by 26%.
Derived memory drives most of the improvement; combining online tools with the offline dreaming pipeline produces the best extraction strategy, as explicit requests take effect immediately and dreaming handles implicit distillation.
FAQ
What memory types does MemCurrent use?
MemCurrent uses episodic memory, which stores raw session traces, and derived memory, which contains distilled learnings stored as files in a structured knowledge base indexed by an auto-generated memory.md file. Episodic memory is append-only and logged by a plugin at each step, while derived memory is a mutable table simulating a hierarchical file system.
How does MemCurrent manage memory updates?
Derived memory is updated through two channels: online tools (add_memory, update_memory, delete_memory) handle explicit requests like 'Never write scripts in /tmp', and an offline dreaming pipeline distills implicit learnings from new sessions, splits oversized files, merges duplicates, and resolves conflicts.
How was the internal memory benchmark constructed?
Starting from over 12,000 real Genie sessions, the team mined 3,000 candidates with memory-worthy signals and drafted follow-up questions with scoring rubrics. An adversarial judge checked each against seven criteria, and after manual review the benchmark contained 114 test cases from 29 users with 2,233 history sessions.
Source and freshness
- Source
- databricks.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.