Lesson 1274 of 2116
Agent Memory vs. Context: When to Persist and When to Re-Fetch
The architectural choice between long-term agent memory and stateless context fetches.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1The premise
- 2agent-memory
- 3context-window
- 4RAG
Concept cluster
Terms to connect while reading
Section 1
The premise
Persistent agent memory is fast and dangerous; stateless re-fetch is slow and safe — choose deliberately, per data class.
What AI does well here
- Persist user preferences and recent decisions in scoped memory
- Re-fetch authoritative data (balances, quotas, permissions) every turn
- Expire memory by class (preferences: 90d, ephemeral facts: 1h)
- Show users what the agent remembers and let them edit it
What AI cannot do
- Detect when remembered facts have become stale upstream
- Resolve conflicts between memory and fresh fetches without rules
- Memory-share safely across users without leaking PII
Key terms in this lesson
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “Agent Memory vs. Context: When to Persist and When to Re-Fetch”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 40 min
Setting Context-Window Budget Policies for Long-Running Agents
How to keep an agent's context window from filling with noise mid-run.
Creators · 11 min
AI Agentic RAG: Retrieval Pipelines That Actually Help Agents
How to design retrieval-augmented agent pipelines that improve grounding without injecting noise.
Creators · 48 min
Computer Use API: Letting AI Click Through GUIs
Computer Use lets Claude see your screen and use it — mouse, keyboard, apps. The capability is real, the gotchas are real. A hands-on look at what works in 2026.
