@persist save their state to a SQLite database, flow_states.db, and crew memory is stored with LanceDB in a memory directory. Both go under one storage directory, which you choose with the CREWAI_STORAGE_DIR environment variable. Point it at an Archil disk, and a flow started in one sandbox resumes in another with its state intact.
Run one machine against the storage directory at a time:
flow_states.db is a SQLite file, and CrewAI’s docs say
a fixed knowledge folder allows one process at a time. To run many crews at once, give each its own disk. If many
machines must write the same flow state concurrently, write a custom FlowPersistence backed by a database such as
Postgres.Mount a disk
Create a disk in the Archil console and save a disk token for it. Then mount it on the machine that runs the crew:- Any Linux host
- Archil sandbox
Your own server, a container with FUSE access, or another provider’s sandbox. See Mount on Linux for the requirements.
Point CrewAI’s storage at the disk
Install CrewAI and set the storage directory to a path on the disk:@persist() saves the flow’s state after each method, and passing an id in the inputs resumes the flow with that ID:
flow.py
Resume on another machine
Unmount the disk, which flushes every write to Archil, and mount it on a different machine. In an Archil sandbox, stopping or deleting the sandbox does the same; the disk and its data are kept. Then resume the flow by its ID:What’s on the disk
One writer at a time
By default, a mount takes exclusive access to the disk, so a second machine can’t mount it for writing while the first one has it. That matches what CrewAI’s local storage expects: SQLite’s file locks don’t extend across machines, and a fixed knowledge folder serves one process. A secondarchil mount while the disk is mounted elsewhere stops with a message about revoking the other client’s delegations.
To run many crews at once, give each crew, tenant or task its own disk and its own CREWAI_STORAGE_DIR. If many machines must write the same flows concurrently, implement CrewAI’s FlowPersistence interface on a database such as Postgres, and keep the crew’s files on the disk.
Next steps
Agent frameworks
What LangGraph, the OpenAI Agents SDK and Microsoft Agent Framework keep in files.
LangGraph
LangGraph checkpoints in a SQLite file on a disk.
Sharing disks
Exclusive, shared and conditional mounts.
Per-tenant storage
One disk per tenant, provisioned through the API.