An AI agent starts from zero when a new run cannot access the state from the previous one. To continue, the application must identify the right conversation or thread, save its state, and load that state before the next model call. Remembering facts across entirely separate conversations requires an additional storage and retrieval design.
What “memory” means in an AI agent
Memory can refer to three different things. Separating them helps explain what is missing when an agent forgets—and what kind of persistence to add.
As an Amazon Associate I earn from qualifying purchases.
- Conversation history: messages from earlier turns that let the agent continue a conversation.
- Workflow state: the task data, intermediate results, and execution progress needed to resume work. In LangGraph, saved snapshots of graph state are called checkpoints.
- Cross-conversation memory: selected facts or preferences that an application makes available across different threads.
In LangGraph, a checkpointer saves graph state for a particular thread. A separate store can hold application-defined information outside that thread’s graph state, making it available for cross-thread use. These are distinct mechanisms, not one universal “memory” switch. LangGraph’s persistence documentation
Why a new run may not continue the last one
The next run has a different thread ID
A thread ID identifies which history or workflow state a run should use. If the application generates a new ID for every run, it can select a new thread rather than the saved one. LangGraph describes a thread as a sequence of checkpoints associated with a unique thread_id. LangGraph checkpoints reference
#1 Best Overall
Nothing durable saves the state
A framework can track state during execution without retaining it across a process restart. For example, an in-memory saver may suit a demonstration, but state held only in memory will not survive a restart. Production continuity requires storage that persists for the lifetime the application needs.
The state is saved but never loaded
A database existing in the system does not mean the agent is using it. The application must successfully write state after a run and retrieve the relevant state before the next run. If either side of that path is missing or misconfigured, the model will not see the earlier context.
Rank #2
The application expects thread history to work across threads
Thread checkpoints support continuity within a thread. They do not automatically make information available in a new thread. For durable preferences or facts that should carry across conversations, the application needs a separate store and a retrieval step.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesSaved history does not fit into the model request
Persistence does not guarantee that every old message is included in a model call. Context limits may require truncating history or selecting only relevant information. OpenAI’s Assistants API deep dive describes thread-message truncation when history exceeds the model’s context window. This is an API-specific example, not a rule for every provider.
Trace the state path before changing frameworks
Follow one conversation from the first run to the next. Check each step in order:
- Verify the identifier. Confirm the continuation uses the intended stable conversation or thread ID, rather than generating a new one.
- Verify the persistence mechanism. Check that a checkpointer or provider conversation feature is configured, and that its storage survives the restarts or deployments you need to tolerate.
- Verify the write. Confirm that the run successfully saves the expected conversation or workflow state.
- Verify the read. Confirm that the next run retrieves that state before invoking the model, and that it retrieves it under the same intended ID.
- Verify the scope. If the information must survive a new thread, confirm that selected facts are stored and retrieved separately from thread checkpoints.
- Verify the model input. Inspect what history or retrieved information actually reaches the model, including any selection, summarization, or truncation.
- Verify retention and deletion. Identify which endpoint or database holds each kind of state, how long it persists, how it is deleted, and which organization-level controls apply.
Choose persistence by scope and control
There is no universal winner between framework-managed and provider-managed persistence. Compare the approaches against the application’s needs rather than treating “memory” as a single feature.
Rank #4
| Decision | Question to answer |
|---|---|
| Scope | Does state need to continue one thread, or be available across threads and users? |
| Saved content | Do you need full message history, resumable execution state, selected durable facts, or a combination? |
| Durability | Must the state survive a process restart, deployment, or longer period of inactivity? |
| Operational control | Who operates the storage, access controls, backups, and deletion process? |
| Context handling | How will the application select, summarize, or truncate retrieved information before sending it to the model? |
| Retention and privacy | Which endpoint or storage system holds the data, for how long, and under what controls? |
For LangGraph, the documented options include in-memory, SQLite, and Postgres saver implementations; these are framework-specific choices, not requirements for every agent. LangGraph also says Agent Server handles persistence infrastructure behind the scenes. Checkpoint saver reference · LangGraph persistence documentation
Recommended Free Tools
Provider behavior and retention are endpoint-specific
Do not assume that carrying a conversation identifier forward also carries every instruction or guarantees indefinite retention. OpenAI’s Responses API reference notes that previous_response_id does not carry forward instructions from a previous response. That detail is specific to the documented API behavior; verify the current reference for the endpoint you use. OpenAI Responses API reference
Best Value
Retention also depends on the service and endpoint. OpenAI’s data-controls documentation distinguishes abuse-monitoring retention from application-state retention; its table says Conversations API objects persist until deleted, while Responses API retention depends on storage settings and controls. Those rules should not be generalized to other providers or endpoints. OpenAI API data controls
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




