Hitesh Sahu
Hitesh SahuHitesh Sahu
  1. Home
  2. ›
  3. posts
  4. ›
  5. …

  6. ›
  7. 2 2 Agent Memory

Loading ā³
Fetching content, this won’t take long…


šŸ’” Did you know?

🦈 Sharks existed before trees 🌳.

šŸŖ This website uses cookies

No personal data is stored on our servers however third party tools Google Analytics cookies to measure traffic and improve your website experience. Learn more

AI-AgenticAI

  • AI-AgenticAI Index

  • NVIDIA Agentic AI Professional Certification Path

  • Building Production-Ready Agentic AI Systems

  • Understanding Agentic AI Workflows

  • Understanding Agentic AI Memory

  • Evaluating Agentic AI Systems

  • Error Analysis in Agentic AI

  • Error Analysis for Agentic AI

  • Tool Use in Agentic AI

  • Code Execution in Agentic AI

  • Understanding the Model Context Protocol (MCP)

  • Optimizing Agentic AI Systems

  • Multi-Agent Systems in Agentic AI

  • Understanding Model Fusion in AI Systems

Cover Image for Understanding Agentic AI Memory

Understanding Agentic AI Memory

Learn how memory enables AI agents to retain context, recall past interactions, access knowledge, and execute complex tasks across sessions. Explore working, episodic, semantic, procedural, retrieval, and shared memory patterns used in modern agentic AI systems.

Hitesh Sahu
Written by Hitesh Sahu, a passionate developer and blogger.

Sun May 31 2026

Share This on

← Previous

Understanding Agentic AI Workflows

Next →

Evaluating Agentic AI Systems

Types of Agentic Memory 🧠

Agentic memory is typically divided into several categories based on what is stored, how long it is retained, and how it is used during reasoning.

Memory Hierarchy in Agentic Systems

graph TD
    A[Agent Memory]

    A --> B["Short-Term Memory šŸ’¾"]
    A --> C["Long-Term Memory šŸ›¢"]

    C --> D["Episodic Memory šŸ“…"]
    C --> E["Semantic Memory šŸ“š"]
    C --> F["Procedural Memory šŸš—"]

    D --> G["Retrieval Layer šŸ“"]
    E --> G
    F --> G

    G --> H["Vector Database ↗"ļø]

Real Agent Memory usage

graph TD
    A["User Query ā“"]

    A --> B["Working Memory šŸ’¾"]

    B --> C["Reasoning Engine 🧠"]

    C --> D["Retrieval Layer šŸ“"]

    D --> E["Vector Database ā†—ļø"]
    D --> F["Knowledge Graph šŸ”—"]
    D --> G["Document Store šŸ—ƒ"]

    E --> H["Semantic Memory  šŸ“š"]
    F --> H
    G --> H

    C --> I["Episodic Memory šŸ“…"]
    C --> J["Procedural Memory šŸš—"]

    H --> C
    I --> C
    J --> C

    C --> K["Tool Calls 🧰"]
    C --> L["Agent Response šŸ’¬"]


1. Short-Term Memory šŸ’¾ : Working Memory

Stores information needed for the current task or conversation.

Characteristics

  • Session-scoped
  • Fast access
  • Temporary
  • Usually stored in context window

Use Cases

  • Chatbots
  • Task execution
  • Multi-turn conversations

Examples

User: Book a flight to Berlin

Memory:
- Departure: Munich
- Date: 15 July
- Airline preference: Lufthansa

2. Long-Term Memory šŸ›¢

An umbrella category that includes:

  • Episodic memory
  • Semantic memory
  • Procedural memory

Typically, stored externally:

  • Vector DB
  • Knowledge Graph
  • SQL Database
  • Object Storage

Examples

  • User preferences
  • Historical interactions
  • Enterprise documents
  • Learned workflows

2.1 Episodic Memory : Past Experiences šŸ“…

Stores past experiences and interactions.

Inspired by human memory.

Characteristics

  • Experience-based
  • Time-oriented
  • Helps personalization
  • Learns from previous interactions

Use Cases

  • Personal assistants
  • Customer support agents
  • Learning agents

Examples

Episode:
User asked about Kubernetes
Agent recommended EKS
User preferred self-hosted cluster

Later:

Agent remembers:
"Last time you preferred self-managed Kubernetes."

2.2 Semantic Memory : Knowledge šŸ“š

Stores facts and knowledge.

Characteristics

  • Fact-based
  • Not tied to specific events
  • Usually stored in:
    • Vector databases
    • Knowledge graphs
    • Knowledge bases

Use Cases

  • RAG systems
  • Enterprise knowledge assistants
  • Search agents

Examples

Berlin is the capital of Germany.

Docker is a container platform.

TensorRT optimizes LLM inference.

Episodic vs Semantic Memory

Episodic Semantic
"User asked about Java yesterday" "Java was released in 1995"
Experience Fact
Event-based Knowledge-based
Personalized General knowledge

2.3 Procedural Memory šŸš— : Process / Skill

Stores how to perform tasks.

Characteristics

  • Skill-based
  • Process-oriented
  • Often encoded as workflows or plans

Use Cases

  • Workflow automation
  • Multi-agent orchestration
  • Business process agents

Examples

How to deploy Kubernetes:

1. Create cluster
2. Configure networking
3. Deploy workloads
4. Monitor health

or

Workflow:
Validate input
→ Query API
→ Format result
→ Return response

3. Retrieval Memory šŸ“ : RAG

Memory retrieved dynamically when needed.

RAG + Agents

RAG systems provide external memory.

Agentic systems add:

  • planning
  • reasoning
  • dynamic retrieval
  • adaptive execution

A modern research agent may:

  1. Generate search queries
  2. Retrieve documents
  3. Rank relevance
  4. Summarize findings
  5. Detect knowledge gaps
  6. Retrieve additional context
  7. Revise conclusions

This creates recursive information acquisition loops.

Flow

graph TD
    A[User Query]
    B[Generate Embedding]
    C["Vector Database ā†—ļø"]
    D[Similarity Search]
    E[Top-K Retrieved Memories]
    F[Context Assembly]
    G[LLM Agent]
    H[Response]

    A --> B
    B --> D
    D --> C
    C --> E
    E --> F
    A --> F
    F --> G
    G --> H

Example

User:
What's my favorite programming language?

Retrieve:
"User prefers Java and Spring Boot."

This is the foundation of most RAG-based agents.


4. Shared Memory šŸ—‚ : Multi-Agent Systems

Used when multiple agents collaborate.

All agents can access and update the same state.


graph TD

SharedMemory["Shared Memory šŸ—‚"]
Research["Research Agent šŸ¤–"]
CodingAgent["Coding Agent šŸ¤–"]
ValidationAgent["Validation Agent šŸ¤–"]

Research --> SharedMemory 
CodingAgent --> SharedMemory
ValidationAgent --> SharedMemory

Example

{
  "customer_id": 123,
  "issue": "payment failure",
  "status": "investigating"
}

Exam Tip

Which memory type stores facts and knowledge?

Semantic Memory

Which memory type stores previous interactions?

Episodic Memory

Which memory type stores workflows and skills?

Procedural Memory

Which memory type holds current conversation context?

Working (Short-Term) Memory

Which memory type enables personalization from previous user interactions?

Episodic Memory


← Previous

Understanding Agentic AI Workflows

Next →

Evaluating Agentic AI Systems

AI-AgenticAI/2-2-Agent-Memory
Let's work together
+49 176-2019-2523
hiteshkrsahu@gmail.com
WhatsApp
Skype
Munich 🄨, Germany šŸ‡©šŸ‡Ŗ, EU
Playstore
Hitesh Sahu's apps on Google Play Store
Need Help?
Let's Connect
Navigation
Ā  Home/About
Ā  Skills
Ā  Work/Projects
Ā  Lab/Experiments
Ā  Contribution
Ā  Awards
Ā  Art/Sketches
Ā  Thoughts
Ā  Contact
Links
Ā  Sitemap
Ā  Legal Notice
Ā  Privacy Policy

Made with

NextJS logo

NextJS by

hitesh Sahu

| Ā© 2026 All rights reserved.