What is AI agent memory? Short-term, long-term, shared

AI agent memory is how an agent keeps information beyond a single reply. Short-term memory is the context window of the current session. Long-term memory is information saved outside the window, such as notes or files, and loaded again later. Shared memory is long-term memory that several agents can read and write.

The three kinds of agent memory

A language model does not remember anything on its own. Each request starts from the text you send it. Agent memory is everything built around the model so that useful information survives from one step, one session or one agent to the next.

People usually split it into three kinds.

How long-term memory works

The pattern is simple. The agent writes a note when it learns something worth keeping. At the start of a later session, it reads the notes it needs and puts them back into its context. Anthropic describes this as just-in-time retrieval: instead of loading everything up front, the agent records what it learns and reads it back on demand.

The notes can be plain files, rows in a database, or a graph of linked facts. What matters is that they live outside the context window, so they are not lost when the window fills up or the session closes.

Examples from real tools

These are documented by the tool makers. Check each vendor's page for current behavior, because memory features change often.

Shared memory across agents

Each tool above keeps its memory for one agent in one product. Claude's notes are not visible to ChatGPT, and the reverse is also true. If you use two or three agents on the same project, you end up explaining the project to each of them.

Shared memory fixes that by putting the notes in one place that every agent can reach. In practice this is often a server the agents connect to over MCP, the open standard for giving agents tools and data. One agent writes a decision, another reads it later. This works across vendors because the agents only need to speak MCP, not the same memory format.

Limits you should know about

Memory helps, but it is not perfect recall. Notes can be wrong, stale or too long. An agent may not read the right note at the right moment. Loading too many notes fills the context window again and brings back the problem you were solving.

Anthropic's own docs say memory files are treated as context, not as enforced rules, so an instruction in memory is followed best when it is short and specific. Memory also holds whatever was written into it, so avoid saving secrets, and review what your agents save.

Common mistakes

What NodePress is (and is not)

NodePress is software that gives the AI agents you already use one shared place, called a node, with a shared thread, a shared memory, and the files and context you choose. An agent joins with one pasted line through the remote MCP server at https://nodepress.ai/mcp, and the node runs on your own computer.

It is not a model and it is not a replacement for each tool's own memory. It adds a common place on top, and every step is written to one readable thread so you can see what each agent saved.

Do it with a NodePress node

  1. Name a node on nodepress.ai. It runs on your own computer, and the first node needs no sign-up.
  2. Paste the one line into each agent you use, such as Claude Code, Cursor or Codex.
  3. Ask the first agent to save the key decisions and open tasks to the node's memory.
  4. Open a second agent and ask it to read the node's memory before it starts.
  5. Read the thread to check what was saved, and remove anything that is wrong.

If you only use one agent, its built-in memory, such as CLAUDE.md or ChatGPT memory, is usually enough. A shared node helps when several agents work on the same project.

Questions people ask

What is AI agent memory?

It is the way an agent keeps information beyond one reply: the context window for the current session, and saved notes or databases for later sessions.

What is the difference between short-term and long-term memory in AI agents?

Short-term memory is the context window of the current session and disappears when it ends. Long-term memory is saved outside the window and loaded again when needed.

Does ChatGPT or Claude have memory across chats?

Both offer memory features. ChatGPT has saved memories and reference chat history, and Claude has memory on claude.ai plus CLAUDE.md and auto memory in Claude Code. Availability depends on your plan and settings.

What is shared memory between AI agents?

Long-term memory that several agents can read and write, so a fact saved by one agent is available to the others.

Why does my AI agent forget things?

The context window has a size limit and starts empty in each new session. Anything not saved outside the window is lost.

Related

Sources

NodePress gives your AI agents one shared place on your own computer. Free to start, no sign-up. Make your first node.