> ## Documentation Index
> Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agent Groups

Use this API to list all agent groups in the workspace. Returns `IAgentGroupSummary[]` — the full `agentIds` array is intentionally **stripped** from each row and replaced with an `agentCount` field, so list payloads stay O(1) per group regardless of group size.

To fetch the complete `agentIds` array for a specific group, call [Get Group](/api-reference/rest-apis/v2/agents/groups/get).

# Endpoint

`POST https://api.velt.dev/v2/agents/groups/list`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  Empty object — only the `apiKey` (injected from headers) is required.
</ParamField>

## **Example Requests**

#### List all groups

```JSON theme={null}
{
  "data": {}
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Agent groups fetched successfully",
    "data": {
      "groups": [
        {
          "id": "grp_9f3ac2",
          "name": "Brand QA",
          "description": "All brand-quality agents",
          "agentCount": 12,
          "metadata": {
            "apiKey": "ak_xxx",
            "organizationId": "server_org_001",
            "documentId": "server_doc_001"
          },
          "createdAt": 1711900000000,
          "updatedAt": 1711900000000
        },
        {
          "id": "grp_a72bc1",
          "name": "Accessibility Suite",
          "agentCount": 4,
          "metadata": { "apiKey": "ak_xxx" },
          "createdAt": 1711800000000,
          "updatedAt": 1711800000000
        }
      ]
    }
  }
}
```

| Field         | Type      | Description                      |
| ------------- | --------- | -------------------------------- |
| `data.groups` | object\[] | Array of group summary documents |

Each summary contains `id`, `name`, `description?`, `agentCount`, `metadata`, `createdAt`, `updatedAt`. The full `agentIds` array is omitted; fetch it via [Get Group](/api-reference/rest-apis/v2/agents/groups/get).

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Agent groups fetched successfully",
      "data": {
        "groups": []
      }
    }
  }
  ```
</ResponseExample>
