---
title: "List the environment's agents with their channels"
url: https://hexelstudio.com/docs/api/harness/agents/list
---

# List the environment's agents with their channels

**GET** `/harness/agents`

## 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 agents. (`object`)

- `agents: array of Agent`

  - `channels: map[array of Target]`

  - `created_at: string`

  - `created_by: string`

  - `id: string`

  - `latest_version: integer`

  - `name: string`

  - `registry_agent_id: optional string`

## Errors

- `default` 

## Example

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

### Response (200)

```json
{
  "agents": [
    {
      "channels": {
        "key": [
          {
            "version": 0,
            "weight": 0
          }
        ]
      },
      "created_at": "2026-01-01T00:00:00Z",
      "created_by": "string",
      "id": "string",
      "latest_version": 0,
      "name": "string",
      "registry_agent_id": "string"
    }
  ]
}
```
