> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archil.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Durable storage for agent frameworks

> Where LangGraph, CrewAI, the OpenAI Agents SDK, Microsoft Agent Framework and AutoGen keep state on disk, and how to put it on an Archil disk so it follows the agent across sandboxes and machines.

Popular agent frameworks can keep their state in local files: a SQLite database of checkpoints or sessions, a directory of checkpoint files, or a memory store. On a sandbox's or container's own disk, that state goes away with the machine. Mount an Archil disk and point the framework's storage path at it, and the state survives the sandbox and can be opened from another machine, with the files the agent works on stored next to it. Nothing about the framework changes except a path.

| Framework | What it keeps in files | Point it at the disk with | Guide |
| - | - | - | - |
| LangGraph | Thread checkpoints in one SQLite file (`SqliteSaver`) | `sqlite3.connect("/mnt/archil/.../checkpoints.db")` | [LangGraph](https://docs.archil.com/guides/agents/langgraph.md) |
| CrewAI | Flow state from `@persist` (`flow_states.db`) and crew memory (LanceDB) | `CREWAI_STORAGE_DIR=/mnt/archil/crewai` | [CrewAI](https://docs.archil.com/guides/agents/crewai.md) |
| OpenAI Agents SDK | Conversation history in one SQLite file (`SQLiteSession`) | `SQLiteSession(session_id, "/mnt/archil/.../sessions.db")` | [OpenAI Agents SDK](https://docs.archil.com/guides/agents/openai-agents-sdk.md) |
| Microsoft Agent Framework | Workflow checkpoints, one file each (`FileCheckpointStorage`) | `FileCheckpointStorage("/mnt/archil/.../checkpoints")` | [Microsoft Agent Framework](https://docs.archil.com/guides/agents/microsoft-agent-framework.md) |
| AutoGen | Whatever you write from `save_state()` | A JSON file under `/mnt/archil` | [AutoGen](https://docs.archil.com/guides/agents/microsoft-agent-framework.md#autogen) |

Each framework guide was run end to end: the framework wrote its state on one machine, the disk was unmounted, and a second machine mounted it and continued from that state.

## A disk or a database?

The framework state in these guides is SQLite files or plain files, so the rules are SQLite's: one writing machine per file. A default Archil mount enforces that, because it takes [exclusive access](https://docs.archil.com/concepts/sharing-disks.md) to the disk, and a second machine can't mount it for writing until the first unmounts.

| Use an Archil disk when | Use a database when |
| - | - |
| Each agent, tenant or task has its own state, and one machine works on it at a time | Many workers on different machines write the same threads or sessions at once |
| The agent also works on files (repositories, downloads, reports) that should persist and move with its state | All you persist is the framework's checkpoints or chat history |
| You want the state to follow the agent from one sandbox to the next, or to [checkpoint and branch](https://docs.archil.com/concepts/branches-and-checkpoints.md) the state and files together | You need to query state across many agents with SQL |

For the database side, each framework ships a backend: `PostgresSaver` for LangGraph, `SQLAlchemySession` or `RedisSession` for the OpenAI Agents SDK, `CosmosCheckpointStorage` for Microsoft Agent Framework, and a custom `FlowPersistence` for CrewAI. Many applications use both: a database for shared checkpoints, and an Archil disk per agent for its files, with paths to them in the state.

To run many agents in parallel on Archil, give each one [its own disk](https://docs.archil.com/guides/storage/per-tenant-storage.md) rather than sharing one SQLite file.

## Workflow engines keep state, not files

[Temporal](https://docs.temporal.io/workflow-execution/event) and [Inngest](https://www.inngest.com/docs/usage-limits/inngest) make an agent's steps durable: a crashed workflow resumes from its last completed step. They store step inputs and results, not the files the agent works on, and they limit how large those can be:

* Temporal Cloud allows at most 2 MB per request and 51,200 events or 50 MB of history per workflow, and Temporal's docs say to [store large payloads elsewhere and pass references](https://docs.temporal.io/troubleshooting/blob-size-limit-error).
* Inngest allows 4 MiB of data returned by one step and 32 MiB of state per run, and its docs say to store large results outside step state and return a reference.

An Archil disk is a natural place for those files: each step reads and writes files on the disk and returns a path. The [Temporal guide](https://docs.archil.com/guides/agents/temporal.md) runs each activity in its own sandbox with the work's disk mounted, and the disk keeps everything the work needs to resume.

## Next steps

> [card] [LangGraph](https://docs.archil.com/guides/agents/langgraph.md)
>
> LangGraph checkpoints in a SQLite file on a disk.

> [card] [CrewAI](https://docs.archil.com/guides/agents/crewai.md)
>
> Flow state and memory under CREWAI\_STORAGE\_DIR.

> [card] [OpenAI Agents SDK](https://docs.archil.com/guides/agents/openai-agents-sdk.md)
>
> Conversation history in a SQLiteSession file.

> [card] [Microsoft Agent Framework](https://docs.archil.com/guides/agents/microsoft-agent-framework.md)
>
> Workflow checkpoints that resume on another machine.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.