AI Wisdom

Long-term Memory

External persistent memory that agents can query and update across multiple sessions.

In this article

Long-term memory externalises information beyond the context window into persistent stores that survive session boundaries. Implementation options: vector databases for semantic recall (find memories similar to the current query), relational databases for structured facts (user preferences, past decisions), key-value stores for profile data, and knowledge graphs for entity relationships. Agents write to long-term memory explicitly (summarising completed tasks) or implicitly (background extraction pipelines). Critical design questions: what to store, when to retrieve, forgetting curves, and preventing stale data from degrading responses.

What it means in practice

Long-term Memory is not just vocabulary; it is a design handle. In agentic systems, this term usually appears when engineers are designing, reviewing, or troubleshooting real production flows rather than only naming the concept. It shows up when an AI system must choose actions, call tools, remember state, and recover from partial failures.

Why engineers care

  • It gives teams a shared name for the behaviour, risk, or architecture choice being discussed.
  • It helps separate the goal from the implementation detail, so you can compare alternatives instead of copying a tool pattern blindly.
  • It creates a useful checklist for reviews: inputs, outputs, failure modes, ownership, cost, latency, and measurement.

Production watch-outs

Do not add autonomy without observability and limits. Tool permissions, retries, budgets, timeouts, and human review paths should be explicit.

Related context

Useful neighbouring concepts: Episodic Memory, Short Term Memory, Vector Database, RAG.

Discussion

Sign in to share your feedback and join the discussion.