---
title: "List swarms, newest first"
url: https://hexelstudio.com/docs/api/harness/swarms/list
---

# List swarms, newest first

**GET** `/harness/swarms`

## Query parameters

- `limit: optional integer`

  Default: `50`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Returns

`200` The swarms. (`object`)

- `swarms: array of Swarm`

  - `agent: string`

  - `board: optional any`

    Any JSON value.

  - `budget: any`

    Any JSON value.

  - `capabilities: array of string`

  - `created_at: string`

  - `created_by: string`

  - `end_reason: optional string`

  - `environment_id: string`

  - `failure_rule: FailureRule`

    - `max_attempts: integer`

    - `on_failure: string`

    - `then: string`

  - `goal: string`

  - `goal_digest: optional string`

  - `id: string`

  - `max_concurrency: integer`

  - `member_budget: any`

    Any JSON value.

  - `org_id: string`

  - `outputs: optional any`

    Any JSON value.

  - `pattern: string`

    One of: `"map"`, `"lead_workers"`, `"pipeline"`, `"board"`

  - `progress: SwarmProgress`

    - `blocked: optional integer`

    - `budget_usd: number`

    - `cancelled: integer`

    - `cost_usd: number`

    - `done: integer`

    - `escalated: integer`

    - `failed: integer`

    - `items: optional BoardStatus`

      - `done: integer`

      - `failed: integer`

      - `open: integer`

      - `total: integer`

    - `queued: integer`

    - `skipped: integer`

    - `stages: optional array of StageProgress`

      - `done: integer`

      - `failed: integer`

      - `skipped: integer`

      - `stage: string`

      - `state: string`

      - `total: integer`

      - `working: integer`

    - `summary: string`

    - `total: integer`

    - `working: integer`

  - `reduce: optional any`

    Any JSON value.

  - `sandbox_template: optional string`

  - `stages: optional any`

    Any JSON value.

  - `state: string`

    One of: `"running"`, `"waiting"`, `"succeeded"`, `"failed"`, `"cancelled"`

  - `updated_at: string`

  - `waiting_reason: optional string`

  - `worker_agent: optional string`

  - `workspace_id: string`

## Errors

- `default` 

## Example

```bash
curl --request GET \
  --url 'https://api.hexelstudio.com/v1/harness/swarms' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID'
```

### Response (200)

```json
{
  "swarms": [
    {
      "agent": "string",
      "board": "string",
      "budget": "string",
      "capabilities": [
        "string"
      ],
      "created_at": "2026-01-01T00:00:00Z",
      "created_by": "string",
      "end_reason": "string",
      "environment_id": "string",
      "failure_rule": {
        "max_attempts": 0,
        "on_failure": "string",
        "then": "string"
      },
      "goal": "string",
      "goal_digest": "string",
      "id": "string",
      "max_concurrency": 0,
      "member_budget": "string",
      "org_id": "string",
      "outputs": "string",
      "pattern": "map",
      "progress": {
        "blocked": 0,
        "budget_usd": 0,
        "cancelled": 0,
        "cost_usd": 0,
        "done": 0,
        "escalated": 0,
        "failed": 0,
        "items": {
          "done": 0,
          "failed": 0,
          "open": 0,
          "total": 0
        },
        "queued": 0,
        "skipped": 0,
        "stages": [
          {
            "done": 0,
            "failed": 0,
            "skipped": 0,
            "stage": "string",
            "state": "string",
            "total": 0,
            "working": 0
          }
        ],
        "summary": "string",
        "total": 0,
        "working": 0
      },
      "reduce": "string",
      "sandbox_template": "string",
      "stages": "string",
      "state": "running",
      "updated_at": "2026-01-01T00:00:00Z",
      "waiting_reason": "string",
      "worker_agent": "string",
      "workspace_id": "string"
    }
  ]
}
```
