Memory for AI agents
Long-term memory that Claude Code, ChatGPT, Codex and the agents you deploy on superagnt share: one chat writes down a preference or a fact, and a later chat or agent finds it by meaning, with no briefing pasted into the prompt and no memory framework or vector store to run.
What it touches: memories stay in your workspace. A connection such as Claude Code reads and writes the shared workspace memory through these tools, and forget removes one. An agent you deploy writes there too by default, and can also keep memories private to itself or about one person, which never come back to a connection.
updated Nov 16, 2026
Copy the setup prompt.
Your agent does the rest.
Install superagnt for me. It's the superagnt plugin from the github.com/superagnt/plugins marketplace, plus the superagnt MCP server (on Claude it's a connector I add in my browser; elsewhere I sign in through my browser). The setup guide for each kind of agent is at https://www.superagnt.com/install» the agnt_memory_* tools are part of every server's base tools, so a fresh connection already reads and writes your workspace's shared memory, and an agent you deploy with them also gets its most relevant memories in every turn.
Is agent memory the same as RAG or a context window?
No. Each holds something different, and an agent that works for weeks uses all of them:
| Holds | Written by | Lasts | |
|---|---|---|---|
| Memory | Small facts the agent learns: preferences, rules, who people are | The agent, as it works | Until it is forgotten |
| Knowledge base (RAG) | Documents it must quote: policies, docs, transcripts | You, by adding documents | Until the document changes |
| Database | Rows you count and filter: leads, orders, results | The agent or your systems | Until a row is deleted |
| Context window and chat history | This conversation | The conversation itself | This session only |
What can your agent do with memory?
agnt_memory_write with action remember stores one preference, fact, commitment or event, embedded for retrieval and deduped against near-identical entries.
agnt_memory_read with action recall returns the best match for a plain-language query; search returns the ranked set.
action recall_entity expands a person or company into identity, current standing, open threads and recent interactions.
action commit records what a turn taught in one call: workspace facts, entities and the relations between them, and inside a deployed agent, facts about the operator.
action forget removes a memory by quote or description, so a fact that changed stops coming back.
A connection reads and writes the shared workspace memory. A deployed agent writes there by default, and can keep a private tier of its own and facts about the person it works for.
agnt_memory_writeaction: remember · commit · forgetagnt_memory_readaction: recall · search · recall_entity
per-operation names06older servers list these
agnt_memory_rememberagnt_memory_recallagnt_memory_searchagnt_memory_recall_entityagnt_memory_commitagnt_memory_forgetWhat does a real call return?
A run we recorded on superagnt, with the result trimmed to fit. Nothing on it is invented: the date, the wall time and the cost are the run's own.
asked Chat 1: "Remember that our outbound emails sign off as The superagnt team, never with a first name." Chat 2, a new session: "How should outbound emails sign off?" Then: "Forget that rule."
- → call 1
agnt_memory_write{ "action": "remember", "content": "Outbound emails sign off as \"The superagnt team\", never with a first name.", "kind": "preference" }← resulttrimmed{ "id": "d8067ec5-…", "scope": "workspace", "subject_type": "workspace", "kind": "preference", "deduped": false } - → call 2
agnt_memory_read{ "action": "search", "query": "How should outbound emails sign off?" } then { "action": "recall", "query": "email sign-off" }← resulttrimmed{ "matches": [{ "id": "d8067ec5-…", "content": "Outbound emails sign off as \"The superagnt team\", never with a first name.", "kind": "preference", "scope": "workspace", "similarity": 0.66 }] } { "id": "d8067ec5-…", "kind": "preference", "scope": "workspace", "similarity": 0.54 } - → call 3
agnt_memory_write{ "action": "forget", "query": "sign off" }← resulttrimmed{ "forgotten": true, "id": "d8067ec5-…", "content": "Outbound emails sign off as \"The superagnt team\", never with a first name." }
» Recorded from a workspace MCP connection with no deployed agent, calling superagnt as Claude Code does; chat 2 was a new MCP session. After the forget, the same search returned no matches. Before it, a deployed agent in the same workspace recalled the rule too, at 0.54. Wall time adds up the five calls' round trips, and memory calls carry no per-call charge.
What are the types of memory in AI agents?
Short-term memory is the context window: what the agent holds during one session. Long-term memory survives the session and comes in kinds, which this memory stores as labels: preferences (how someone likes things), facts (what is true about the business), commitments (what was agreed) and episodic memories (what happened). Procedural memory, how to do a job, usually lives in the agent's prompt and skills.
How fast is a recall, and what does it cost?
From a workspace connection each memory call took 0.9 to 1.5 seconds, round trip; inside a deployed agent, 1.2 to 1.6 seconds from the agent's call to the result. Memory has no per-call price. Claude Code, ChatGPT or Codex runs the AI in your own client, so a connection's memory calls cost nothing on superagnt. Inside a deployed agent the cost is the session that uses it: 1.75 cents of AI credit for the three-message session that wrote and changed a fact and 0.46 cents for the one that recalled it, on Claude Haiku 4.5.
sample · 5 calls from a workspace connection, Nov 16, 2026; two sessions of one deployed agent, 5 memory calls, Nov 3, 2026
What does a connection see of my agents' memory?
The shared workspace memory only: none of the facts an agent keeps private, and nothing kept about one person. In our run, one deployed agent stored a fact private to it and another stored a memory about the person it works for. Searched and recalled from the connection, neither came back: each query returned only the shared sign-off rule, at a similarity of 0.19 or less, while the agent that owned the private fact found it at 0.78.
sample · One workspace connection and two deployed agents in one workspace, Nov 16, 2026
What happens when a fact changes, or is said twice?
Forget the old one and remember the new one. In a deployed agent's two sessions, a forget and a remember replaced a first-name sign-off with "The superagnt team", and the next session recalled the new one. A forgotten memory stops coming back: after the forget in the run above, the same search returned no matches. A near-identical write is deduped: the third time we gave the same sign-off, remember returned the existing memory with "deduped": true instead of a second copy, so a fact said often doesn't crowd out the rest.
What do people use it for?
Standing rules every session keeps
Tell Claude Code or a deployed agent a rule once, such as a sign-off, a tone or a list of accounts never to contact, and later sessions recall it instead of asking you again.
Relationship context on a name
When a person or company comes up, the agent expands the entity card and answers with what was agreed last time instead of asking you to recap.
Handover between agents
Claude Code writes to the shared workspace memory and a deployed agent with the memory tools reads it, or one deployed agent hands off to another, so a research agent and an outreach agent work from the same picture.
What does it cost?
The tools carry no per-call price: every plan includes them, and plans differ only in how much they hold. Plans are Starter $49 a month ($20 of data credit included), Growth $149 a month ($90) and Scale $399 a month ($300), and the no-card trial gives $3 of data credit with Growth limits.
What do people ask before they wire it up?
01What are the types of memory in AI agents?
Short-term memory is the context window of one session. Long-term memory outlasts it: preferences, facts, commitments and episodic memories of what happened, which this memory stores as kinds. How to do a job, procedural memory, usually lives in the prompt and skills.
02Can Claude Code, ChatGPT or Codex use this memory?
Yes. The memory tools are part of every superagnt connection. Claude Code or Codex remembers a fact in your workspace's shared memory, and a later chat finds it by meaning, in ChatGPT too, as do the agents you deploy with the memory tools. ChatGPT saves to it on Business and Enterprise/Edu plans, since Pro accounts get read-only servers. A connection never reads the facts an agent keeps private, or what it keeps about one person.
03What is the best memory framework for an agent?
If you write your own agent loop, a memory library stores and retrieves facts for you, and you host its store. With superagnt, memory is built in: Claude Code or Codex on a superagnt connection, and the agents you deploy with the memory tools, write, recall, dedupe and forget through the same tools, with nothing else to run.
04Is agent memory the same as RAG?
No. RAG searches documents you loaded, such as policies and docs. Memory holds the small facts the agent learns as it works, such as a preference or a correction, and the agent writes them itself. Use a knowledge base for the first and memory for the second.
05Do I need a vector database for agent memory, or will Postgres do?
Neither, here: memories are embedded and stored by superagnt, with nothing to host. Postgres with pgvector does the job well if you build your own, and the workspace database runs pgvector if you want your own embeddings beside your rows.
06How is memory different from a context window or chat history?
The context window and chat history end with the session. Memory outlasts it: a later session finds what an earlier one saved, by meaning, as in the run above, where a new chat found the sign-off rule the chat before it saved. A deployed agent with the memory tools also gets its most relevant memories in every turn.
07How do I delete specific data, for GDPR?
Ask the agent to forget it, by quote or description: the forget call removes the matching memory and returns what it removed, so you can confirm it. Rows and files that hold the same data are deleted with the database and file tools.