OpenAI's Assistants and Agents SDK persist a thread's messages, but a growing transcript isn't memory — it's a log. There's no distilled, semantically searchable store of what a user decided or preferred, and nothing carries across threads or between users. So each new thread starts without the durable facts the last one produced, and personalization stalls at whatever fits in the current thread. This guide shows what persistent memory for OpenAI Agents looks like in practice — what to store, what it changes, and exactly how to wire it up. New to the idea? Start with the complete guide to persistent memory for AI.
Why OpenAI Agents agents need persistent memory
The problem isn't the model — it's statelessness. OpenAI Agents is only as consistent as the context it's handed each session, and without a durable memory that context resets to zero every time. Persistent memory is a store outside the model that keeps the facts, decisions, and preferences you build up, and surfaces them by meaning when they're relevant again — so OpenAI Agents stops re-learning your project and starts compounding what it knows.
What your OpenAI Agents setup should remember
- Distilled durable facts, not raw transcripts — decisions, preferences, corrections.
- Per-user context that should apply across every thread that user opens.
- Outcomes and conclusions that later threads should build on.
- Account- or org-level facts shared across a team's users.
What it changes, concretely
Before: a user's second thread has no idea what they told the assistant in the first — the transcript is siloed per thread. After: recall surfaces the durable facts from every past thread by meaning, and the assistant opens already knowing the user.
How to add persistent memory to OpenAI Agents
- Register a function tool that calls the Kit for AI REST API: recall(query, end_user_id) and remember(fact, end_user_id).
- Pass your app's user id as end_user_id so each user gets an isolated memory namespace.
- On each turn, recall against the user's message and inject the top memories into the instructions; after, remember the durable facts.
- The same key converts and searches documents, so your agent's memory and knowledge base share one API.
One memory across every tool
Because the memory lives in the cloud, it isn't locked to OpenAI Agents. A decision you save here is recalled by every other MCP-capable tool and by your own scripts over the API — switch models or editors and your memory follows you. That's the difference between a per-app memory silo and a real memory layer for AI, and it's why the same account also handles document ingestion and cited search.
FAQ
Does OpenAI Agents have persistent memory built in?
OpenAI Agents can persist a single thread or run's state, but not a distilled, semantically searchable long-term memory that spans threads and users. Persistent memory adds exactly that — a durable store, recalled by meaning, isolated per end user — through one API.
How do I give OpenAI Agents long-term memory?
Call the Kit for AI REST API or typed SDK from your OpenAI Agents setup: recall(query, end_user_id) to load relevant memories into context and remember(fact, end_user_id) to save durable facts — with an isolated namespace per user, so one integration serves all of them.
Related guides
Go deeper: the AI memory API · share one memory across AI models — or read the pillar guide to persistent memory for AI.
Add persistent memory to your OpenAI Agents agents in minutes — Start free and call remember and recall over the REST API or the typed SDK.