---
title: List agents
description: "GET`/agents` ## Code Samples ```curl curl --request GET \\ --url 'https://api.taskflow.example.com/v2/agents' \\ --header 'Authorization: Bearer YOUR_TOKEN' const response = await fetch('https://api.taskflow.example.com/v2/agents', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_TOKEN' } }); const data = await response.json(); console.log(data); import requests headers…"
url: "https://cbotai.shahrear.msf.bd/docs/list-agents/"
updated: "2026-08-20"
category: hyper active / agents
---

# List agents

GET`/agents`

## Code Samples

```curl

                curl --request GET \
  --url 'https://api.taskflow.example.com/v2/agents' \
  --header 'Authorization: Bearer YOUR_TOKEN'

                const response = await fetch('https://api.taskflow.example.com/v2/agents', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
});

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

                import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN"
}

response = requests.get("https://api.taskflow.example.com/v2/agents", headers=headers)

print(response.json())

                <?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.taskflow.example.com/v2/agents',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
  'Authorization: Bearer YOUR_TOKEN'
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

                using System.Net.Http;

var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.taskflow.example.com/v2/agents");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);

                import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.taskflow.example.com/v2/agents"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Response

```json

                [
    {
        "id": "string",
        "name": "string",
        "online": true
    }
]
```

## Responses

### 200 — Agents

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `[].id` | string | Optional |  |
| `[].name` | string | Optional |  |
| `[].online` | boolean | Optional |  |

```json

                [
    {
        "id": "string",
        "name": "string",
        "online": true
    }
]
```
