Skip to main content
Glama

Agent swarm (mixed Antigravity + Codex + Copilot + Cursor + …, parallel)

agent_swarm

Run 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

TableJSON Schema
NameRequiredDescriptionDefault
tasksYesOne 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.
watchNoIf 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_sNoPer-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_concurrencyNoMax workers running at once (default 4). Higher = faster but more quota/rate-limit pressure and more agents at once.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.30.0
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), \"cursor\", or \"grok\"\n              (alias \"xai\"; EXPERIMENTAL — see grok_ask) (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: \"read-only\" (default), \"workspace-write\", or\n              \"danger-full-access\". Codex's is an enforced OS sandbox\n              everywhere; Grok's is enforced on Linux/macOS only;\n              Copilot's and Cursor's are agent/tool-level, not OS\n              boundaries — see copilot_ask / cursor_ask / grok_ask.\n              ANTIGRAVITY is the odd one: \"read-only\" maps to agy's\n              plan mode (it investigates and writes a plan instead of\n              editing files or running commands — see antigravity_ask's\n              `plan`, and note it is agent-enforced, and needs agy\n              1.1.12+), \"danger-full-access\" states plainly that the\n              worker is unrestricted, and \"workspace-write\" is REFUSED\n              because agy has no write scoping to offer. Omitting it\n              leaves an Antigravity worker unrestricted — that is the\n              long-standing default, unlike every other backend here,\n              so fence it explicitly if you want it fenced.\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, Grok's `-m`, or\n              Antigravity's `--model` (an agy slug like\n              \"claude-sonnet-4-6\"; validated against each backend's\n              model list). Omit for each backend's default."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), \"cursor\", \"opencode\"\n              (alias \"oc\" — the one backend that needs no\n              subscription; see opencode_ask), or \"grok\" (alias\n              \"xai\"; EXPERIMENTAL — see grok_ask) (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: \"read-only\" (default), \"workspace-write\", or\n              \"danger-full-access\". Codex's is an enforced OS sandbox\n              everywhere; Grok's is enforced on Linux/macOS only;\n              Copilot's, Cursor's and opencode's are agent/tool-level,\n              not OS boundaries — see copilot_ask / cursor_ask /\n              grok_ask / opencode_ask.\n              ANTIGRAVITY is the odd one: \"read-only\" maps to agy's\n              plan mode (it investigates and writes a plan instead of\n              editing files or running commands — see antigravity_ask's\n              `plan`, and note it is agent-enforced, and needs agy\n              1.1.12+), \"danger-full-access\" states plainly that the\n              worker is unrestricted, and \"workspace-write\" is REFUSED\n              because agy has no write scoping to offer. Omitting it\n              leaves an Antigravity worker unrestricted — that is the\n              long-standing default, unlike every other backend here,\n              so fence it explicitly if you want it fenced.\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, Grok's/opencode's `-m`\n              (opencode wants \"provider/model\"), or Antigravity's\n              `--model` (an agy slug like \"claude-sonnet-4-6\";\n              validated against each backend's model list). Omit for\n              each backend's default."
    • changedInput schema / properties / timeout_s / description
      Previous value: -"Per-worker timeout in seconds. Default 180."New value: +"Per-worker timeout in seconds. Default 180. An opencode\n       worker is given at least 300s regardless — its free models are\n       queue-scheduled and were measured at 152-428s, so the shared\n       default would kill about half of them mid-answer and report a\n       slow worker as a broken one. The budget is only ever raised,\n       never lowered."
  2. Changed1 schema field changedv0.28.0
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), \"cursor\", or \"grok\"\n              (alias \"xai\"; EXPERIMENTAL — see grok_ask) (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor/Grok only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox\n              everywhere; Grok's is enforced on Linux/macOS only;\n              Copilot's and Cursor's are agent/tool-level, not OS\n              boundaries — see copilot_ask / cursor_ask / grok_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, Grok's `-m`, or\n              Antigravity's `--model` (an agy slug like\n              \"claude-sonnet-4-6\"; validated against each backend's\n              model list). Omit for each backend's default."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), \"cursor\", or \"grok\"\n              (alias \"xai\"; EXPERIMENTAL — see grok_ask) (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: \"read-only\" (default), \"workspace-write\", or\n              \"danger-full-access\". Codex's is an enforced OS sandbox\n              everywhere; Grok's is enforced on Linux/macOS only;\n              Copilot's and Cursor's are agent/tool-level, not OS\n              boundaries — see copilot_ask / cursor_ask / grok_ask.\n              ANTIGRAVITY is the odd one: \"read-only\" maps to agy's\n              plan mode (it investigates and writes a plan instead of\n              editing files or running commands — see antigravity_ask's\n              `plan`, and note it is agent-enforced, and needs agy\n              1.1.12+), \"danger-full-access\" states plainly that the\n              worker is unrestricted, and \"workspace-write\" is REFUSED\n              because agy has no write scoping to offer. Omitting it\n              leaves an Antigravity worker unrestricted — that is the\n              long-standing default, unlike every other backend here,\n              so fence it explicitly if you want it fenced.\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, Grok's `-m`, or\n              Antigravity's `--model` (an agy slug like\n              \"claude-sonnet-4-6\"; validated against each backend's\n              model list). Omit for each backend's default."
  3. Changed1 schema field changedv0.26.0
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), or \"cursor\" (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              and Cursor's are agent/tool-level, not OS boundaries — see\n              copilot_ask / cursor_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, or Antigravity's `--model`\n              (an agy slug like \"claude-sonnet-4-6\"; validated\n              against each backend's model list). Omit for each\n              backend's default."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), \"cursor\", or \"grok\"\n              (alias \"xai\"; EXPERIMENTAL — see grok_ask) (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor/Grok only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox\n              everywhere; Grok's is enforced on Linux/macOS only;\n              Copilot's and Cursor's are agent/tool-level, not OS\n              boundaries — see copilot_ask / cursor_ask / grok_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, Grok's `-m`, or\n              Antigravity's `--model` (an agy slug like\n              \"claude-sonnet-4-6\"; validated against each backend's\n              model list). Omit for each backend's default."
  4. Changed1 schema field changedv0.21.4
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), or \"cursor\" (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              and Cursor's are agent/tool-level, not OS boundaries — see\n              copilot_ask / cursor_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, or Antigravity's `--model`\n              (an agy label like \"Claude Sonnet 4.6 (Thinking)\";\n              validated against each backend's model list). Omit for\n              each backend's default."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), or \"cursor\" (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              and Cursor's are agent/tool-level, not OS boundaries — see\n              copilot_ask / cursor_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, or Antigravity's `--model`\n              (an agy slug like \"claude-sonnet-4-6\"; validated\n              against each backend's model list). Omit for each\n              backend's default."
  5. Changed1 schema field changedv0.21.0
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\", or\n              \"copilot\" (alias \"gh\"/\"github\") (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              is best-effort tool/path permissions — see copilot_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's `--model`, or Antigravity's `--model` (an agy\n              label like \"Claude Sonnet 4.6 (Thinking)\"; validated\n              against `agy models`). Omit for each backend's default."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\",\n              \"copilot\" (alias \"gh\"/\"github\"), or \"cursor\" (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot/Cursor only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              and Cursor's are agent/tool-level, not OS boundaries — see\n              copilot_ask / cursor_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's/Cursor's `--model`, or Antigravity's `--model`\n              (an agy label like \"Claude Sonnet 4.6 (Thinking)\";\n              validated against each backend's model list). Omit for\n              each backend's default."
  6. Changed1 schema field changedv0.15.4
    • changedInput schema / properties / tasks / description
      Previous value: -"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\") or \"codex\" (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex only — \"read-only\" (default), \"workspace-write\",\n              or \"danger-full-access\". Ignored for Antigravity.\n   - model:   Codex only — model override (`-m`). Ignored for Antigravity."New value: +"One object per parallel worker:\n   - backend: \"antigravity\" (alias \"agy\"/\"gemini\"), \"codex\", or\n              \"copilot\" (alias \"gh\"/\"github\") (required)\n   - prompt:  the question or instruction (required)\n   - workspace: working dir for that worker (default: server cwd)\n   - sandbox: Codex/Copilot only — \"read-only\" (default),\n              \"workspace-write\", or \"danger-full-access\". Ignored for\n              Antigravity. (Codex's is an enforced OS sandbox; Copilot's\n              is best-effort tool/path permissions — see copilot_ask.)\n   - model:   optional model override for ANY backend — Codex's `-m`,\n              Copilot's `--model`, or Antigravity's `--model` (an agy\n              label like \"Claude Sonnet 4.6 (Thinking)\"; validated\n              against `agy models`). Omit for each backend's default."
  7. Addedv0.12.2

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description exposes important behavioral traits: parallel execution with concurrency cap, per-worker labels, failed workers reported in place while others still return, and an explicit SECURITY warning about N unsandboxed agents and prompt-injection surface. It also discloses Antigravity's sandbox mapping behavior, including that omitting the sandbox leaves it unrestricted. This is rich, honest behavioral context that annotations alone do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact for the enormous surface it covers, with scannable uppercase section labels (SECURITY), inline alias lists, and default values. Every sentence carries either behavioral or routing information; the sandbox and timeout paragraphs are long but earn their length because they prevent dangerous or broken invocations. The structure front-loads the core parallel-swarm concept before caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that orchestrates N heterogeneous backends, the description covers the essential operational details: parallel semantics, failure behavior, security, per-backend sandbox caveats, model override mechanics, timeout floor, concurrency cap, and dashboard watch. The output schema exists, so the labelled-block return format mentioned in the description is sufficient without restating a full return schema. Nothing critical for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds substantial meaning beyond the structured schema: it explains backend aliases (agy/gemini, gh/github, oc, xai), per-backend sandbox enforcement differences, Antigravity's plan-mode mapping, model override syntax ('provider/model' for opencode, agy slug format), and the opencode timeout floor of 300s with measured durations. This is far beyond the baseline schema text and materially improves invocation correctness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a strong verb phrase — 'Run SEVERAL tasks IN PARALLEL across ALL backends in a single swarm' — and distinguishes the tool from every sibling *_ask / *_continue / *_status tool by naming its mixed-backend parallel-worker design. The title and body both stress the unique aggregation role, so an agent can immediately tell this orchestrates many backends at once rather than querying one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete when-to-use guidance: use it when you need several tasks run in parallel across multiple backends, and a worker is self-contained. It also explicitly warns when NOT to use it — only with trusted prompts/content, due to N unsandboxed agents. It names alternatives indirectly (opencode_ask, grok_ask, antigravity_ask, copilot_ask) for backend-specific details, which helps the agent route to sibling tools for per-backend caveats.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.