> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snorbe.deskrex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# エージェント一覧取得

> ワークスペース内のエージェント一覧を取得します

# エージェント一覧取得

指定したワークスペースに属するエージェントの一覧を返します。

## リクエスト

```
GET /api/v1/agent/list
```

### ヘッダー

| ヘッダー            | 必須 | 説明                             |
| --------------- | -- | ------------------------------ |
| `Authorization` | はい | `Bearer snorbe_...` 形式の API キー |

<Note>
  ワークスペースは API キーに紐づくものが自動的に使用されます。パラメータは不要です。
</Note>

## レスポンス

```json theme={null}
[
  {
    "id": "clxxx123456",
    "name": "Research Agent",
    "isDefault": true,
    "createdAt": "2026-01-15T10:30:00.000Z",
    "updatedAt": "2026-03-20T14:22:00.000Z"
  },
  {
    "id": "clxxx789012",
    "name": "Patent Analyst",
    "isDefault": false,
    "createdAt": "2026-02-10T08:00:00.000Z",
    "updatedAt": "2026-02-10T08:00:00.000Z"
  }
]
```

### レスポンスフィールド

| フィールド       | 型         | 説明              |
| ----------- | --------- | --------------- |
| `id`        | `string`  | エージェント ID       |
| `name`      | `string`  | エージェント名         |
| `isDefault` | `boolean` | デフォルトエージェントかどうか |
| `createdAt` | `string`  | 作成日時（ISO 8601）  |
| `updatedAt` | `string`  | 更新日時（ISO 8601）  |

## 使用例

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://app.snorbe.deskrex.ai/api/v1/agent/list" \
    -H "Authorization: Bearer snorbe_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://app.snorbe.deskrex.ai/api/v1/agent/list",
      headers={"Authorization": "Bearer snorbe_your_api_key_here"},
  )
  agents = resp.json()
  for agent in agents:
      print(f"{agent['name']} (default: {agent['isDefault']})")
  ```

  ```typescript TypeScript theme={null}
  const resp = await fetch("https://app.snorbe.deskrex.ai/api/v1/agent/list", {
    headers: { Authorization: "Bearer snorbe_your_api_key_here" },
  });
  const agents = await resp.json();
  for (const agent of agents) {
    console.log(`${agent.name} (default: ${agent.isDefault})`);
  }
  ```
</CodeGroup>

## エラーレスポンス

| HTTP ステータス | コード                 | 説明                    |
| ---------- | ------------------- | --------------------- |
| 401        | `UNAUTHORIZED`      | API キーが無効、期限切れ、または未指定 |
| 429        | `TOO_MANY_REQUESTS` | レート制限超過               |
