# start_cloud_swarm

URL: https://codepanel.ai/docs/mcp-server/start_cloud_swarm

The CodePanel MCP tool that fans out up to 50 items across parallel cheap-model workers with a maxUsd cap and optional digest.

`start_cloud_swarm` starts a parallel cheap-model swarm over 1 to 50 independent items under a soft per-batch `maxUsd` cap, with an optional coordinator digest pass. It needs the `tasks:write` scope.

## When to call it

- **To triage a batch of tickets, logs, or PRs** in parallel using a cheap worker model.
- **To synthesize one consolidated digest** across many independent items without burning frontier-model context.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | yes | Short label for the swarm run |
| `prompt` | string | yes | Shared system instruction applied to every item |
| `items` | array of objects, at most 50 | yes |  |
| `items[].id` | string | yes | Stable item id (e.g. ticket or PR id) |
| `items[].input` | string | yes | Item payload passed to the worker model |
| `workerProvider` | string | no | Worker provider id, from list_models |
| `workerModel` | string | no | Worker model id, from list_models |
| `coordinatorProvider` | string | no | Optional coordinator provider id to synthesize a single digest |
| `coordinatorModel` | string | no | Optional coordinator model id to synthesize a single digest |
| `concurrency` | integer, at most 10 | no | Parallel batch size (1-10) |
| `maxUsd` | number | no | Soft per-batch spend cap in USD (checked between batches) |

It writes: the server marks it `readOnlyHint: false` and `destructiveHint: true` (it can change what is already there), so a client that asks before writes asks here.

## What it returns

`swarm`: the queued cloud swarm summary (`id`, `title`, `status`, `workerProvider`, `workerModel`, `coordinatorProvider`, `coordinatorModel`, `totalItems`, `completedItems`, `failedItems`, `usd`, `maxUsd`, `digest`, `error`, `createdAt`, `endedAt`). Poll it with [`get_cloud_swarm`](/docs/mcp-server/get_cloud_swarm).

## The same step without MCP

| Surface | Form |
| --- | --- |
| HTTP API | `POST /cloud/swarms` with the `tasks:write` scope |
| CLI | `codepanel cloud-swarm start --title "..." --prompt "..." id1=input1` |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Use it to fan out a shared prompt over 1 to 50 independent items in parallel on a cheap worker model (with an optional coordinator digest pass) under a soft per-batch maxUsd budget cap. Great for ticket triage, PR verification, or log clustering. Runs on your own provider keys, not CodePanel credits; refused while agents are paused or once the day cap is spent, and maxUsd is cut to what is left of the day. Returns the queued swarm summary; poll with get_cloud_swarm. Needs tasks:write.

## Related

- [`get_cloud_swarm`](/docs/mcp-server/get_cloud_swarm): read one cloud swarm's digest and per-item results.
- [`list_cloud_swarms`](/docs/mcp-server/list_cloud_swarms): list recent cloud swarms.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
