Agentic AI
AI agents get personalized memory programs tuned to each task
Researchers introduce a method that automatically evolves custom memory architectures for language model agents, finding that conversation, planning, and reasoning each benefit from structurally distinct storage and retrieval systems.
Large language model agents need sophisticated systems to record, organize, and retrieve past experiences—yet a single memory design rarely works across different problem domains. Researchers have developed M*, an approach that automatically discovers and optimizes task-specific memory programs by treating memory as an executable Python module.
The Memory Problem#
Agent performance depends heavily on how well their memory systems handle domain-specific demands. A memory harness suited for conversational tasks—where context and dialogue flow matter most—often breaks down when applied to embodied planning or specialized reasoning tasks, each of which has unique storage and access patterns.
How M* Works#
Rather than hand-crafting memory systems, M* operationalizes memory as a structured Python program with three jointly optimizable components: Schema (data structure), Logic (retrieval and update rules), and Instruction (how the agent should use memory). The method uses reflective code evolution to automatically search for the best memory program for each task.
Results Across Diverse Domains#
Testing on four tasks spanning conversation, physical planning, and expert reasoning showed that M* outperformed existing baselines consistently. Crucially, the evolved memory programs revealed fundamentally different architectural choices for each domain—validating the hypothesis that one-size-fits-all memory systems are inherently suboptimal.
Implications#
The findings suggest that memory program search offers a practical path to discovering which storage and retrieval mechanisms work best for specific tasks, moving beyond generic memory designs toward tailored solutions that match the problem's actual demands.

