Skip to main content

Running a task

Execute tasks via CLI and HTTP API with budgets and layer selection.

Use swarm run or POST /api/swarm/run to execute work.

swarm run "Research competitor pricing" --layer research --budget 10

Options

FlagDefaultDescription
--layerautoTarget business layer
--budget25.0Max USD for the run
--simulateoffStub execution without API
--full-fanoutoffAll role clones (dangerous)

HTTP

curl -X POST http://localhost:8000/api/swarm/run \
  -H "X-SWARM-API-KEY: $SWARM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"task":"Hello","budget_usd":5,"simulate":true}'