Start free
Guide Memory

What is AI agent memory?

Updated 4 min read

The short answer

AI agent memory can mean information an agent stores and retrieves beyond the current prompt or conversation. Anthropic documents persistent memory files, while OpenAI documents two approaches: a broader summary of relevant context and explicit saved memory items (Anthropic, OpenAI).

On this page9 sections
  1. Context and persistent memory
  2. How persistent agent memory works
  3. Claude's documented memory approach
  4. ChatGPT's documented memory approach
  5. Where a knowledge base fits
  6. How knowledge differs from memory
  7. Where KnowMan fits
  8. Connect this agent to KnowMan
  9. Questions people ask

Context and persistent memory

Anthropic documents memory files that persist between sessions. This lets Claude retain knowledge over time without keeping everything in the context window (Anthropic).

How persistent agent memory works

Anthropic's memory tool lets Claude create, read, update, and delete files that persist between sessions. Claude records what it learns in files under /memories and retrieves them on demand rather than loading everything up front (Anthropic).

The application controls the storage. Claude requests file operations, while the developer runs them against storage the application controls. Anthropic also documents checking the memory directory before a task, plus using memory as a recovery mechanism when a new session resumes earlier work (Anthropic).

Claude's documented memory approach

Claude's documented approach combines durable files with just-in-time retrieval. The agent writes what it learns, then reads selected memory when it is needed. For long-running agents, Anthropic recommends pairing memory with compaction, which keeps active context small while memory preserves information that must survive summarization (Anthropic).

Memory requires care. Anthropic recommends deleting files that have not been accessed in a long time. It also documents a path-validation risk, because a malicious path can reach files outside the memory directory (Anthropic).

ChatGPT's documented memory approach

OpenAI documents two approaches. Improved Memory continually updates a broader summary of relevant context, while legacy saved memories use an explicit list of individual items. ChatGPT decides which available information is relevant, and saved memories are stored separately from chat history (OpenAI).

Depending on plan and region, sources can include past chats, saved memories, custom instructions, saved files, and connected-app content. Temporary chats do not create or update memories, even when personalization is on (OpenAI).

Where a knowledge base fits

Anthropic lists building up a knowledge base over time as a use case for its memory tool (Anthropic).

The Model Context Protocol gives AI applications a standard way to connect to external data sources such as local files and databases. The protocol documentation does not describe how a knowledge base integrates with agent memory (Model Context Protocol).

How knowledge differs from memory

The available documentation does not provide a general distinction between a knowledge base and agent memory. Anthropic lists building a knowledge base over time as a memory-tool use case, while OpenAI describes what its Memory feature can use and how saved memories are handled (Anthropic, OpenAI).

For related reading, see the personal knowledge base guide, knowledge base for AI agents guide, and persistent memory for AI agents guide.

Where KnowMan fits

KnowMan is built for one person's library today. It saves articles and links, reads and tags them, answers questions with citations, and keeps memories such as claims, decisions, and playbooks. Its MCP tools can search saved items, answer with citations, read one item, save a URL, list recent items, and retrieve memories. See the MCP server guide for setup details.

KnowMan runs locally as a stdio server with npx -y @knowman/mcp and as a hosted server at https://api.knowman.io/mcp. Connect to the hosted server with OAuth sign-in on the KnowMan consent page or an API key sent as an Authorization: Bearer header.

Connect this agent to KnowMan

Add the hosted KnowMan server at https://api.knowman.io/mcp in an MCP client that supports OAuth, then sign in on the KnowMan consent page and approve access. Or create an API key in KnowMan settings and send it as an Authorization: Bearer <key> header.

For Claude Code, configure the hosted server with claude mcp add --transport http knowman https://api.knowman.io/mcp --header "Authorization: Bearer <key>". For the local server, use npx -y @knowman/mcp; setup details are in the open-source client.

Questions people ask

What is the difference between short-term context and long-term memory?

The available documentation does not define a general short-term context and long-term memory taxonomy. Anthropic documents persistent memory files that let Claude retain knowledge between sessions without keeping everything in the context window (Anthropic).

Does ChatGPT remember every conversation?

No. ChatGPT does not retain every detail from every conversation. It decides which available information is relevant, and memory can change as context changes (OpenAI).

Can an AI agent use a knowledge base as memory?

The available documentation does not explain this integration in general. Anthropic lists building up a knowledge base over time as a memory-tool use case, while MCP documents connecting applications to external data sources (Anthropic, Model Context Protocol).

Where can I learn how to connect a knowledge base to an AI agent?

Start with the knowledge base for AI agents guide, connect any AI to your notes, and MCP server guide. KnowMan runs locally with npx -y @knowman/mcp and as a hosted server at https://api.knowman.io/mcp, which clients can connect to using OAuth sign-in or an API key.

Give your agent a durable knowledge source

Try KnowMan Pro for 14 days with no credit card. Create your account

Start free

Every new account starts with 14 days of Pro. No credit card.