AgentKit Studio
参考

控制协议

139 个 operation id 的完整清单,按 25 个域分组,每条给出 Host 侧处理器位置。

传输约定

控制通道固定为 /agentkit,共 139 个 operation id,分布在 25 个域。

约定值源码
控制通道/agentkitsrc/contracts/operations.mjs:144
请求信封{ operationId, payload },payload 必须是可序列化 JSONsrc/contracts/wire.mjs
响应信封{ ok: true, value } 或 { ok: false, error }src/contracts/wire.mjs
取消第四个参数 AbortSignal;取消后只回一个终态信封,不重试未知副作用src/contracts/definitions.mjs:8
幂等list / get / status / *.history 只读;其余按 operation 语义—

域摘要

25 个域,按 operation 数量降序。sessions 与 agents 承担了大部分交互面。

域条数说明
host2Host 发现与计算机操作入口。
templates6专家模板的目录、准备、导出与召唤。
platform1跨模板共享的平台资源视图。
template-resources3模板声明资源的列出、准备与安装。
template-workflows6模板工作流的启动、状态、取消与缓存。
teams8专家团的保存、启动、状态、历史与停止。
team-templates2专家团模板的列表与详情。
sessions24会话导出、原生恢复、子任务、A2A、审批与命令输出。最大的一个域。
agents11Agent 的本地与云端生命周期、执行策略与会话视图。
models5模型目录、凭证同步与 Codex 模型目录。
resources2资源目录的列出与删除。
mcp4MCP Server 的创建、更新、探测与删除。
credentials1凭证写入。
settings2全局设置的读取与更新。
skills5Skill 的发现、预览、提交与安装预览。
plugins12DSH 与 Codex 插件的安装、启用、禁用与移除。
star-harness5本机 Star Harness 的安装、启用与工作区绑定。只有 Studio 宿主所有者可调用。
builds4构建创建、列出、下载与可移植导出。
operations2长操作的列出与取消。
schedules8计划任务的增删改查、手动触发与投递目标。
traces4调用链概览、列表、详情与 OTLP 接收。
evaluations6评测创建、查询、目标、评测集与导入。
channels4渠道连接、更新与动作。
server1服务端动作入口。
deployments11部署的准备、创建、更新、对账、日志与删除。

全量清单

处理器一列是 Host 侧分发入口;括号里的说明表示该域由前缀匹配统一处理,或该 id 已退役。

域operation id操作处理器
hosthost/compatibility查询兼容性src/host/routes/host.mjs:7
hosthost/computer操作计算机src/host/routes/host.mjs:9
templatestemplates/list列出src/host/routes/templates.mjs:8
templatestemplates/prepare准备src/host/routes/templates.mjs:12
templatestemplates/export导出src/host/routes/templates.mjs:15
templatestemplates/avatar读取头像src/host/routes/templates.mjs:11
templatestemplates/summon-plan生成召唤计划src/host/routes/templates.mjs:13
templatestemplates/summon召唤src/host/routes/templates.mjs:14
platformplatform/resources列出资源src/host/routes/templates.mjs:19
template-resourcestemplate-resources/list列出src/host/routes/templates.mjs:10(前缀分发)
template-resourcestemplate-resources/prepare准备src/host/routes/templates.mjs:10(前缀分发)
template-resourcestemplate-resources/install安装src/host/routes/templates.mjs:10(前缀分发)
template-workflowstemplate-workflows/start启动src/host/routes/templates.mjs:9(前缀分发)
template-workflowstemplate-workflows/status查询状态src/host/routes/templates.mjs:9(前缀分发)
template-workflowstemplate-workflows/cancel取消src/host/routes/templates.mjs:9(前缀分发)
template-workflowstemplate-workflows/detail读取详情src/host/routes/templates.mjs:9(前缀分发)
template-workflowstemplate-workflows/cache读取缓存src/host/routes/templates.mjs:9(前缀分发)
template-workflowstemplate-workflows/clearCache清空缓存src/host/routes/templates.mjs:9(前缀分发)
teamsteams/list列出src/host/routes/templates.mjs:7(前缀分发)
teamsteams/save保存src/host/routes/templates.mjs:7(前缀分发)
teamsteams/remove移除src/host/routes/templates.mjs:7(前缀分发)
teamsteams/start启动src/host/routes/templates.mjs:7(前缀分发)
teamsteams/status查询状态src/host/routes/templates.mjs:7(前缀分发)
teamsteams/history读取历史src/host/routes/templates.mjs:7(前缀分发)
teamsteams/resume恢复src/host/routes/templates.mjs:7(前缀分发)
teamsteams/stop停止src/host/routes/templates.mjs:7(前缀分发)
team-templatesteam-templates/list列出src/host/routes/templates.mjs:6(前缀分发)
team-templatesteam-templates/detail读取详情src/host/routes/templates.mjs:6(前缀分发)
sessionssessions/export-log导出转录src/host/routes/sessions.mjs:16
sessionssessions/native-inject注入原生事件src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-recovery-status查询恢复状态src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-recovery-resume恢复原生会话src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-recovery-reconcile对账原生恢复src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-background-review后台复核src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-resource-retire回收原生资源src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-workspace-repair修复工作区src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-conversation-status查询对话状态src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-conversation-rewind回退对话src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-conversation-workspace-preview预览工作区src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-a2a-control控制 A2Asrc/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/dsh-a2a-history读取 A2A 历史src/host/routes/sessions.mjs:9
sessionssessions/dsh-a2a-control控制 DSH A2Asrc/host/routes/sessions.mjs:9
sessionssessions/native-child-tasks列出子任务src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-promote提升子任务src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-send向子任务发消息src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-cancel取消子任务src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-history读取子任务历史src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-result读取子任务结果src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-child-file读取子任务文件src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-command-output读取命令输出src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-approval-status查询审批状态src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
sessionssessions/native-approval-decision提交审批决策src/host/routes/sessions.mjs:7(已退役,抛 STUDIO_LEGACY_HARNESS_RETIRED)
agentsagents/list列出src/host/routes/agents.mjs:94
agentsagents/create-local创建本地src/host/routes/agents.mjs:21
agentsagents/update-cloud更新云端src/host/routes/agents.mjs:49
agentsagents/ensure-preset确保预设存在src/host/routes/agents.mjs:123
agentsagents/managed-delete删除托管资源src/host/routes/agents.mjs:67
agentsagents/execution-policy读取执行策略src/host/routes/agents.mjs:97
agentsagents/execution-policy-set设置执行策略src/host/routes/agents.mjs:107
agentsagents/conversation-surface读取对话视图src/host/routes/agents.mjs:146
agentsagents/local-get读取本地src/host/routes/agents.mjs:21
agentsagents/update-local更新本地src/host/routes/agents.mjs:21
agentsagents/local-delete删除本地src/host/routes/agents.mjs:8
modelsmodels/sync-credential同步凭证src/host/routes/models.mjs:4
modelsmodels/credential-status查询凭证状态src/host/routes/models.mjs:6
modelsmodels/create创建src/host/routes/models.mjs:8
modelsmodels/catalog读取目录src/host/routes/models.mjs:14
modelsmodels/codex读取 Codex 目录src/host/routes/models.mjs:18
resourcesresources/list列出src/host/routes/resources.mjs:8
resourcesresources/delete删除src/host/routes/resources.mjs:36
mcpmcp/create创建src/host/routes/resources.mjs:23
mcpmcp/update更新src/host/routes/resources.mjs:27
mcpmcp/probe探测src/host/routes/resources.mjs:32
mcpmcp/delete删除src/host/routes/resources.mjs:36
credentialscredentials/put写入src/host/routes/credentials.mjs:2
settingssettings/get读取src/host/routes/models.mjs:10
settingssettings/update更新src/host/routes/models.mjs:12
skillsskills/discover发现src/host/routes/skills.mjs:4
skillsskills/preview-discovered预览未提交项src/host/routes/skills.mjs:4
skillsskills/commit-discovered提交已发现项src/host/routes/skills.mjs:4
skillsskills/list列出src/host/routes/skills.mjs:4
skillsskills/preview-installed预览已安装项src/host/routes/skills.mjs:4
pluginsplugins/dsh-list列出 DSH 插件src/host/routes/plugins.mjs:7
pluginsplugins/dsh-discover发现 DSH 插件src/host/routes/plugins.mjs:9
pluginsplugins/dsh-index-refresh刷新远程索引src/host/routes/plugins.mjs:11
pluginsplugins/dsh-install安装 DSH 插件src/host/routes/plugins.mjs:13
pluginsplugins/dsh-remove移除 DSH 插件src/host/routes/plugins.mjs:15
pluginsplugins/dsh-enable启用 DSH 插件src/host/routes/plugins.mjs:17
pluginsplugins/dsh-disable禁用 DSH 插件src/host/routes/plugins.mjs:17
pluginsplugins/dsh-update更新 DSH 插件src/host/routes/plugins.mjs:21
pluginsplugins/codex-list列出 Codex 插件src/host/routes/plugins.mjs:32
pluginsplugins/codex-inspect检查 Codex 插件src/host/routes/plugins.mjs:32
pluginsplugins/codex-install安装 Codex 插件src/host/routes/plugins.mjs:25
pluginsplugins/codex-remove移除 Codex 插件src/host/routes/plugins.mjs:25
star-harnessstar-harness/status查询状态src/host/routes/star-harness.mjs:4
star-harnessstar-harness/install安装src/host/routes/star-harness.mjs:8
star-harnessstar-harness/enable启用src/host/routes/star-harness.mjs:9
star-harnessstar-harness/bind绑定工作区src/host/routes/star-harness.mjs:10
star-harnessstar-harness/unbind解绑工作区src/host/routes/star-harness.mjs:11
buildsbuilds/create创建src/host/routes/builds.mjs:5
buildsbuilds/list列出src/host/routes/builds.mjs:5
buildsbuilds/download下载src/host/routes/builds.mjs:5
buildsbuilds/export-portable导出可移植包src/host/routes/builds.mjs:5
operationsoperations/list列出src/host/routes/builds.mjs:5
operationsoperations/cancel取消src/host/routes/builds.mjs:5
schedulesschedules/list列出src/host/routes/schedules.mjs:15
schedulesschedules/create创建src/host/routes/schedules.mjs:19
schedulesschedules/get读取src/host/routes/schedules.mjs:21
schedulesschedules/update更新src/host/routes/schedules.mjs:23
schedulesschedules/delete删除src/host/routes/schedules.mjs:25
schedulesschedules/run触发运行src/host/routes/schedules.mjs:27
schedulesschedules/occurrences读取触发记录src/host/routes/schedules.mjs:29
schedulesschedules/delivery-targets列出投递目标src/host/routes/schedules.mjs:6
tracestraces/overview读取概览src/host/routes/traces.mjs:10
tracestraces/list列出src/host/routes/traces.mjs:21
tracestraces/get读取src/host/routes/traces.mjs:23
tracestraces/otlp接收 OTLPsrc/host/routes/traces.mjs:25
evaluationsevaluations/list列出src/host/routes/evaluations.mjs:9
evaluationsevaluations/create创建src/host/routes/evaluations.mjs:19
evaluationsevaluations/get读取src/host/routes/evaluations.mjs:11
evaluationsevaluations/targets列出目标src/host/routes/evaluations.mjs:13
evaluationsevaluations/evalsets读取评测集src/host/routes/evaluations.mjs:15
evaluationsevaluations/import导入src/host/routes/evaluations.mjs:17
channelschannels/connection读取连接src/host/routes/channels.mjs:9
channelschannels/update更新src/host/routes/channels.mjs:11
channelschannels/agent-update更新 Agent 关联src/host/routes/channels.mjs:13
channelschannels/action执行动作src/host/routes/channels.mjs:15
serverserver/action执行动作src/host/routes/server.mjs:5
deploymentsdeployments/prepare准备src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/create创建src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/prepareUpdate预检更新src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/applyUpdate应用更新src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/list列出src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/get读取src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/refresh刷新src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/repairAccess修复访问src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/reconcile对账src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/logs读取日志src/host/routes/deployments.mjs:4(前缀分发)
deploymentsdeployments/remove移除src/host/routes/deployments.mjs:4(前缀分发)

退役与仅契约的 id

有 21 个 id 仍然保留在契约里,但 Host 分发会直接抛 STUDIO_LEGACY_HARNESS_RETIRED(src/host/routes/sessions.mjs:8)。这是故意的:老客户端拿到可识别的错误码,而不是 404。

不要依赖退役 id

sessions/native-* 属于已移除的进程内 Harness。新集成请改用对应运行时的原生会话接口,见会话事件。

版本与兼容性

项值说明
operation id 数139新增或删除都是破坏性变更
域数25新增域需要同步本页与路由
通道/agentkit客户端硬编码,不可配置

开发者入口

内容源码位置
operation 列表src/contracts/operations.mjs
wire 编解码src/contracts/wire.mjs
operation 定义src/contracts/definitions.mjs
Host 路由src/host/routes/index.mjs
客户端桥接src/remote/control-client.mjs

相关测试:

测试文件位置
host-compatibility.test.mjstests/host-compatibility.test.mjs
host-route-contracts.test.mjstests/host-route-contracts.test.mjs
studio-wire-contracts.test.mjstests/studio-wire-contracts.test.mjs
host-dispatcher.test.mjstests/host-dispatcher.test.mjs
host-route-contracts.test.mjstests/host-route-contracts.test.mjs
local-agent-edit-conflicts.test.mjstests/local-agent-edit-conflicts.test.mjs

本页导航