Skip to main content
Glama

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

agent_swarm

Run multiple AI agent tasks at once across different backends, returning each worker's answer in one labelled block so parallel coding or research work finishes in a single call.

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, opencode and Muse 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), "grok" (alias "xai"; EXPERIMENTAL — see grok_ask), or "muse" (alias "meta"; EXPERIMENTAL — see muse_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; Muse's read-only switches its write, shell and web tools off — see copilot_ask / cursor_ask / grok_ask / opencode_ask / muse_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/Muse'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 card per worker, with its backend's logo; click a card 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.32.1
    • 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\", \"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."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), \"grok\" (alias\n              \"xai\"; EXPERIMENTAL — see grok_ask), or \"muse\" (alias\n              \"meta\"; EXPERIMENTAL — see muse_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; Muse's read-only switches its write,\n              shell and web tools off — see copilot_ask / cursor_ask /\n              grok_ask / opencode_ask / muse_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/Muse'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 / watch / description
      Previous value: -"If true, open the live \"Agent Swarm\" dashboard window (one row per\n   worker, with a backend badge; click a row for its full step log)."New value: +"If true, open the live \"Agent Swarm\" dashboard window (one card per\n   worker, with its backend's logo; click a card for its full step log)."
  2. 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."
  3. 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."
  4. 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."
  5. 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."
  6. 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."
  7. 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."
  8. Addedv0.12.2

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false) by disclosing partial-failure behavior ('A worker that fails is reported in place; the others still return'), the concurrency cap, and a security warning that this launches N unsandboxed agents with N times the prompt-injection surface. This is exactly the kind of behavioral context annotations cannot carry.

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

Conciseness4/5

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

Front-loaded with the core action, then failure semantics, then the security caveat. Every sentence carries weight, though the SECURITY block leans on an external module note rather than being fully self-contained.

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

Completeness4/5

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

For a complex parallel-dispatch tool with an output schema (so return shape needn't be explained), the description covers purpose, failure isolation, concurrency, and the key safety constraint. It leaves the exact composition of the 'labelled block' return to the output schema, which is acceptable.

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

Parameters3/5

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

Schema description coverage is 100% and the schema itself documents tasks, watch, timeout_s and max_concurrency in exhaustive detail, so the description's only added meaning is the concurrency cap reference. Baseline 3 is appropriate given the schema carries the semantic load.

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?

States a specific verb and resource ('Run SEVERAL tasks IN PARALLEL across ALL backends in a single swarm') and immediately contrasts it with the single-backend siblings like codex_ask / cursor_ask by explaining that each task names its own backend. An agent can distinguish it from the *_ask and preset_swarm tools from the first sentence.

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

Usage Guidelines4/5

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

Makes the use case explicit (many tasks, mixed backends, concurrent execution with a concurrency cap) and adds a clear when-NOT-to-use constraint ('Only use it with trusted prompts on trusted content'). It does not name sibling alternatives such as preset_swarm or the individual backend_ask tools, so the routing is implied rather than spelled out.

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