All comparisons

Best durable storage for LangGraph, CrewAI and AutoGen agents (2026)

For a framework's checkpoints and chat history shared by many workers, Postgres is the best default: LangGraph's docs recommend PostgresSaver for production, and the OpenAI Agents SDK has SQLAlchemySession. When each agent's state belongs to that agent, and the agent also works on files, an Archil disk is the better fit: every major framework can keep its state in local files (LangGraph's SqliteSaver, CrewAI's CREWAI_STORAGE_DIR, Microsoft Agent Framework's FileCheckpointStorage, the Agents SDK's SQLiteSession), and on a mounted Archil disk those files survive the sandbox and open on the next machine, with one writing machine per SQLite file. Redis and MongoDB are the alternatives with official checkpointers, Mem0 and Zep handle long-term memory rather than checkpoints, and Amazon S3 holds finished files.

Updated . Competitor facts are from each vendor's own docs and pricing pages.

The short list

  1. PostgreSQL: Best for checkpoints and chat history that many workers read and write, so any worker can serve the next turn of any thread
  2. Archil: Best for agents whose state belongs to them, in the framework's SQLite or checkpoint files plus the files the agent works on, that should survive the sandbox and continue on the next machine
  3. Redis: Best for frequently read thread state and checkpoints that should expire on their own
  4. MongoDB: Best for teams already running MongoDB who want checkpoints, memory and sessions in it
  5. Mem0: Best for long-term memory: what agents should remember about users across sessions
  6. Zep: Best for memory that tracks how facts about users and data change over time
  7. Amazon S3: Best for finished files an agent writes once and other services read: reports, generated media, exported state

Side by side

OptionBest forFramework supportMany writers on one threadHolds the agent's filesPricing basis
PostgreSQLCheckpoints and chat history shared by many workersLangGraph PostgresSaver and PostgresStore; Agents SDK SQLAlchemySession; CrewAI through a custom FlowPersistenceYesNo; store pathsYour database
ArchilSQLite state and files that follow one agent across sandboxesEvery framework's file-based storage, unchanged: SqliteSaver, CREWAI_STORAGE_DIR, SQLiteSession, FileCheckpointStorageOne writing machine per SQLite fileYes$0.20 per GiB-month of active data; $0.07 per GB out on Developer and Team
RedisHot state and checkpoints that should expireLangGraph RedisSaver and RedisStore; Agents SDK RedisSession; Agent Framework RedisHistoryProvider (preview)YesNoYour Redis server or a hosted one
MongoDBTeams already on MongoDBLangGraph MongoDBSaver and MongoDBStore; Agents SDK MongoDBSession; CrewAI crewai-mongodb-memoryYesNoYour database
Mem0Long-term memory about usersAny framework through its SDKYes, through its APINoOpen source (Apache 2.0); managed Free plan, then Custom
ZepMemory as a temporal context graphAny framework through its SDKYes, through its APINoFree 10,000 credits a month; Flex $125 a month
Amazon S3Finished files written once and read laterNone for checkpoints; any code through an SDKLast write wins on the same keyYes, as whole objects$0.023 per GB-month (S3 Standard, us-east-1)

What to look for

  • What you're storing

    Agent frameworks persist three different things: checkpoints or chat history for each thread, long-term memory recalled across threads, and the files an agent's tools work on. No single backend is best at all three, so we rank by the most common need first, thread state, and say which job each option does well.

  • Many writers on the same thread

    If any of many workers may serve the next turn of a thread, every worker writes the same store at once. A database handles that. A SQLite file takes one writing machine; SQLite's own docs say its locks have operated incorrectly on some network file systems and recommend a client/server database such as PostgreSQL when data is separated from the application by a network.

  • Survives the sandbox

    Frameworks' file-based defaults write to the machine's local disk, which disappears with a sandbox or container. A durable option keeps the state after the machine is gone and lets another machine open it.

  • First-party framework support

    An official checkpointer, session or persistence class means no glue code. Support differs: LangGraph has the most backends, CrewAI's documented defaults are local files, and AutoGen hands you a dictionary to store.

  • Room for files

    Checkpoints and workflow histories are for small state. Repositories, datasets and reports need storage built for files, with only their paths kept in the framework's state.

Each option in detail

1. PostgreSQL

docs.langchain.com

Best for: checkpoints and chat history that many workers read and write, so any worker can serve the next turn of any thread

Postgres is where LangGraph points you for production. Its persistence guide says to use a persistent checkpointer in production and lists PostgresSaver for PostgreSQL and SqliteSaver for local, file-based development storage; the checkpointer reference calls PostgresSaver the choice for production workloads with full checkpoint history. PostgresStore holds memory across threads in the same database, and LangSmith's Agent Server stores checkpoints in PostgreSQL by default. The OpenAI Agents SDK offers SQLAlchemySession for production apps with existing databases.

Strengths

  • Many concurrent writers to the same threads, with transactions
  • Official LangGraph checkpointer and store, so one database holds each thread's state and memory shared across threads
  • Stateless workers: any of them can resume any thread by its ID
  • SQL across every agent's state, for dashboards and audits

Tradeoffs

  • Not for files: keep repositories, datasets and reports elsewhere and store their paths in state
  • CrewAI's documented default is a local SQLite file, so Postgres needs your own FlowPersistence; Microsoft Agent Framework ships in-memory, file and Azure Cosmos DB checkpoint storage, not Postgres
  • PostgresSaver needs setup() on first use, with autocommit=True and row_factory=dict_row on the connection, per its README
  • A database to run, size and back up, or a managed one to pay for

Best for: agents whose state belongs to them, in the framework's SQLite or checkpoint files plus the files the agent works on, that should survive the sandbox and continue on the next machine

Every framework here can keep its state in local files, and an Archil disk makes those files durable without changing the framework. Mount the disk and point the storage path at it: sqlite3.connect("/mnt/archil/checkpoints.db") for LangGraph's SqliteSaver, CREWAI_STORAGE_DIR=/mnt/archil/crewai for CrewAI's flow database and memory, SQLiteSession(user_id, "/mnt/archil/sessions.db") for the OpenAI Agents SDK, or FileCheckpointStorage("/mnt/archil/checkpoints") for Microsoft Agent Framework. When the sandbox stops, the state and the agent's files are on the disk, and the next machine that mounts it continues the thread, flow, session or workflow. Archil's framework guides run each of these end to end on one machine, then a second. The disk is a POSIX file system backed by object storage, with an SSD layer replicated across Availability Zones, and a default mount takes exclusive access, so only one machine writes at a time, which is what SQLite needs.

Strengths

  • Works with each framework's own file-based storage: only a path changes, with no new service or schema
  • The state and the agent's files live together, so one checkpoint or branch of an Archil-managed disk (about 13 ms and 33 ms at p50) captures both
  • Mounts on any Linux host, in containers, other providers' sandboxes and Kubernetes; in Archil sandboxes the root filesystem is a durable disk too
  • The exclusive default mount stops a second machine from writing the same SQLite file by accident
  • Readable over the S3 API and the SDKs, so services that don't mount the disk can still read the files

Tradeoffs

  • One writing machine per SQLite file. Many workers serving the same threads at once belong in Postgres or another database
  • LangGraph's docs describe SqliteSaver as for development and small projects; on Archil it outlives the machine, but it's still SQLite
  • Archil's multi-writer SQLite integration (@archildata/sqlite) is TypeScript-only and AWS-only, so it doesn't help Python frameworks
  • Not a memory layer: facts recalled by meaning need Mem0, Zep or a framework store
  • Unmount (or stop the Archil sandbox) before another machine takes over, so buffered writes are flushed
  • Data transfer out of Archil costs $0.07 per GB on Developer and Team; Enterprise private networking avoids it

3. Redis

redis.io

Best for: frequently read thread state and checkpoints that should expire on their own

Redis maintains langgraph-checkpoint-redis, with RedisSaver, AsyncRedisSaver, a shallow saver that keeps only each thread's latest checkpoint, and RedisStore for memory. A default_ttl, in minutes, expires old checkpoints; without one they stay until you delete them. The OpenAI Agents SDK lists RedisSession for memory shared across workers and services, and Microsoft Agent Framework has a preview RedisHistoryProvider that stores a session's transcript.

Strengths

  • In-memory reads and writes for state that every turn touches
  • TTLs clean up abandoned threads without a sweeper job
  • Backends for LangGraph, the Agents SDK and Agent Framework

Tradeoffs

  • Needs JSON and the Redis Query Engine: built into Redis 8, otherwise Redis Stack
  • Durability depends on configuration: Redis's docs say RDB snapshots can lose the latest minutes of data and AOF with fsync every second can lose one second
  • Checkpoints written by version 0.1.x of the package can't be read by 0.2.0 and later
  • No CrewAI backend, and not for files

4. MongoDB

github.com

Best for: teams already running MongoDB who want checkpoints, memory and sessions in it

langgraph-checkpoint-mongodb provides MongoDBSaver, and langgraph-store-mongodb provides MongoDBStore for long-term memory with vector search. LangSmith's Agent Server can switch its checkpoints from Postgres to MongoDB. The OpenAI Agents SDK lists MongoDBSession, and CrewAI's memory docs list an optional MongoDB backend, crewai-mongodb-memory.

Strengths

  • Official LangGraph checkpointer and store, plus backends for the Agents SDK and CrewAI memory
  • Documents fit nested agent state
  • Vector search for memory in the same database

Tradeoffs

  • Another database to run if you don't already have one
  • CrewAI flow state still needs your own FlowPersistence
  • Not for files

5. Mem0

github.com

Best for: long-term memory: what agents should remember about users across sessions

Mem0 calls itself the memory layer for AI agents. It extracts memories from conversations and returns the relevant ones at query time, as an open-source library under Apache 2.0, a self-hosted server or a hosted platform. The open-source library uses Qdrant as its vector database when none is configured. It complements a checkpointer rather than replacing one: the thread's exact state still needs Postgres, Redis or a file.

Strengths

  • Extraction and retrieval built in, rather than a raw vector store
  • Open source, or managed
  • Works with any framework through its SDK

Tradeoffs

  • Stores extracted memories, not checkpoints, transcripts or files
  • The managed Free plan has monthly add and retrieval limits (10,000 adds and 1,000 retrievals in the first 30 days); graph memory is on the Custom plan
  • Needs an LLM to extract memories

Best for: memory that tracks how facts about users and data change over time

Zep describes itself as a context layer that organizes context in temporal context graphs, built on Graphiti, its open-source framework for temporal knowledge graphs. Like Mem0, it's memory to retrieve, not a checkpointer.

Strengths

  • Facts tracked over time, not just stored
  • Graphiti is open source
  • Retrieval and storage cost no credits

Tradeoffs

  • Zep Community Edition, the self-hosted version, is deprecated, so Zep itself is a hosted service; BYOC is on Enterprise
  • Priced in credits: Free has 10,000 a month, Flex is $125 a month for 50,000 and Flex Plus $375 a month for 200,000
  • Not for checkpoints or files

Best for: finished files an agent writes once and other services read: reports, generated media, exported state

S3 has strong read-after-write consistency and the lowest price per GB here. It isn't a place for framework state: no framework above ships an S3 checkpointer, SQLite needs a file system, and S3 objects are written whole. Mountpoint for Amazon S3 doesn't support renaming files in general purpose buckets, writes that don't start at the beginning of a file, or POSIX file locks.

Strengths

  • S3 Standard is $0.023 per GB-month in us-east-1
  • Every service and analytics tool reads it
  • Strongly consistent for PUT and DELETE

Tradeoffs

  • No object locking for concurrent writers: the request with the latest timestamp wins, and there are no atomic updates across keys
  • Tools that edit files in place, including SQLite, can't run on a bucket
  • No first-party checkpointer or session for any of these frameworks

What each framework keeps in files by default

LangGraph: InMemorySaver loses checkpoints when the process restarts. SqliteSaver, from langgraph-checkpoint-sqlite, writes them to one SQLite file. Archil's LangGraph guide puts that file on a disk.

CrewAI: @persist saves flow state to a local SQLite database, and memory is stored with LanceDB under ./.crewai/memory, or $CREWAI_STORAGE_DIR/memory. Knowledge uses a temporary folder per process unless you fix its path, and a fixed folder allows one process at a time. Archil's CrewAI guide sets CREWAI_STORAGE_DIR to a disk.

OpenAI Agents SDK: SQLiteSession("user_123") is in memory and lost when the process ends; SQLiteSession("user_123", "conversations.db") writes to a file. Archil's Agents SDK guide puts that file on a disk.

Microsoft Agent Framework: workflows checkpoint after every superstep, to in-memory, file or Azure Cosmos DB storage; FileCheckpointStorage requires a directory and has no default. AutoGen's README says it's in maintenance mode and points new users to Agent Framework; AutoGen's save_state() returns a dictionary you store yourself. Archil's Agent Framework guide resumes a failed workflow on a second machine from checkpoints on a disk.

Where the files go when you use Temporal or Inngest

Workflow engines make an agent's steps durable, not its files. Temporal keeps each workflow's event history, an append-only log that survives crashes, and replays it to continue. Temporal Cloud caps a request at 2 MB and a workflow's history at 51,200 events or 50 MB, and Temporal's docs say to offload large payloads to an object store and pass references.

Inngest saves each step's result so a run resumes after a failure, with at most 4 MiB returned by one step and 32 MiB of state per run. Its docs say to store large results outside step state and return a reference.

So with either engine, the files need their own home. With an Archil disk, each step reads and writes files on the disk and returns a path, and whichever worker runs the next step mounts the same disk. Archil's Temporal guide runs each activity in its own sandbox with the work's disk mounted, so a retried activity finds the files and the agent's session where the last attempt left them.

Using a database and a disk together

Many agent products use both. A Postgres checkpointer holds each thread's state, so any worker can serve the next turn, and each agent, tenant or task gets its own Archil disk for the files it works on, with their paths in the checkpoint. When each agent's state is its own and one machine works on it at a time, the checkpoint file can live on the disk too, and the database isn't needed.

Which one should you use?

If you needPick
LangGraph threads that many workers serve at oncePostgreSQL with PostgresSaver
Agents SDK sessions shared across workersPostgreSQL with SQLAlchemySession, or Redis with RedisSession
Framework state and the agent's files that should follow it from one sandbox to the nextArchil, with the framework's SQLite or checkpoint files on the disk
CrewAI flows and memory that survive the containerArchil, with CREWAI_STORAGE_DIR on the disk; a custom FlowPersistence for many concurrent machines
Microsoft Agent Framework checkpoints that resume on another machineArchil with FileCheckpointStorage, or Azure Cosmos DB for many processes
Hot state that should expireRedis
Checkpoints and memory in a MongoDB you already runMongoDB
What agents remember about users across sessionsMem0 or Zep
Finished outputs read by other servicesAmazon S3
Files for Temporal or Inngest stepsArchil, with paths in the workflow state

Questions people ask

What durable storage works with LangGraph, CrewAI and AutoGen?

For thread checkpoints shared by many workers, Postgres: LangGraph has PostgresSaver, and CrewAI and AutoGen can save to it with a little code. For state that belongs to one agent at a time, put the framework's own files on an Archil disk: LangGraph's SqliteSaver file, CrewAI's CREWAI_STORAGE_DIR, or the JSON from AutoGen's save_state(). Redis and MongoDB also have LangGraph checkpointers, and Mem0 or Zep add long-term memory.

Where does CrewAI store memory and flow state?

In local files. Memory uses LanceDB under ./.crewai/memory, or $CREWAI_STORAGE_DIR/memory, and flows decorated with @persist save to a local SQLite database. Set CREWAI_STORAGE_DIR to a path on a durable disk, such as an Archil disk, and both survive the container. See Archil's CrewAI guide.

Can I use LangGraph's SqliteSaver in production?

LangGraph's docs describe SqliteSaver as for development and small projects and recommend PostgresSaver for production. On a sandbox's local disk, the SQLite file is lost with the sandbox; on an Archil disk it survives and opens on the next machine. It's still SQLite, so keep one writing machine per file, and use Postgres when many workers serve the same threads.

How do I keep agent state when the sandbox or container restarts?

Write it somewhere outside the machine. Either use a database-backed checkpointer or session, such as Postgres or Redis, or mount a durable disk and point the framework's file storage at it. With an Archil disk, the agent's files persist too, and the next sandbox that mounts the disk continues where the last one stopped.

Is SQLite on a network file system safe for agent state?

With one writing machine per database file, yes. SQLite's docs warn that its locks have operated incorrectly on some network file systems and that WAL mode needs every process on the same host. A default Archil mount gives one machine exclusive access to the disk, which keeps to that rule. For many machines writing the same database, SQLite's docs recommend a client/server database such as PostgreSQL.

What's the difference between checkpoints and agent memory?

Checkpoints save a thread's exact state so it can resume, time travel or wait for a human. Memory is what an agent recalls across threads, usually facts about users, retrieved by relevance. Postgres, Redis, MongoDB or a SQLite file hold checkpoints; Mem0, Zep and framework stores such as LangGraph's PostgresStore hold memory.

Where should files go when I use Temporal or Inngest for agents?

Outside the workflow state. Temporal Cloud caps a request at 2 MB and Inngest a step's result at 4 MiB, and both say to store large data elsewhere and pass a reference. Put the files on a disk every worker can mount, such as an Archil disk, and keep paths in the workflow. See Archil's Temporal guide.

How we chose

We ranked storage backends by how well they hold what agent frameworks persist: thread checkpoints and chat history first, then long-term memory and files, and weighed concurrent writers, surviving the sandbox, first-party framework support and room for files. Framework behavior comes from the LangGraph, CrewAI, OpenAI Agents SDK, Microsoft Agent Framework and AutoGen docs and READMEs, and competitor facts and prices from each vendor's docs, READMEs and pricing pages as of the date above, including the Redis, MongoDB, Mem0, Zep, Temporal, Inngest, Amazon S3 and SQLite pages linked on this page. Archil's facts come from docs.archil.com. Archil makes Archil. It ranks second: Postgres is the better default for thread state that many workers share, and Archil is the better pick when each agent's state and files belong together and should follow it across sandboxes.