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

# 列出子智能体

> 检索智能体会话内启动的全部子智能体。每个子智能体都是拥有自身消息历史的独立子智能体。

子智能体是在会话内生成的子智能体。此接口列出全部子智能体，让你检查父会话中有哪些子智能体处于活跃或已完成状态。

## 接口

```http theme={null}
GET /v1/agents/sessions/{session_id}/subagents
```

## 认证

传递 `Authorization: Bearer <api-key>` 或 `Authorization: ApiKey <key>` 之一。

## 路径参数

<ParamField path="session_id" type="string" required>
  智能体会话标识符。
</ParamField>

## 响应

<ResponseField name="object" type="string">
  恒为 `list`。
</ResponseField>

<ResponseField name="data" type="array">
  子智能体对象数组。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://agent.example.com/v1/agents/sessions/sess_01J5X8/subagents \
    -H "Authorization: Bearer <api-key>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "sub_01D",
        "session_id": "sess_01J5X8",
        "status": "active",
        "created_at": "2024-06-01T12:35:00Z"
      }
    ]
  }
  ```
</ResponseExample>
