Swarms API
Swarms let you group multiple agents into a coordinated unit. Use swarms to orchestrate multi-agent workflows where agents collaborate on tasks.All swarm endpoints require session authentication and are scoped to the authenticated user’s data through row-level security.
List swarms
Response
Swarm object
| Field | Type | Description |
|---|---|---|
id | string | Unique swarm identifier |
name | string | Swarm display name |
description | string | null | Optional description of the swarm |
agents | string[] | Array of agent IDs that belong to this swarm |
enabled | boolean | Whether the swarm is currently active |
createdAt | string | ISO 8601 creation timestamp |
Errors
| Code | Description |
|---|---|
| 401 | Unauthorized |
| 500 | Failed to fetch swarms |
Create swarm
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Swarm name. Must be between 1 and 100 characters |
description | string | No | Optional description |
agents | string[] | No | Array of agent IDs to include in the swarm. Defaults to an empty array |
config | object | No | Optional configuration object |
Response
Returns201 Created with the new swarm object:
Errors
| Code | Description |
|---|---|
| 400 | Name is required or exceeds 100 characters |
| 401 | Unauthorized |
| 500 | Failed to create swarm |