LLM Learning Hub

workspace/llm-course/home

Memory

Agent memory is the storage of past interactions, facts, and context that persists across agent steps or sessions, enabling long-term coherence beyond a single context window.

What is Memory?

Agent memory is the storage of past interactions, facts, and context that persists across agent steps or sessions, enabling long-term coherence beyond a single context window.

Agent memory is the storage of past interactions, facts, and context that persists across agent steps or sessions, enabling long-term coherence beyond a single context window.

Where is it used?

LangGraph `MemorySaver` checkpoints state, MemGPT and Letta manage tiered memory, and Claude Projects store persistent context; vector-store-backed long-term memory is common in RAG agents.

How to build it

Use `langgraph.checkpoint.memory.MemorySaver()` as the checkpointer in `create_react_agent(..., checkpointer=memory)`, and pass a `thread_id` to persist state across turns.