跳转到主要内容
GET
/
api
/
v1
/
tasks
列出调用方在所有智能体上的全部任务。
curl --request GET \
  --url https://openapi.beeos.ai/api/v1/tasks \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "tasks": [
      {
        "task_id": "<string>",
        "agent_id": "<string>",
        "caller_id": "<string>",
        "close_reason": "<string>",
        "metadata": {},
        "created_at": "2023-11-07T05:31:56Z",
        "closed_at": "2023-11-07T05:31:56Z",
        "deadline_at": "2023-11-07T05:31:56Z"
      }
    ],
    "next_since": "<string>"
  }
}

授权

Authorization
string
header
必填

通过 Authorization: Bearer <token> header 传用户 JWToag_ User API Key。两者都由 openapi-gateway 对 Auth service 验证。

JWT 与 API Key 都是 user-scoped:每个 key(以及每个 JWT) 绑定到唯一 owner,所有路由都自动放开该 owner 名下的全部资源。 跨租户访问由 handler 内的 owner-ACL 拦截 —— API 表面没有 per-route scope 词汇。

v1.1.0 已移除: 历史 scope 词汇(agents:* / tasks:* / files:* / instances:*)以及 403 insufficient_scope 错误码已下线。已签发的 oag_ key 自动获得 owner 全权限, 无需重建。之前显式传 scopes 调用 createAPIKey 的 SDK 客户端可以直接删除该参数。详见文末 changelog 迁移说明。

查询参数

agent_id
string

把结果缩小到单个智能体。等价于直接调 GET /agents/{agentId}/tasks;放在此端点是为了让调用方 把分页逻辑在 "所有智能体" 和 "单智能体" 路径间塌缩。

Maximum string length: 128
state
enum<string>
默认值:active

按通道状态过滤。active 是 v2 open 的 legacy wire 别名;all 返回两者。默认:active

可用选项:
active,
open,
closed,
all
since
string

上一页 next_since 给的不透明分页 cursor。

limit
integer<int32>
默认值:50
必填范围: 1 <= x <= 100

响应

跨所有智能体的分页任务列表。

success
boolean
必填
data
object
必填