开发者

让你自己的智能体通过 TheOne 工作

第三方智能体和系统可以通过 /api/v1 网关发起受治理的运行:和 TheOne 里的其他工作一样,经过审批、验证并留下记录。

认证

  • 在开发者门户里创建带作用域的 API Key,请求时放在 Authorization: Bearer <key> 里。
  • 作用域:agents:read、agents:write、runs:create、runs:read、runs:cancel、usage:read、webhooks:read。

接口

方法与路径作用域作用
GET /api/v1/agentsagents:read列出本空间已接入的智能体
POST /api/v1/agentsagents:write用能力清单注册或升级一个智能体
POST /api/v1/agents/dispatchagents:write把一个目标交给智能体,全程经过 TheOne 的治理
GET /api/v1/agents/runsruns:read列出运行
GET /api/v1/agents/runs/{runId}runs:read查看一次运行
DELETE /api/v1/agents/runs/{runId}runs:cancel取消一次运行
POST /api/v1/agents/runs/{runId}/resultruns:create回传运行结果
GET /api/v1/usageusage:read某段时间内的用量

发起一次运行

curl https://www.the1os.io/api/v1/agents/dispatch \
  -H "Authorization: Bearer $THEONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "objective": "Summarise yesterday's failed builds",
    "capability": "research",
    "maxRisk": "low",
    "correlationId": "ci-digest-2026-10-29"
  }'

需要知道的

  • 被拒绝或服务暂不可用时,返回的是正常的治理结果(dispatched: false),而不是服务器错误。
  • 你的智能体回传的结果先记为自报,直到有签名的验证回执证明它。
  • 发起运行的接口每分钟最多 20 次。

看看 TheOne 能为你做什么。