Skip to content

actx swarm

Orchestrate multi-agent workstreams from a YAML or JSON manifest. The swarm engine handles dependency resolution, file-lock isolation, write-scope conflict detection, and agent subprocess lifecycle management.

Terminal window
actx swarm <subcommand>
SubcommandDescription
start --manifest <path>Parse a manifest and dispatch agent subprocesses
statusShow active agents and workstream status
OptionRequiredDescription
--manifest <path>YesPath to YAML or JSON swarm manifest file
phase: 23
workstreams:
- id: ws-auth
name: "Implement Auth Module"
role: implementer
scope:
files: ["src/auth/**"]
depends: []
exit: ["tests pass", "no lint errors"]
agents:
- id: agent-1
typeId: implementer
busy: false
  1. Manifest parsing — validates workstream definitions and agent pool
  2. Isolation check — detects write-scope overlaps between concurrent workstreams
  3. Dependency resolution — uses the Dispatcher to order workstreams by depends graph
  4. File locking — acquires exclusive locks on each workstream’s scoped files
  5. Agent spawning — launches subprocess per assignment with environment context (ACTX_WORKSTREAM, ACTX_ROLE, ACTX_PHASE, ACTX_SCOPE, ACTX_GIT_BRANCH)
  6. Completion tracking — monitors exit codes and releases locks on completion
CodeMeaning
MANIFEST_NOT_FOUNDManifest file does not exist
MANIFEST_PARSE_ERRORYAML/JSON syntax error
MANIFEST_INVALIDMissing required fields (id, name, role)
NO_WORKSTREAMSNo workstreams defined or all are blocked
ISOLATION_CONFLICTTwo or more workstreams have overlapping write scopes
LOCK_CONFLICTFile lock already held by another agent
SPAWN_FAILEDAgent subprocess failed to start