# List

List all agents in your organization.





```http
GET /api/public/v1/agents
```

## Example [#example]

<Tabs items="[&#x22;bash&#x22;, &#x22;TypeScript&#x22;, &#x22;Ruby&#x22;, &#x22;Python&#x22;, &#x22;Go&#x22;]">
  <Tab value="bash">
    ```bash
    curl -X GET https://api.nairi.ai/api/public/v1/agents \
      -H "Authorization: Bearer $NAIRI_API_KEY"
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const res = await fetch("https://api.nairi.ai/api/public/v1/agents", {
      headers: {
        Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
      },
    });
    const agents = (await res.json()) as Array<{ agent_id: string; name: string }>;
    ```
  </Tab>

  <Tab value="Ruby">
    ```ruby
    require "net/http"
    require "json"
    require "uri"

    uri = URI("https://api.nairi.ai/api/public/v1/agents")
    req = Net::HTTP::Get.new(uri)
    req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"

    res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
    agents = JSON.parse(res.body)
    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    res = requests.get(
        "https://api.nairi.ai/api/public/v1/agents",
        headers={"Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}"},
    )
    agents = res.json()
    ```
  </Tab>

  <Tab value="Go">
    ```go
    package main

    import (
    	"encoding/json"
    	"fmt"
    	"io"
    	"net/http"
    	"os"
    )

    func main() {
    	req, _ := http.NewRequest("GET", "https://api.nairi.ai/api/public/v1/agents", nil)
    	req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
    	res, _ := http.DefaultClient.Do(req)
    	defer res.Body.Close()
    	raw, _ := io.ReadAll(res.Body)
    	var agents []map[string]any
    	json.Unmarshal(raw, &agents)
    	fmt.Println(agents)
    }
    ```
  </Tab>
</Tabs>

## Response [#response]

```json
[
  {
    "id": "cci_01KEQ6963XS96YDP3NF9NKB7QJ",
    "name": "My Agent",
    "agent_id": "my-agent",
    "instances_count": 1,
    "description": "Agent description",
    "is_self_hosted": false,
    "system_prompt": null,
    "created_at": "2026-04-12T18:45:12.000Z",
    "updated_at": "2026-04-12T18:45:12.000Z"
  }
]
```

<Callout type="info">
  `description` and `system_prompt` may be `null` (or omitted entirely) when not set. Treat both as optional.
</Callout>

<Callout type="info">
  The `agent_id` field is the human-readable slug used as the `{agent_id}` path segment throughout the rest of the Agents API (for example `my-agent`). The `id` field (`cci_…`) is the resource ID and is **not** accepted in the path.
</Callout>
