ChatNexus.io Knowledge Base

Memory Architectures for AI Agents: Short-Term, Long-Term, Episodic and Semantic Memory

People often say they want an agent with memory when what they really want is for it to stop asking the same question twice. That sounds simple until you ask what should be remembered, for how long, and who is allowed to see it. A useful memory architecture starts by separating several jobs that are often thrown into one database.

Four kinds of memory, four different responsibilities

Short-term memory is the current conversation or task. It contains the records being discussed, the next step, and the tools already called. It should be easy to discard. Episodic memory records what happened in a past interaction: an approval, a failed attempt, or a decision that may help with a similar case.

Semantic memory is general knowledge, such as a product explanation or internal policy. It is usually retrieved from documents rather than written into a user profile. Long-term personal memory is a small set of explicit preferences or facts about a person or organisation. It needs the clearest consent, ownership, expiry, and deletion rules.

Do not let memory become the source of truth

A memory record can help the agent find the right place to look, but it should not quietly replace the CRM, billing system, or policy store. Keep a source, timestamp, owner, and confidence with remembered facts. If the memory says a customer prefers email but the current account setting says SMS, the current account should win.

Choose retrieval keys before choosing a vector index

Memory retrieval usually needs more than similarity. Include the tenant, user, purpose, time range, record type, and permission scope. A semantically similar memory from another organisation is not a useful answer. Expiry and deletion must remove summaries, embeddings, and cached copies, not only the original row.

Start small and test the uncomfortable cases

Begin with short-term state and a few explicit preferences. Add episodic memory when you can explain why it improves a workflow. Test stale preferences, contradictory facts, deletion requests, cross-tenant retrieval, and a user asking the agent to forget something. Good memory feels like less repetition, not like a machine collecting a biography.