microagent volume
Last updated: 2026-06-14
microagent volume create <name> [--size-mib <n>] Create a named volumemicroagent volume list List named volumesmicroagent volume status <name> Show one volumemicroagent volume delete <name> [--force] Remove a named volumeA named volume is a platform-managed ext4 disk with a lifecycle independent of
any one workspace. It is the in-boundary analog of a container volume: instead
of hand-managing .ext4 files and passing them with --disk, you create a
volume once and attach it by name. The registry and backing disks live under
<state-dir>/volumes/ (index.json plus one <name>.ext4 per volume).
Examples
Section titled “Examples”Create, show, and delete a volume:
microagent volume create data --size-mib 2048microagent volume listmicroagent volume status datamicroagent volume delete dataGet the structured record:
microagent --json volume status data{ "name": "data", "size_mib": 2048, "created_at": "2026-06-02T00:00:00Z", "attached_to": "research"}Attaching by name
Section titled “Attaching by name”Attach a volume to a workspace with --volume <name>:/mount[:ro|rw]. A bare
name (lowercase letters, digits, and hyphens - no path separator or extension)
resolves to a managed volume; a path ending in .tar/.tar.gz/.tgz is still
treated as a bundle and .ext4/.img as a raw disk image.
microagent run --volume data:/work docker.io/library/alpine:3.21 touch /work/hellomicroagent create research --image docker.io/library/alpine:3.21 --volume data:/workA volume is single-attach: at most one running workspace holds it at a time, so two VMs never mount the same ext4 read-write. Attaching to a volume already held by a running workspace fails closed. A holder that is no longer running is reclaimed automatically, so a crashed workspace never wedges a volume. Deleting a workspace releases the volumes it held; the data persists for the next attach.
This is deliberately not the Docker volume model - there is no daemon, no volume drivers, and no concurrent sharing between workspaces.
volume delete fails closed while the volume is attached to a running workspace;
pass --force to remove it and its backing disk anyway.
You’ll rarely need flags here - --size-mib on create, --force for cleanup.
| Flag | Description |
|---|---|
--size-mib <n> | Volume size in MiB for create (default 1024) |
--force | Remove a volume even if it is attached |
--state-dir <dir> | State directory holding the workspace and volume records (default ~/.microagent/) |
See global flags for --json/--text/--output/--mode.
Exit status
Section titled “Exit status”volume subcommands exit 0 on success; nonzero when the volume cannot be
found, a name collides on create, or delete would remove a volume still attached
to a running workspace (without --force). In AX mode a failure is written as
a structured error envelope.
Related
Section titled “Related”run- attach with--volume name:/mountcreate- attach to a persistent workspace- Volumes and data - the data-flow walkthrough
- Storage - how volumes relate to disks and bundles