# What is Agent Memory? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Agentic Systems  
> **Canonical Citation:** [https://spidits.com/ai-glossary/agent-memory](https://spidits.com/ai-glossary/agent-memory)

## Definition
Agent Memory refers to persistent memory architectures—combining short-term context buffers, episodic event logs, and long-term vector storage—that allow autonomous AI agents to retain context, remember past user interactions, and recall tools across multiple execution turns.

## Architectural Mechanics & Deep Dive
Agent Memory is the multi-tier architectural backbone that converts stateless Large Language Models into persistent, adaptive autonomous systems. Without an explicit memory substrate, an LLM resets its state upon context window termination, erasing historical user preferences, task checkpoints, and tool error logs.

### Multi-Tier Memory Taxonomy for Autonomous Agents
1. **Working Memory (In-Context):** The active prompt token buffer containing the current task goal, active tool-calling schema, and immediate scratchpad reasoning (ReAct traces).
2. **Short-Term Episodic Memory:** Chronological logs of recent execution turns, subagent interactions, and environment observation diffs, frequently managed with sliding-window summaries and FIFO pruning.
3. **Long-Term Semantic & Associative Memory:** High-dimensional vector stores (such as Qdrant, Milvus, or pgvector) that index historical facts, user profiles, and solved debugging patterns. Agents query this tier using cosine similarity and hybrid dense-sparse retrieval.
4. **Procedural Memory:** Hardcoded or dynamically compiled execution policies, verified subroutines, and tool use templates that guide how the agent approaches recurring workflow archetypes.

### Production Architectures & Frameworks
Modern stateful agents implement memory consolidation algorithms inspired by human cognitive architecture:
* **MemGPT (Letta):** Treats the LLM context window as hierarchical virtual memory (RAM), using explicit tool calls (core_memory_append, archival_memory_search) to page data in and out of persistent storage.
* **Zep & LangGraph Checkpointing:** Automatically graph-index conversation entities and persist serialized thread states across distributed message brokers.

## Industry Applications & Real-World Use Cases
Long-running AI agents, personalized copilots, and multi-session software automation

## Frequently Asked Questions

### What are the main types of agent memory?
Agent memory typically includes working memory (current context window), short-term episodic memory (recent execution steps), and long-term semantic memory (vector database of historical facts).

### Why is long-term memory critical for autonomous agents?
Without long-term memory, an agent resets its state at the end of every session, losing historical user preferences, system configurations, and past bug resolution patterns.

## Related Terminology
- [agentic-ai](https://spidits.com/ai-glossary/agentic-ai)
- [vector-database](https://spidits.com/ai-glossary/vector-database)
- [mcp](https://spidits.com/ai-glossary/mcp)

---
*From the SPIDITS AI Knowledge Base (336+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
