AI / User guide
AI swarms
Coordinate multiple AI agents with explicit topology, failure handling, and run controls.
On this page
Before you begin
Prepare working agent configurations and gateway access. Decide the intended topology, task boundaries, and failure policy before starting a multi-agent run.
Get started
- Create a swarm with the intended member agents and topology.
- Set bounded execution and failure behavior.
- Start a run and observe member progress.
- Inspect member results and overall completion before acting on the output.
Operate the service
Use pause/resume and cancellation according to the run state. Inspect failed or retried members instead of treating a successful member as overall success. Keep responsibilities narrow enough that repeated work and external actions remain understandable.
Availability and limits
Execution is asynchronous and constrained by configured runtime bounds. A paused failure policy needs intervention. Recovered or retried work can have a different status from the initial attempt; inspect durable history.
Troubleshooting
For a stalled swarm, inspect queued/running members, outstanding approvals, failure policy, and gateway availability. A dead-lettered run needs diagnosis rather than an unlimited retry loop.
Next steps
Use the CLI guide to automate repeatable work, or the API guide to integrate Anchras with your own tools.
CLI commands
Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.
| Command | Purpose |
|---|---|
ai swarms list / create / get / update / delete / start / resume / cancel / run-get / runs | Durable asynchronous swarm definition, lifecycle, and run orchestration via AISwarmService. get fetches a swarm; update edits its wiring (topology/member/shard changes are rejected while a run is active); delete --delete-run-history removes a swarm (run history guarded; active runs block deletion); start --input-json queues promptly and workers execute members with topology-specific context; resume requeues a swarm paused for approval; cancel terminal-cancels a queued/running/waiting run plus its in-flight member agent runs; run-get fetches a single swarm run; runs exposes queued, running, waiting, and terminal status. Topologies: pipeline (recommended/default) flows each member's output into the next member's input; mesh executes bounded concurrent rounds and exchanges peer outputs between rounds; hierarchical uses a coordinator dispatch, concurrent worker phase, and coordinator synthesis. All three topologies use durable checkpoints and bounded worker recovery. A swarm lives in a project: list (and runs without --id) shows one (--project) and create takes --project; every member agent must be in the swarm's project, or create/update is refused with failed_precondition naming it. |
API reference
Browse procedures, request and response types, and download the complete OpenAPI contract.
