# List agents

> GET https://api.nabrah.ai/api/ext/agent

Group: Agents. Page: https://www.nabrah.ai/en/docs/api-reference/agents/list-agents

Returns a brief listing of every agent in the workspace tied to your API key. Agents are the voice/chat AI configurations that define how a call behaves (persona, goal, voice, language, linked tools and analysis groups). Use this endpoint as the entry point for discovering agents and obtaining the `agent_id` values that the per-agent endpoints (get, update, delete, link analysis groups) require. The response is a flat array of compact summaries; call GET /api/ext/agent/{agent_id} to retrieve the full configuration of any single agent.

## Authentication & scope

These endpoints are scoped to a single project by your API key.

- **X-API-Key header is required**: Send your Web API key (prefixed `nb_`) in the `X-API-Key` header on every request. Keys are generated in the dashboard under the Developers tab and are bound to exactly one project/workspace, so no `project_id` is passed — the project is derived from the key. Validate a key with GET /api/ext/test.

## Response shape

The body is a JSON array of AgentBrief objects (not a wrapped/paginated object).

- **Fields per item**: Each item contains the agent identifier and lightweight metadata. There is no server-side pagination on this endpoint — all agents in the project are returned in one array. Fields: `agent_id`, `name`, `created_at`, `last_update`, `created_by_email`, `enable_ticket_creation`.

Use the `agent_id` from this list anywhere an agent ID is required.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Response

### 200 Successful Response

Content type: `application/json`

```json
[
  {
    "agent_id": "00000000-0000-4000-8000-000000000000",
    "name": "string",
    "created_at": "2026-01-15T12:00:00.000Z",
    "last_update": "2026-01-15T12:00:00.000Z",
    "created_by_email": "string",
    "enable_ticket_creation": false
  }
]
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/agent' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/agent"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/agent", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/agent", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
