Caller Quick Start 适合谁?
它适合希望把外部能力接进 Agent、但还不想先部署完整 Platform 的团队。页面使用 Local Mode 演示最小调用闭环,方便先验证协议体验。
跑一次本地 hotline,看一份 result_package,理解协议怎么帮你省掉「每根 API 单独拼接」的工。所有命令都来自 repos/client,可直接复制粘贴。
这页教你做什么
第四仓库(superproject)已经把 client / protocol / platform 三仓做了 submodule,本地一次安装即可。
git clone --recursive https://github.com/hejiajiudeeyu/delegated-execution-dev.git
cd delegated-execution-dev
corepack pnpm installcd repos/client
npm installrepos/client,等价于在第四仓库根用 corepack pnpm --dir repos/client --filter @delexec/ops exec ... 。supervisor 是 client 端的本地守护进程,负责运行 caller controller、responder controller、ops 控制台。Console 原型也是连它。
# 可选:把本机状态隔离到一个独立目录,避免污染默认 ~/.delexec
export DELEXEC_HOME="$HOME/.delexec-quickstart"
export OPS_PORT_SUPERVISOR=8179
DELEXEC_HOME="$DELEXEC_HOME" \
OPS_PORT_SUPERVISOR="$OPS_PORT_SUPERVISOR" \
npm run ops -- start supervisor listening on 127.0.0.1:8179 即 OK。supervisor 第一次跑要做一次 setup,之后用 X-Ops-Session 标识当前管理员会话。
BASE="http://127.0.0.1:${OPS_PORT_SUPERVISOR:-8079}"
# 第一次跑:初始化 + 拿 session
curl -s -X POST "$BASE/setup" -H 'content-type: application/json' -d '{}'
SESSION=$(curl -s -X POST "$BASE/auth/session/setup" \
-H 'content-type: application/json' -d '{}' | jq -r '.session')
echo "$SESSION"
export OPS_SESSION="$SESSION" repos/client/docs/current/guides/local-mode-onboarding.md。即使是 Local Mode,protocol 也要求 Caller 有明确身份;这一步会在 DELEXEC_HOME 下生成本地账号。
npm run ops -- auth register --local --email [email protected]curl -s -X POST "$BASE/auth/register-caller" \
-H 'content-type: application/json' \
-H "X-Ops-Session: $OPS_SESSION" \
-d '{ "email": "[email protected]" }'Local Mode 下,让本机同时扮演 Responder,挂一条用于联调的 workspace-summary 示例 hotline。生产场景里这一步是 Marketplace 上拉到的真实能力。
# 启用 responder 角色
curl -s -X POST "$BASE/responder/enable" \
-H 'content-type: application/json' \
-H "X-Ops-Session: $OPS_SESSION" \
-d '{}'
# 挂上 example hotline(本仓内置)
curl -s -X POST "$BASE/responder/hotlines/example" \
-H 'content-type: application/json' \
-H "X-Ops-Session: $OPS_SESSION" \
-d '{}'这是 Caller 视角里最常用的 API:catalog 决定了 Agent 当前可调用的能力集合。
curl -s "$BASE/catalog/hotlines" \
-H "X-Ops-Session: $OPS_SESSION" | jqlocal.delegated-execution.workspace-summary.v1, 这是 Agent 接下来要调的 hotline。一切准备好了。下面这条命令模拟 Agent 在 Caller 进程里发起一个 hotline 调用。
REQ=$(curl -s -X POST "$BASE/requests/example" \
-H 'content-type: application/json' \
-H "X-Ops-Session: $OPS_SESSION" \
-d '{}')
echo "$REQ"
REQUEST_ID=$(echo "$REQ" | jq -r '.request_id')npm run ops -- run-example --text "summarize my workspace"协议化结果是 CALL ANYTHING 的核心:所有 hotline 返回同一种 result_package 结构,Agent 只学一次。
curl -s "$BASE/requests/$REQUEST_ID/result" \
-H "X-Ops-Session: $OPS_SESSION" | jq{
"request_id": "req_xxx",
"status": "SUCCEEDED",
"result_package": {
"request_id": "req_xxx",
"responder_id": "responder_xxx",
"hotline_id": "local.delegated-execution.workspace-summary.v1",
"status": "ok",
"output": {
"summary": "..."
},
"timing": {
"elapsed_ms": 123
}
}
}5 个字段 Agent 必看:
status:SUCCEEDED / FAILEDresult_package.status:ok / errorhotline_id:调用的能力 ID(含版本)output:具体输出,shape 由该 hotline 的 output_schema 决定timing.elapsed_ms:耗时,可作为计费 / 评分输入你刚刚跑通的就是 Caller 的最小闭环。从这里可以分两条路深入:
自己也想发能力?
同一台 supervisor 可以同时做 Caller 和 Responder。换条路看 Responder 怎么 5 分钟发布一根 hotline。
Caller FAQ
这部分直接回答第一次做 Caller 接入时最容易卡住的几个问题,也对应页面里的 HowTo schema。
它适合希望把外部能力接进 Agent、但还不想先部署完整 Platform 的团队。页面使用 Local Mode 演示最小调用闭环,方便先验证协议体验。
因为它能把 Caller、supervisor 和 Responder 三段链路先稳定跑通,先验证协议流程,再决定接入真实业务 Hotline,能显著减少排查范围。
通常有两条路:继续浏览 Marketplace 选择更多 Hotline,或者进入 Console 原型理解审批、路由和运行时状态。若你也想提供能力,则直接进入 Responder Quick Start。