The three standard mounts
Every agent session gets exactly these three, and no others. Products cannot add mount points; they only configure the scope of/workspace (below).
Read-only mounts are enforced at the filesystem level: an agent cannot write to
/data or
/opt/swarm/contracts. The runtime never varies these mounts by memory, model, or
anything else; the workspace class is the only thing that changes /workspace.
Runtime-owned host storage, such as the artifact repository (
/var/lib/swarm/artifacts,
SWARM_ARTIFACT_ROOT) written by artifact_repo_commit, is not
one of these mounts and is never exposed to agents. Agents reach committed artifacts only
through opaque swarm-artifact:// URLs, never a raw host path.Isolation: per-agent vs per-flow-instance
The one configurable dimension is the scope of/workspace:
per-agentgives each agent its own private/workspace, invisible to every other agent. Use it when an agent’s working files are its own business.per-flow-instanceshares one/workspaceamong all agents in the same flow instance, and isolates it from other instances. Use it when collaborators on the same item need a shared scratch space (one fulfillment instance’s agents share files; a different order’s instance cannot see them).
per-agent workspace is never visible to another agent; a
per-flow-instance workspace is visible only to agents in that instance. /data and
/opt/swarm/contracts are always global and read-only regardless of class.
Choosing the scope: workspace_classes
You declare workspace classes inpolicy.yaml and reference one from an agent. Each class sets
the /workspace scope; that is the only thing a class controls.
policy.yaml
workspace_class an agent names must be defined here, or boot fails
(workspace_class_exists). At boot the platform also checks that
/data is readable, that contracts are loaded, and that each agent’s /workspace can be created
at its declared scope; it aborts if any mount cannot be satisfied.
Lifecycle
/workspace lifecycle follows the scope and the agent’s memory setting:
- per-agent: created when the agent is registered, cleaned up when the agent terminates.
It persists across turns for
memory: trueagents, and is ephemeral per task formemory: false. - per-flow-instance: created when the instance is created, and preserved when the instance terminates (for post-mortem). Nothing cleans it up automatically.
Deployment and configuration
Mount paths are invariant:/workspace, /data, and /opt/swarm/contracts are the same on a
laptop, in Docker, and in production. Only the backing storage changes.
A contract that runs on local dev runs on Docker and production without changes.
Docker backing (the claude_cli runtime)
When the runtime spawns containers (the Claude CLI runtime, selected with --backend claude_cli), it creates one per workspace
from a base image, on a shared network, and reuses it by name. The defaults are overridable.
These Docker-backing variables are read from the process environment — they are deployment
settings, not swarm.yaml keys.
Container identity
Platform-created containers are labeled so recovery and reset tools identify them by label, not by name guessing.- Kinds:
scaffold,system,entity,agent,flow. Filter withdocker ps --filter label=dev.swarm.container.kind=agent. - Names: per-agent workspaces are
swarm-agent-<id>; per-flow-instance workspaces areswarm-flow-<path>. - Labels:
dev.swarm.owner,dev.swarm.container.kind,dev.swarm.reset.eligible, plus lineage (dev.swarm.run_id,dev.swarm.entity_id,dev.swarm.agent_id,dev.swarm.flow_instance).
Agents and sessions
Session scoping and conversation modes, the other half of agent isolation.
Policy
Where
workspace_classes and permission_bundles are declared.
