AnthropicClaude 托管智能体

列出会话

列出会话。使用当前 API Key 所属工作区的资源。

GET /anthropic/v1/sessions◐ 部分支持

Claude 官方文档 ↗

请求参数

  • agent_idstring可选

    query: 按智能体 ID 过滤结果。

  • agent_versionnumber可选

    query: 按智能体版本过滤;仅在同时设置 agent_id 时生效。

  • created_at[gt]string可选

    query: 只返回严格晚于该时间创建的记录。

  • created_at[gte]string可选

    query: 只返回不早于该时间创建的记录。

  • created_at[lt]string可选

    query: 只返回严格早于该时间创建的记录。

  • created_at[lte]string可选

    query: 只返回不晚于该时间创建的记录。

  • deployment_idstring可选

    query: 部署 ID(路径或查询参数)。

  • include_archivedboolean可选

    query: 是否包含已归档的记录。

  • memory_store_idstring可选

    query: 记忆库 ID(路径或查询参数)。

  • orderstring可选

    query: 按创建时间排序:asc 从旧到新,desc 从新到旧(默认)。

  • ▸ 更多参数(3)
    • statusesarray可选

      query: 按会话状态过滤,可重复该参数匹配多种状态。

    • limitnumber可选

      query: 每页返回的条数上限。

    • pagestring可选

      query: 分页游标,取自上一页响应的 next_page。

返回

200

支持 limit、page 与 agent_id;agent_version、时间范围、deployment_id、memory_store_id、include_archived、order、statuses 尚不支持,传入返回 400。

错误按 Claude Managed Agents 格式返回,参见 错误码

响应

HTTP 200

Successful response

application/json

名称类型说明
dataarray<object>
data[].idstring
data[].agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
data[].created_atstringA timestamp in RFC 3339 format
data[].environment_idstring
data[].metadataobject
data[].outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
data[].resourcesarray<object>
data[].statsobjectTiming statistics for a session.
data[].statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
data[].titlenull | string
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].usageobjectCumulative token usage for a session across all turns.
data[].vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
data[].deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.
next_pagestring | null