SQLite and PostgreSQL checkpointers
Overview
In the previous lesson, you learned how LangGraph organizes persistent execution state into checkpoints and threads. You also explored how InMemorySaver allows a graph to remember information between invocations.
However, in-memory persistence has a fundamental limitation: the information disappears when the Python process terminates.
Imagine a customer support agent deployed as a REST API. A customer discusses a delayed order, provides an order number, and returns the following day. During that time, the application server has restarted.
Without durable checkpoint storage, the agent loses the conversation. With a database-backed checkpointer, it can restore the previous state and continue helping the customer.
LangGraph provides two important relational database implementations:
SqliteSaver, which persists checkpoints in a local SQLite database.PostgresSaver, which persists checkpoints in a PostgreSQL database.
Both implement LangGraph’s checkpointing interface. Consequently, switching storage backends usually requires changing the checkpointer configuration rather than rewriting graph nodes, edges, or state reducers.
By the end of this lesson, you will understand how to configure both databases, verify persistence across restarts, integrate asynchronous database access, and make production-oriented storage decisions.
How database-backed checkpointing works
A checkpointer is an infrastructure component that sits between the graph execution engine and persistent storage.
When an invocation arrives, LangGraph identifies the thread, retrieves its existing checkpoint when available, applies the new input through the state’s reducers, and schedules graph execution. As execution progresses, checkpoint information is written back to the database according to the selected durability mode.
The following diagram illustrates the relationship between graph execution and persistent checkpoint storage.
Internally, persistence is more sophisticated than simply saving a conversation transcript.
A checkpoint can contain state channel values, channel versions, execution metadata, checkpoint identifiers, and information required to determine subsequent execution.
LangGraph also records intermediate task writes. If parallel nodes execute during the same super-step and one fails, successfully persisted writes from other nodes can support recovery without unnecessarily repeating completed work.
The checkpointer implements operations such as put(), put_writes(), get_tuple(), and list(). The graph runtime calls these operations automatically; application nodes generally do not call them directly.
Read the official checkpointer documentation for the underlying persistence interface.
Thread identity remains essential
Changing the database does not change how threads are identified.
config = {
"configurable": {
"thread_id": "conversation-001"
}
}The thread ID connects a new invocation to its previously persisted execution state.
Internally, checkpoint namespaces and checkpoint IDs further distinguish individual snapshots and subgraph execution contexts.
A thread ID is not necessarily a user ID. One user may own multiple conversations, each requiring its own thread.
Database persistence also does not automatically provide cross-thread memory. A LangGraph store serves that separate purpose.
Note: The examples target LangGraph 1.x and LangChain 1.x. Expected outputs are illustrative; live execution against PostgreSQL and the OpenAI API has not been performed here.
SQLite
What is SQLite?
SQLite is an embedded relational database engine. Unlike PostgreSQL, it does not require a separately running database server.
Python applications access SQLite directly through a database connection. Persistent data normally lives in a file on the filesystem.
This makes SQLite particularly useful for learning checkpointing because you can introduce durable storage without configuring database users, network connections, or database infrastructure.
Typical use cases include local chatbots, desktop applications, workflow prototypes, integration tests, and small internal tools.
Installing SQLite checkpoint support
Python includes the standard sqlite3 module, but LangGraph’s SQLite checkpointer is distributed separately.
Install the required packages:
pip install "langgraph>=1.0,<2" "langchain>=1.0,<2" langgraph-checkpoint-sqliteThe synchronous implementation is imported using:
from langgraph.checkpoint.sqlite import SqliteSaverThe checkpointer can initialize its required database tables automatically when first used.
Example 1: Persisting conversation state across restarts
Before introducing an LLM, build a deterministic conversational graph. This isolates checkpointing behavior from model variability, API credentials, and network failures.
The graph counts the human messages belonging to a conversation.
Save the following complete example as sqlite_demo.py.
import argparse
from pathlib import Path
from langchain.messages import HumanMessage, AIMessage
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.sqlite import SqliteSaver
parser = argparse.ArgumentParser()
parser.add_argument("thread_id")
parser.add_argument("message")
args = parser.parse_args()
DB_PATH = Path(__file__).resolve().with_name("conversations.sqlite")
def respond(state: MessagesState):
human_messages = [
message
for message in state["messages"]
if isinstance(message, HumanMessage)
]
return {
"messages": [
AIMessage(
content=f"This is message number {len(human_messages)}."
)
]
}
builder = StateGraph(MessagesState)
builder.add_node("respond", respond)
builder.add_edge(START, "respond")
builder.add_edge("respond", END)
config = {
"configurable": {
"thread_id": args.thread_id
}
}
with SqliteSaver.from_conn_string(str(DB_PATH)) as checkpointer:
graph = builder.compile(checkpointer=checkpointer)
result = graph.invoke(
{"messages": [HumanMessage(content=args.message)]},
config,
durability="sync",
)
print(result["messages"][-1].content)Execute the program three times against a fresh database:
python sqlite_demo.py customer-001 "Hello"
python sqlite_demo.py customer-001 "I need help"
python sqlite_demo.py customer-002 "Hello"Expected output:
This is message number 1.
This is message number 2.
This is message number 1.Each command starts a new Python process and constructs a new graph.
Nevertheless, the second invocation remembers the first message because both executions use the same database file and thread ID.
The third invocation starts an independent conversation because it uses a different thread ID.
Understanding the implementation
Several details are responsible for this behavior.
1. Persistent database path
DB_PATH identifies a file on disk. Using a path relative to the script prevents accidentally creating different databases when running the program from different working directories.
2. Checkpointer initialization
SqliteSaver.from_conn_string() opens the database connection and provides a checkpointer through a context manager.
The database file remains after the context manager closes.
3. Graph compilation
Passing checkpointer=checkpointer connects the graph runtime to SQLite persistence.
Without this argument, the graph would execute normally but would not restore earlier checkpointed state.
4. Message accumulation
MessagesState includes a message reducer that merges new messages with existing messages, using message IDs to recognize updates.
The client therefore sends only its newest message instead of resending the entire conversation.
5. Resource cleanup
The with statement closes the database connection when execution finishes. All graph operations requiring that connection must occur while the context is active.
File-backed SQLite versus in-memory SQLite
The following configurations have different persistence characteristics.
SqliteSaver.from_conn_string("conversations.sqlite")This uses a persistent database file.
SqliteSaver.from_conn_string(":memory:")This creates an in-memory SQLite database associated with its connection. Closing the connection destroys that database.
Although both configurations use the SQLite checkpointer, only the file-backed configuration provides the restart persistence required in this lesson.
What does SQLite actually store?
The current SQLite implementation maintains internal tables for checkpoints and intermediate writes.
Checkpoints are serialized rather than stored as ordinary, human-readable chat transcripts. Their representation includes the information required by the graph runtime.
The checkpointer also enables SQLite’s write-ahead logging mode, commonly called WAL. WAL improves concurrency between readers and writers, although SQLite still permits only one writer at a time.
You can examine the implementation in the SQLite checkpointer source.
Avoid manually modifying checkpoint tables. Their schema and serialized values are implementation details rather than a stable application-level data contract.
SQLite limitations
SQLite works well when the workload is small and the database lives on reliable local storage.
However, concurrent graph executions can generate many database writes. A single user request may produce several checkpoints, especially when an agent repeatedly invokes tools.
As write contention increases, SQLite may introduce additional latency or database-lock errors.
SQLite files inside disposable containers also disappear when those containers are replaced unless persistent storage is mounted.
For independently deployed servers that need shared conversation state, PostgreSQL is generally the more appropriate backend.
PostgreSQL
Why PostgreSQL matters
PostgreSQL is a client-server relational database designed to support concurrent applications, transactions, durable storage, and centralized database administration.
Instead of accessing a local database file, application instances connect to a PostgreSQL server through a database connection.
Consider a customer support application running three API replicas behind a load balancer.
A customer sends the first message to replica A. Their next request reaches replica B. If both replicas use the same PostgreSQL checkpoint database, the second replica can load the conversation created by the first.
The following architecture shows how multiple application instances share checkpoint storage.
Application replicas no longer need to retain conversation state exclusively in their own process memory.
This separation supports horizontal scaling, rolling deployments, and recovery from application server failures.
Installing PostgreSQL support
Install the PostgreSQL checkpointer and Psycopg 3 driver.
For the chatbot example, also install the OpenAI integration.
pip install "langgraph>=1.0,<2" "langchain>=1.0,<2" \
langgraph-checkpoint-postgres \
"psycopg[binary,pool]" \
langchain-openaiThe synchronous checkpointer is imported using:
from langgraph.checkpoint.postgres import PostgresSaverStarting a local PostgreSQL server
If you already have a PostgreSQL installation, create a database and use its connection URI.
Alternatively, Docker provides a convenient development environment.
docker run -d \
--name langgraph-postgres \
-e POSTGRES_USER=langgraph \
-e POSTGRES_PASSWORD=devpassword \
-e POSTGRES_DB=langgraph \
-p 127.0.0.1:5432:5432 \
-v langgraph_pgdata:/var/lib/postgresql/data \
postgres:17The named Docker volume preserves database files when the container is replaced, provided the volume itself is retained.
Check that PostgreSQL is ready:
docker exec langgraph-postgres \
pg_isready -U langgraph -d langgraphSet the database connection URI and model API key in your environment:
export DATABASE_URI="postgresql://langgraph:devpassword@localhost:5432/langgraph"
export OPENAI_API_KEY="your-api-key"These credentials are for local development. Production applications should use securely managed credentials and encrypted database connections.
Initializing the checkpoint schema
Unlike SQLite, PostgreSQL checkpointers require an explicit setup operation before normal use.
with PostgresSaver.from_conn_string(database_uri) as checkpointer:
checkpointer.setup()The setup method creates the required database structures and applies outstanding checkpoint schema migrations.
Run setup during initial database provisioning and when upgrading checkpointer versions that introduce schema changes.
In production, prefer a dedicated migration step rather than allowing every API replica to perform migrations simultaneously.
Example 2: A persistent PostgreSQL chatbot
This example creates an actual LLM-powered chatbot whose conversations survive application restarts.
Save it as postgres_chatbot.py.
import argparse
import os
from langchain.chat_models import init_chat_model
from langchain.messages import HumanMessage, SystemMessage
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.postgres import PostgresSaver
DATABASE_URI = os.environ["DATABASE_URI"]
def build_graph(checkpointer):
model = init_chat_model("openai:gpt-5.4-mini")
def chatbot(state: MessagesState):
messages = [
SystemMessage(
content=(
"You are a helpful customer support assistant. "
"Use facts from the conversation when answering. "
"Do not invent missing information."
)
),
*state["messages"],
]
response = model.invoke(messages)
return {"messages": [response]}
builder = StateGraph(MessagesState)
builder.add_node("chatbot", chatbot)
builder.add_edge(START, "chatbot")
builder.add_edge("chatbot", END)
return builder.compile(checkpointer=checkpointer)
def main():
parser = argparse.ArgumentParser()
commands = parser.add_subparsers(dest="command", required=True)
commands.add_parser("setup")
chat = commands.add_parser("chat")
chat.add_argument("thread_id")
chat.add_argument("message")
args = parser.parse_args()
with PostgresSaver.from_conn_string(DATABASE_URI) as checkpointer:
if args.command == "setup":
checkpointer.setup()
print("Checkpoint database initialized.")
return
graph = build_graph(checkpointer)
config = {
"configurable": {
"thread_id": args.thread_id
}
}
result = graph.invoke(
{"messages": [HumanMessage(content=args.message)]},
config,
durability="sync",
)
print("Assistant:", result["messages"][-1].content)
if __name__ == "__main__":
main()Initialize the database:
python postgres_chatbot.py setupStart a conversation:
python postgres_chatbot.py chat order-001 "My order number is ORD-8721."Continue the conversation in a separate process:
python postgres_chatbot.py chat order-001 "What is my order number?"Possible output:
Assistant: Your order number is ORD-8721.Now use a different thread:
python postgres_chatbot.py chat order-002 "What is my order number?"Possible output:
Assistant: I don't have your order number yet. Could you provide it?The database preserves the earlier human and assistant messages. The graph reconstructs the conversation state and passes that history to the model.
Notice that the system message is constructed during node execution rather than repeatedly appended to persisted conversation history.
PostgreSQL connection management
The from_conn_string() helper is convenient for scripts because it configures the connection and closes it automatically.
Long-running web applications should generally maintain database resources for the application lifecycle rather than repeatedly opening a new connection for every HTTP request.
Connection pooling allows database connections to be reused.
When supplying a manually created Psycopg connection or connection pool, include autocommit=True and row_factory=dict_row. These settings are required for correct operation of the PostgreSQL checkpointer.
See the PostgreSQL checkpointer implementation guide for connection requirements.
Async graphs
Why asynchronous checkpointing matters
An agent server spends substantial time waiting for external operations:
- LLM API responses.
- Database queries.
- Tool execution.
- External HTTP requests.
Asynchronous execution allows an application to handle other work while these operations are waiting.
LangGraph supports asynchronous execution through methods such as ainvoke(), astream(), and abatch().
For asynchronous graphs, use checkpointers that implement asynchronous persistence operations.
The corresponding implementations are:
| Synchronous checkpointer | Asynchronous checkpointer |
|---|---|
SqliteSaver |
AsyncSqliteSaver |
PostgresSaver |
AsyncPostgresSaver |
Asynchronous SQLite
Install aiosqlite if it is not already available:
pip install langgraph-checkpoint-sqlite aiosqliteThe asynchronous SQLite implementation is imported from:
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaverIt uses an asynchronous context manager and is intended for local asynchronous applications.
Asynchronous access does not eliminate SQLite’s single-writer limitation.
Example 3: Asynchronous PostgreSQL with connection pooling
The following complete example demonstrates an asynchronous chatbot with a reusable PostgreSQL connection pool.
It uses the PostgreSQL database and environment variables configured earlier. For this standalone demonstration, schema setup runs before opening the application pool.
import asyncio
import os
from psycopg.rows import dict_row
from psycopg_pool import AsyncConnectionPool
from langchain.chat_models import init_chat_model
from langchain.messages import HumanMessage
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
DATABASE_URI = os.environ["DATABASE_URI"]
model = init_chat_model("openai:gpt-5.4-mini")
async def chatbot(state: MessagesState):
response = await model.ainvoke(state["messages"])
return {"messages": [response]}
async def main():
async with AsyncPostgresSaver.from_conn_string(
DATABASE_URI
) as migration_saver:
await migration_saver.setup()
async with AsyncConnectionPool(
conninfo=DATABASE_URI,
min_size=1,
max_size=5,
open=False,
kwargs={
"autocommit": True,
"row_factory": dict_row,
"prepare_threshold": 0,
},
) as pool:
await pool.wait()
checkpointer = AsyncPostgresSaver(pool)
builder = StateGraph(MessagesState)
builder.add_node("chatbot", chatbot)
builder.add_edge(START, "chatbot")
builder.add_edge("chatbot", END)
graph = builder.compile(checkpointer=checkpointer)
async def chat(thread_id: str, message: str):
result = await graph.ainvoke(
{"messages": [HumanMessage(content=message)]},
{"configurable": {"thread_id": thread_id}},
durability="sync",
)
return result["messages"][-1].content
responses = await asyncio.gather(
chat("async-customer-a", "My name is Alice."),
chat("async-customer-b", "My name is Bob."),
)
for response in responses:
print(response)
print(
await chat(
"async-customer-a",
"What is my name?",
)
)
if __name__ == "__main__":
asyncio.run(main())Possible output:
Nice to meet you, Alice!
Nice to meet you, Bob!
Your name is Alice.The two initial requests execute concurrently using independent threads.
The follow-up request retrieves Alice’s conversation without mixing Bob’s state into it.
For a FastAPI application, the pool and compiled graph would normally be initialized during the application’s lifespan and closed during shutdown.
Connection pooling improves resource management, but it does not guarantee unlimited throughput or safe concurrent modification of the same conversation.
Choosing a checkpointer
Comparing available backends
| Characteristic | InMemorySaver | SQLite | PostgreSQL |
|---|---|---|---|
| Storage | Process memory | Database file | Database server |
| Survives process restart | No | Yes | Yes |
| Separate server required | No | No | Yes |
| Async support | Yes | Async variant | Async variant |
| Concurrent write capacity | Process-local | Limited | Higher |
| Shared across hosts | No | Not recommended | Yes |
| Backup strategy | None built in | File/database backup | Database backups and recovery |
| Operational complexity | Very low | Low | Moderate to high |
| Typical use | Tests | Local applications | Production services |
Choose InMemorySaver for fast unit tests and temporary experimentation.
Choose SQLite when persistence is required but a separate database service would add unnecessary complexity.
Choose PostgreSQL when independently deployed application instances need shared, durable state or when concurrent write workloads exceed SQLite’s practical limits.
The migration is primarily an infrastructure change because graph logic remains independent of the checkpoint backend.
However, changing the checkpointer does not automatically transfer existing checkpoint data. Migrating historical conversations requires a separate, tested migration strategy.
Operating checkpoint storage
Selecting a durability mode
The database backend determines where checkpoints are stored. The durability mode determines when execution waits for persistence.
LangGraph supports three modes:
| Mode | Persistence behavior | Typical use |
|---|---|---|
"exit" |
Persists when execution exits | Workflows that tolerate losing intermediate progress |
"async" |
Writes while subsequent execution proceeds | General-purpose agent workloads |
"sync" |
Persists checkpoints before subsequent execution proceeds | Workflows requiring stronger recovery guarantees |
For example:
result = graph.invoke(
inputs,
config,
durability="sync",
)Synchronous durability reduces the possibility of losing intermediate graph progress during an application crash, but introduces database-write latency.
Exit-only durability offers better performance for some workloads but cannot provide reliable mid-execution recovery after abrupt process termination.
Even synchronous durability depends on the database’s own commit, storage, and replication guarantees.
Refer to the durability mode documentation for precise execution semantics.
Managing concurrent requests
PostgreSQL supports concurrent database operations, but database concurrency and conversation concurrency are different problems.
Suppose two requests targeting the same thread arrive simultaneously. Both may load the same previous state and independently generate subsequent state updates.
This can create competing execution histories or incorrect conversational ordering.
For application-managed graph deployments, introduce per-thread execution coordination using a distributed lock, a partitioned task queue, or another suitable serialization mechanism.
Allow independent threads to execute concurrently while controlling overlapping runs against the same thread.
Tip: A persistent checkpointer is not an exactly-once execution mechanism. External operations such as payments, emails, and order creation still require idempotency keys or equivalent deduplication safeguards.
Controlling database growth
Checkpoint storage grows as graph executions accumulate.
A conversation containing hundreds of messages may produce numerous checkpoints containing increasingly large state values. Tool responses, retrieved documents, and large structured objects can further increase storage requirements.
Practical storage controls include:
- Storing large documents externally and retaining references in graph state.
- Summarizing or trimming conversational context where appropriate.
- Defining retention periods for inactive threads.
- Deleting expired threads through supported checkpointer operations.
- Monitoring database size and checkpoint-write latency.
For example, the synchronous database checkpointers support:
checkpointer.delete_thread("expired-conversation")The asynchronous equivalents support adelete_thread().
These operations remove checkpoint data associated with the specified thread. They do not automatically delete unrelated application records, long-term store entries, or observability traces.
Trimming current messages also does not necessarily remove their contents from historical checkpoints.
Avoid deleting arbitrary checkpoint rows through custom SQL because historical snapshots and intermediate writes may have dependencies.
Security, backups, and recovery
Checkpoint databases may contain personal information, internal business records, tool results, and sensitive conversation content.
Treat checkpoint storage as production application data.
Use encrypted connections, restricted database credentials, encrypted storage, and access-controlled backups. Enable strict checkpoint deserialization using LANGGRAPH_STRICT_MSGPACK=true where appropriate, and avoid persisting arbitrary untrusted Python objects.
Validate thread ownership before allowing an authenticated user to resume a conversation. Knowing a thread ID must not be sufficient authorization to access its contents.
For SQLite, use its supported backup mechanisms or a coordinated database backup rather than copying only the main database file during active WAL writes.
For PostgreSQL, establish automated backups, point-in-time recovery where required, and periodic restoration tests.
Track operational metrics such as database connection utilization, checkpoint-write failures, storage growth, and recovery success rates.
Deployment and lifecycle considerations
Pin compatible dependency versions and test schema migrations before releasing upgrades.
Persisted state may outlive the graph implementation that created it. Renaming nodes or changing state schemas can therefore affect previously interrupted workflows.
Test application upgrades against representative historical checkpoints before deploying them.
When using LangSmith Agent Server, persistence infrastructure is normally managed by the server. The manually configured checkpointers in this lesson primarily apply to applications that execute LangGraph directly.
Connecting to the next lesson
You now have the storage infrastructure required for the chapter’s hands-on project: a chatbot that restores previous conversations.
The database preserves more than the latest conversation text. It contains checkpoints representing the graph’s execution state at different moments.
In the next lesson, Reading, updating and listing state, you will learn how to access those checkpoints through LangGraph’s public graph APIs.
You will explore get_state(), get_state_history(), and update_state() to inspect persisted state, retrieve historical snapshots, and make controlled modifications without directly manipulating database tables.
Those capabilities will subsequently provide the foundation for time travel, replay, and forking.
Build a restart-safe chatbot
Build a conversational chatbot using MessagesState and SqliteSaver that preserves conversation history across separate program executions. Accept a thread ID and a message from command-line arguments. Verify that the same thread restores previous messages while a different thread starts a separate conversation.
# pip install "langgraph>=1.0,<2" "langchain>=1.0,<2" langgraph-checkpoint-sqlite langchain-openai
# Set OPENAI_API_KEY before running.
import argparse
from langchain.chat_models import init_chat_model
from langchain.messages import HumanMessage
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.sqlite import SqliteSaver
parser = argparse.ArgumentParser()
parser.add_argument("thread_id")
parser.add_argument("message")
args = parser.parse_args()
model = init_chat_model("openai:gpt-5.4-mini")
def chatbot(state: MessagesState):
# TODO: Invoke the model with the conversation history.
# TODO: Return the assistant message as a state update.
raise NotImplementedError
builder = StateGraph(MessagesState)
# TODO: Add the chatbot node and connect START and END.
# TODO: Open a persistent SQLite database.
# TODO: Compile the graph with the checkpointer.
# TODO: Invoke the graph using the supplied thread ID.
# TODO: Print the assistant's latest response.# pip install "langgraph>=1.0,<2" "langchain>=1.0,<2" langgraph-checkpoint-sqlite langchain-openai
# Set OPENAI_API_KEY before running.
import argparse
from pathlib import Path
from langchain.chat_models import init_chat_model
from langchain.messages import HumanMessage
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.sqlite import SqliteSaver
parser = argparse.ArgumentParser()
parser.add_argument("thread_id")
parser.add_argument("message")
args = parser.parse_args()
model = init_chat_model("openai:gpt-5.4-mini")
db_path = Path(__file__).resolve().with_name("chatbot.sqlite")
def chatbot(state: MessagesState):
response = model.invoke(state["messages"])
return {"messages": [response]}
builder = StateGraph(MessagesState)
builder.add_node("chatbot", chatbot)
builder.add_edge(START, "chatbot")
builder.add_edge("chatbot", END)
config = {
"configurable": {
"thread_id": args.thread_id
}
}
with SqliteSaver.from_conn_string(str(db_path)) as checkpointer:
graph = builder.compile(checkpointer=checkpointer)
result = graph.invoke(
{"messages": [HumanMessage(content=args.message)]},
config,
durability="sync",
)
print("Assistant:", result["messages"][-1].content)
# Save this file as chatbot.py.
#
# Run in separate terminal commands:
# python chatbot.py alice-001 "My name is Alice."
# python chatbot.py alice-001 "What is my name?"
# python chatbot.py bob-001 "What is my name?"
#
# The second invocation should remember Alice.
# The third invocation should not inherit Alice's history.Summary
- Database-backed checkpointers preserve graph state beyond the lifetime of a Python process.
- SqliteSaver provides lightweight file-based persistence suitable for local development and low-concurrency applications.
- PostgresSaver enables multiple application instances to access shared checkpoint storage.
- PostgreSQL checkpointers require an explicit setup operation to initialize and migrate their database schema.
- Asynchronous graph execution should use a checkpointer that supports asynchronous database operations.
- Reusing a thread ID restores the corresponding persisted state without requiring the client to resend conversation history.
- Production checkpoint storage requires concurrency controls, retention policies, backups, security, and appropriate durability settings.