Skip to content
StackDecode
System Design
19. AI System Design and LLM InfrastructureAnimated

Agent Memory Architecture

Short and long-term memory for agents.

The idea

Context holds short-term state; a store holds long-term facts retrieved when needed.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

AgentWorking memory …Episodic logSemantic memory…Retriever
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Working memory is the current prompt.

step:
1/4
at:
Agent
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Keep the working context
  2. 2Summarise or store facts
  3. 3Retrieve relevant memories
  4. 4Add them to the prompt

Where it is used

Persistent assistants.

Watch out for

Stale or wrong memories cause confident mistakes.

Related