# What Is Agent Memory?

> Agent memory is how an AI agent retains context across steps, sessions, or longer — from short-term conversation history to persistent knowledge stores.

**Term:** Agent Memory  
**Category:** Architecture  
**Also known as:** context memory, agent state, long-term memory  
**Updated:** 2026-07-22  
**Canonical:** https://www.frameworkr.com/glossary/agent-memory

---

**Agent memory** is how an AI agent retains and retrieves context beyond a single prompt. It spans from immediate conversation history to persistent knowledge that survives across sessions.

## Types of agent memory

| Type | Scope | Example |
|---|---|---|
| **Working memory** | Current loop / conversation | Messages and tool results in the active thread |
| **Session memory** | Single user session | Preferences stated earlier in the conversation |
| **Long-term memory** | Across sessions | User profile, past interactions, learned facts |
| **External memory** | Retrieved on demand | Documents, databases, vector stores (often via RAG) |

## Why memory matters

Without memory, every interaction starts from zero. An agent that forgets a tenant's prior maintenance history will treat a recurring leak as a new issue. Memory lets agents build context, avoid repeating questions, and make better decisions over time.

## Memory design tradeoffs

- **More context = better decisions** but higher cost and risk of hitting context window limits
- **Persistent memory** requires storage, privacy controls, and retrieval strategy
- **What to remember** is an architecture decision — storing everything creates noise; storing too little loses critical context

## Related reading

See [RAG](/glossary/rag) for how retrieval augments agent memory with external knowledge.

## Related terms

- [ai agent](https://www.frameworkr.com/glossary/ai-agent.md)
- [rag](https://www.frameworkr.com/glossary/rag.md)
- [context window](https://www.frameworkr.com/glossary/context-window.md)
- [agent architecture](https://www.frameworkr.com/glossary/agent-architecture.md)


---

_Published by Frameworkr — https://www.frameworkr.com_
