AnthropicClaude 托管智能体
工作项统计
读取一个环境任务队列的统计信息(待领、执行中、已完成等)。
GET
/anthropic/v1/environments/{environment_id}/work/stats○ 未支持请求参数
environment_idstring必填path: 环境 ID(路径或查询参数)。
返回
501 平台还没有实现这个端点;调用会得到下面这个响应:
这是自托管执行器领取任务的协议;平台的智能体都在平台上执行,不支持自托管执行器。调用会返回 501(not_implemented_error),不产生副作用,官方 SDK 不会重试。
错误按 Claude Managed Agents 格式返回,参见 错误码
响应
HTTP 200
Successful response
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| depth | number | Number of work items waiting to be picked up (lag from consumer group) |
| oldest_queued_at | null | string | RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty |
| pending | number | Number of work items being processed (polled but not acknowledged) |
| type | string | The type of object |
| workers_polling | null | number | Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests. |