FISTA Solutions does not load Google Analytics until you accept. Rejecting keeps optional analytics off. Read the Cookie Policy.

All field notes

Glossary ¡ 5 minute read

What Is Agent Memory? Short-Term, Long-Term, and What to Forget

Agent memory is the set of mechanisms that let an AI agent retain and use information beyond a single model call: working memory in the context window during a task, and long-term memory stored outside the model, such as past interactions and user facts, retrieved into prompts when relevant. Good design decides what to store, retrieve, and forget.

By FISTA Solutions¡ AI-Native Engineering Team¡
What Is Agent Memory? Short-Term, Long-Term, and What to Forget article cover

Language models have no memory between calls; every request starts from nothing. An agent that remembers a user's preferences, continues yesterday's task, or learns from past outcomes does so because engineers built memory around the model: storage outside it and retrieval into the prompt. Memory design decides what is stored, how it is found, and what is forgotten, and it carries privacy obligations because it holds personal data. This explainer covers the types of agent memory and how to design them, drawing on FISTA Solutions' AI agents practice. The build guide is in how to build long-term memory for ai agents and the container for working memory in what is a context window.

What is agent memory?

Agent memory is the combination of storage and retrieval that gives an agent continuity beyond a single model call. It includes the working memory held in the context window during a task, and long-term memory persisted in external stores, retrieved selectively into prompts. The model itself does not change; memory changes what the model is shown.

What types of memory do agents use?

TypeWhat it holdsWhere it livesRetrieval
Working memoryCurrent conversation, retrieved context, tool results, scratch reasoningContext windowAlways present; managed by trimming and summarization
Episodic memoryRecords of past sessions, decisions, actions, outcomesDatabase or vector storeBy relevance, recency, and user
Semantic memoryFacts about users, entities, preferences, learned rulesStructured store or knowledge graphBy entity and relevance
Procedural memoryHow to perform tasks; playbooks and tool usage patternsPrompts, code, retrieved instructionsBy task type
Shared memoryState shared across agents in a multi-agent systemShared storeBy task and role

How does working memory work?

Everything the model reasons over must be in the context window: conversation history, retrieved documents, tool results, and intermediate reasoning. The window is finite and every token costs, so agents trim history, summarize older turns, and keep only what the current step needs. Summaries become episodic memory. Token economics are in llm token cost explained and caching in what is prompt caching.

How is long-term memory stored and retrieved?

Episodic records are written after sessions or steps with timestamps, user identifiers, and summaries; semantic facts are extracted and stored against entities with provenance; both are retrieved by relevance to the current task, recency, and the user's identity, then inserted into the prompt within a budget. Retrieval infrastructure mirrors RAG. Retrieval mechanics are in what is rag and search foundations in what is semantic search.

What should an agent remember?

Preferences and constraints users state, decisions and their reasons, outcomes of actions, facts about entities the agent works with, and corrections users make. What it should not remember without explicit design: sensitive personal data beyond what the task needs, secrets, and anything the user asked it to forget. Scope memory to what improves the task. Privacy practice is in ai data privacy compliance.

Why is forgetting a design requirement?

Memories go stale as facts change, wrong memories compound errors, and sensitive memories create risk. Memory systems need expiry policies, correction when new information contradicts old, user visibility and control over what is stored, and deletion on request. Privacy law often mandates the last two. Governance practice is in the ai governance checklist.

How does memory affect agent behavior and evaluation?

Memory makes agents more useful and less predictable, because behavior now depends on what was stored. Evaluation must include memory states: golden cases with prior context, tests that stale or wrong memories are handled, and checks that memories from one user never reach another. Evaluation design is in how to build an agent evaluation harness and isolation in ai agent security risks.

How does memory work in multi-agent systems?

Agents coordinating on a task share state through a common store with clear ownership of who writes what, and handoffs carry the context the next agent needs. Uncontrolled shared memory produces conflicts and drift. Orchestration patterns are in what is an orchestrator agent and handoff design in what is agent handoff.

What does memory design look like in practice?

A customer support agent keeps working memory of the current conversation and retrieved articles, writes an episodic summary of each resolved case, stores semantic facts such as the customer's products and preferences with provenance, retrieves relevant history at the start of each new conversation within a token budget, expires session details after a defined period, and lets customers see and delete what is remembered. Cross-customer isolation is tested in evaluation. Agent construction is in how to build an ai agent.

How FISTA Solutions designs agent memory

FISTA Solutions scopes memory to what improves the task, separates working, episodic, and semantic stores with provenance, retrieves within budgets, builds expiry, correction, user control, and deletion in from the start, and evaluates memory-dependent behavior and isolation before launch. The AI agents practice delivers memory-enabled agents, AI enablement provides the retrieval and governance platform, and forward deployed engineers embed with client teams. The record behind the approach is 150+ projects with 99.9% uptime.

To give agents continuity without creating risk, message FISTA on WhatsApp, or read what is react prompting for how agents use working memory step by step.

Share-ready article cover

Download the generated social format.

Download cover

Clear answers

Questions raised by this field note.

Straightforward guidance for evaluating scope, fit, and the next step.

01What is agent memory in simple terms?

A language model forgets everything when a call ends. To act like an assistant that remembers your preferences, past requests, and what happened earlier in a task, an agent stores information outside the model and brings relevant pieces back into the prompt when needed. That storage and retrieval is memory.

02What is the difference between working memory and long-term memory?

Working memory is what sits in the model's context during a task: the conversation, retrieved documents, and tool results. Long-term memory persists across sessions in databases or vector stores and is retrieved selectively. Working memory is fast but limited; long-term memory is larger but must be searched.

03What are episodic and semantic memory?

Episodic memory records events: what happened in past sessions, decisions made, actions taken. Semantic memory records facts: user preferences, entity attributes, learned rules. Agents use both, and they are stored and retrieved differently.

04Why does forgetting matter?

Stale, wrong, or sensitive memories degrade behavior and create privacy risk. Memory systems need expiry, correction when facts change, user control over what is remembered, and deletion on request, which privacy law often requires.

05How does memory relate to RAG?

Both retrieve information into prompts. RAG retrieves from documents and knowledge bases; memory retrieves from records the agent itself created about users and past interactions. Many systems implement memory with the same retrieval infrastructure.

Start with the hard problem

Need the outcome owned, not merely analyzed?

Tell us where delivery is constrained. We’ll map the fastest credible path from intent to verified production.

Start a project