The Heart of Context Engineering
August 8, 2025
WARNING: This post is over a year old. Some of the information this contains may be outdated.
🧠 AI Agent’s Memory: The Heart of Context Engineering
If you're building AI Agents, Memory is one of the most critical components. It enables agents to plan, act, and respond effectively — not just in the moment, but with awareness of past interactions and relevant knowledge.
Let’s break down the core types of memory in Agentic Systems:
🔁 1. Episodic Memory
This is where the agent stores past interactions — both user messages and its own responses/actions. These are usually embedded and stored in a Vector Database to support semantic search and recall.
🧩 Example: Saving chat history or executed steps in a task automation flow.
📚 2. Semantic Memory
This represents the agent’s knowledge base — internal docs, Notion pages, PDFs, or contextual grounding needed to isolate relevant information from large corpora.
💡 Think of it like the memory behind RAG (Retrieval-Augmented Generation).
⚙️ 3. Procedural Memory
This holds the system-level information: the structure of the system prompt, tool registry, and constraints/guardrails. It’s usually versioned and managed in Git or registries.
🔧 This is where your agent knows “how to think and act.”
💡 4. Pulling Memory into Context
When the agent needs to solve a task, relevant memory from Episodic, Semantic, or Procedural memory is retrieved and added to the context window.
🧠 5. Short-term (Working) Memory
All retrieved information is compiled into the final prompt passed to the LLM:
- Prompt structure
- Available tools
- Reasoning & action history
- Additional context
This is where real-time decision-making happens.
Comments are not enabled for this post.