Memory Formation: How AI Agents Extract Knowledge from Experience

Memory formation is the bottleneck of agent intelligence. Poor extraction leads to poor memory, which leads to poor decisions. The quality of what goes in determines the quality of what comes out.

The Memory Formation Pipeline

Raw experience flows through a structured process: Extract → Structure → Embed → Index & Store → Organize → Retrieve. Conversations, actions, and events enter as unstructured data; they emerge as queryable memory units ready for the agent to access.

Three Extraction Approaches

Rule-Based Extraction: Predefined patterns and templates. “User said they live in Seattle and love hiking” → IF “live in X” → location=Seattle; IF “love X” → hobby=hiking. Fast and predictable, but limited flexibility. Methods: Regex, NER, templates.

LLM-Based Extraction: Language model understands and extracts. “Had a great birthday party yesterday!” → LLM extracts: event=birthday, sentiment=positive, time=yesterday. Flexible and semantic, but slower and costly. Systems: GPT-4, Mem0, Claude.

Hybrid Extraction: Rules for structure, LLM for understanding. Complex input → Rules identify categories → LLM extracts meaning → Structured + Rich output. Best of both but more complex. Examples: MemGPT, A-MEM.

Key Challenges in Memory Formation

What to Extract? Not all information is worth remembering. Distinguishing signal from noise requires judgment.

Granularity: Too fine vs too coarse. Overly detailed memories create noise; overly abstract memories lose precision.

Conflicting Information: User says different things over time. How to handle contradictions and evolving preferences?

Privacy: What’s safe to store long-term? Sensitive information requires careful handling.

Key Insight

Memory formation is where data becomes knowledge. The decisions made at extraction time—what to capture, how to structure it, what to discard—cascade through all downstream operations. Get formation wrong, and no amount of sophisticated retrieval can compensate.

Read the full analysis: The AI Agents Memory Ecosystem

Source: Hu et al. (2025) “Memory in the Age of AI Agents” arXiv:2512.13564

Scroll to Top

Discover more from FourWeekMBA

Subscribe now to keep reading and get access to the full archive.

Continue reading

FourWeekMBA