What is memory for AI agents?
Memory for an AI agent is anything the agent can recall that is not in the current conversation: your preferences, decisions, project facts and past work. A language model starts every session with an empty context window, so without memory an agent forgets everything the moment a chat ends.
Memory is also the most sensitive thing an agent holds. Whatever lands in memory shapes every later answer and action, so who can write to it, and how you check what changed, matter as much as what it remembers.
About Morphika: Morphika is secure, shared memory for personal AI agents like Claude Code, Codex and Claude Desktop. How it is secured.
Why do AI agents need memory at all?
Large language models are stateless. Each request carries only what fits in its context window: the conversation so far, the files the agent opened and any instructions loaded at start. Close the session and all of that is gone. Memory is the layer that carries knowledge from one session, or one agent, to the next.
Without it you repeat yourself: the same preferences, the same project background, the same “we already decided this” every day, in every tool.
What kinds of agent memory are there?
| Kind | What it holds | Lasts | Example |
|---|---|---|---|
| Session (working) memory | The current conversation and files in the context window | Until the session ends | The chat you are in right now |
| Instruction files | Rules and context you write by hand, loaded at every start | Until you edit the file | CLAUDE.md in Claude Code, AGENTS.md in Codex |
| Built-in automatic memory | Notes a tool writes for itself about you or a project | Until deleted; usually on one machine, in one tool | Claude Code auto memory, Codex memories, Meta Muse's memory |
| External persistent memory | Entries in a store the agent reads and writes through tools | Until deleted; reachable from any connected agent | An MCP memory server such as Morphika |
Researchers also split memory by what it stores: semantic memory (facts and preferences), episodic memory (what happened, and when) and procedural memory (how to do things). In practice most tools mix all three in plain text notes.
What is the difference between personal and shared memory?
Personal memory belongs to one person and follows them across their own agents: the coding agent in the terminal, the desktop assistant, the phone. Only that person, and the agents they connect, can read it.
Shared memory belongs to a group, such as a team, a family or a project, and every member's agents can read it. It is where team decisions and common context live. It is also where one mistaken or manipulated write reaches everyone at once, which is why shared memory needs stronger controls than personal memory.
Why is agent memory a security question?
An agent trusts its memory. That makes memory an attractive target:
- Memory poisoning. A web page, email or document the agent reads can carry hidden instructions (prompt injection) that trick it into saving false or harmful “facts”, which then steer every later session.
- Leaking secrets. Agents paste what they see. Without a guard, API keys and passwords end up stored in memory and repeated back later.
- Silent changes. If you can't see who changed a memory, and when, you can't tell a real decision from a planted one.
- Over-broad access. An agent that only needs to look things up should not be able to write, and one you stop trusting should be cut off at once.
The full list of risks, and what to do about each, is in How to keep an AI agent's memory secure.
What should good agent memory do?
- Work across the agents you actually use, not only inside one tool.
- Keep personal memory private to you.
- Put a person in front of changes to shared memory.
- Record every read and write in a log you can check for tampering.
- Refuse to store credentials, and let you revoke any agent's access.
- Let you delete your data yourself.
Where does Morphika fit?
Morphika is external, persistent memory built for those requirements. It is a remote MCP server, so Claude Code, Codex and Claude Desktop connect to the same memory with one command or one URL and sign in through the browser. Personal memory saves straight away. A change to a shared workspace waits until another member approves it, from the dashboard or on their iPhone with Face ID, and every call goes into a hash-chained audit log you can verify.
Morphika is in a private pilot and invite only. See how it works or how it is secured.
Related guides
Published September 25, 2026 · Last updated