Agent swarm (mixed Antigravity + Codex + Copilot + Cursor + …, parallel)
agent_swarmRun multiple coding tasks in parallel across all supported backends. Set concurrency, per-worker timeouts, and sandboxing; each worker returns a labelled answer, failures reported without blocking.
Instructions
Run SEVERAL tasks IN PARALLEL across ALL backends in a single swarm.
Each task is its own worker and names the backend to run on, so one swarm can
mix Antigravity (Gemini), Codex, Copilot, Cursor, Grok and opencode workers —
they run truly concurrently (capped at max_concurrency) and every answer comes
back in one labelled block. A worker that fails is reported in place; the others
still return.
SECURITY: this launches N unsandboxed agents at once — N times the prompt-injection surface of a single call (see the module SECURITY note). Only use it with trusted prompts on trusted content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tasks | Yes | One object per parallel worker: - backend: "antigravity" (alias "agy"/"gemini"), "codex", "copilot" (alias "gh"/"github"), "cursor", "opencode" (alias "oc" — the one backend that needs no subscription; see opencode_ask), or "grok" (alias "xai"; EXPERIMENTAL — see grok_ask) (required) - prompt: the question or instruction (required) - workspace: working dir for that worker (default: server cwd) - sandbox: "read-only" (default), "workspace-write", or "danger-full-access". Codex's is an enforced OS sandbox everywhere; Grok's is enforced on Linux/macOS only; Copilot's, Cursor's and opencode's are agent/tool-level, not OS boundaries — see copilot_ask / cursor_ask / grok_ask / opencode_ask. ANTIGRAVITY is the odd one: "read-only" maps to agy's plan mode (it investigates and writes a plan instead of editing files or running commands — see antigravity_ask's `plan`, and note it is agent-enforced, and needs agy 1.1.12+), "danger-full-access" states plainly that the worker is unrestricted, and "workspace-write" is REFUSED because agy has no write scoping to offer. Omitting it leaves an Antigravity worker unrestricted — that is the long-standing default, unlike every other backend here, so fence it explicitly if you want it fenced. - model: optional model override for ANY backend — Codex's `-m`, Copilot's/Cursor's `--model`, Grok's/opencode's `-m` (opencode wants "provider/model"), or Antigravity's `--model` (an agy slug like "claude-sonnet-4-6"; validated against each backend's model list). Omit for each backend's default. | |
| watch | No | If true, open the live "Agent Swarm" dashboard window (one row per worker, with a backend badge; click a row for its full step log). | |
| timeout_s | No | Per-worker timeout in seconds. Default 180. An opencode worker is given at least 300s regardless — its free models are queue-scheduled and were measured at 152-428s, so the shared default would kill about half of them mid-answer and report a slow worker as a broken one. The budget is only ever raised, never lowered. | |
| max_concurrency | No | Max workers running at once (default 4). Higher = faster but more quota/rate-limit pressure and more agents at once. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |