Module 09 LLM Memory Mechanics - akash-coded/aws-bedrock-agentcore-strands GitHub Wiki
What models forget, why, and what you can do about it.
Module 09 of 16 ยท track Build ยท Estimated time: 3โ4 hours ยท Prerequisites: Module 08 (or Module 06).
Models are stateless. Every 'memory' feature is engineering you or your framework did. This short, sharp module makes that machinery explicit so you stop being surprised by it.
Open the module on GitHub โ: the slides, notebooks, exercises and solutions are there. This page is the reading order, with the tutorial and the workbench alongside.
The lesson that frames this module is Why Your AI Agent Costs 4ร the Estimate, and How to Fix It (7 min): context is the largest line on the bill. Then try the cache break-even calculator in the workbench: the same decision, with your numbers.
- Explain why an LLM has no memory and what each memory strategy actually does
- Implement buffer, summary and vector-backed memory and compare them
- Choose a memory strategy from cost and recall requirements
| Portable GenAI concepts | AWS-specific surface |
|---|---|
| Statelessness | AgentCore Memory |
| Buffer memory | Bedrock Knowledge Bases as long-term recall |
| Summary memory | |
| Vector memory | |
| Context budgeting |
Portable concepts transfer to any stack. The AWS column is where this module touches the cloud โ see docs/concepts/portability-matrix.md.
| # | Step | What it is | |
|---|---|---|---|
| 1 | ๐ | slides/Mechanics_of_LLM_Memory.pptx |
Mechanics of LLM memory |
| 2 | ๐ | slides/langchain_memory_session_deck_v2.md |
Memory session deck |
| 3 | ๐ป | notebooks/01_demonstration_llm_memory.ipynb |
Memory demonstration |
| 4 | โ๏ธ | exercises/02_activities_llm_memory.ipynb |
Memory activities |
๐ read ๐ป run โ๏ธ practise ๐ workbook ๐ reference
There is no separate solutions/ folder because the answers are inline: the
activities notebook carries # SOLUTION cells and collapsed
<details> reveals next to each task. Write your own answer into the my_answer_ variables before you
expand anything.
- Summary memory that silently drops the one fact the user cares about.
Every error anyone has hit in this course is in the Error Index, by the exact string. Model access and region problems are in Model and Region Notes. If it is a question rather than an error, check the answered ones first, then ask in Q&A.
Frameworks
- Context Budget Ledger โ The overflow protocol
- Silent Degradation Watchlist โ Summary memory drops the decisive fact
Quick reference
- AgentCore โ Managed memory and retention
Recipes and procedures
- Memory that does not grow forever โ Caps, TTLs, and the test everyone skips
โ Module 08 ยท LangChain and LangGraph ยท All modules ยท Module 10 ยท RAG, OpenSearch and LiteLLM โ
โ๏ธ This page is generated from modules/09-llm-memory/README.md. To change it, edit the module README: an edit made here is replaced at the next sync.