代码助手看板演示

这个演示展示公开版最推荐的使用方式:后台运行看板,然后和 Codex 或 Claude Code 对话,让助手通过 agent-hub 创建、检查和追踪任务。

1. 安装

环境要求:Python >= 3.11

python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
bash -n examples/demo-agent-repo/scripts/run_agent_task.sh

2. 最小验证

在进入完整多终端演示之前,先用公开 demo 注册表做一次最小验证。

agent-hub version
agent-hub --projects-file examples/agent-driven-projects.example.json list-projects
agent-hub --projects-file examples/agent-driven-projects.example.json list-project-task-templates demo-codex

3. 启动 Web 服务

使用建模了 repo-agent 组合的示例项目注册表。

python -m agent_hub --projects-file examples/agent-driven-projects.example.json serve --port 8080

4. 启动 Dispatcher

python -m agent_hub --projects-file examples/agent-driven-projects.example.json dispatch

5. 打开你的助手终端

在另一个终端里打开 Codex 或 Claude Code,然后让它替你使用这个看板。

如果你想先手动验证看板,也可以暂时不接入助手,直接运行:

python -m agent_hub --projects-file examples/agent-driven-projects.example.json run-task-template demo-codex delegate-task --input "Investigate why the local build script is flaky"
python -m agent_hub --projects-file examples/agent-driven-projects.example.json dashboard

底层助手会调用类似下面的命令:

python -m agent_hub --projects-file examples/agent-driven-projects.example.json run-task-template demo-codex delegate-task --input "Investigate why the local build script is flaky and summarize the likely root cause"
python -m agent_hub --projects-file examples/agent-driven-projects.example.json run-task-template demo-claude delegate-task --input "Review the proposed fix and call out any operator-facing risks"
python -m agent_hub --projects-file examples/agent-driven-projects.example.json run-pipeline demo-codex review-then-implement --input "Add a dry-run mode to the deployment helper"

这个 demo 使用 examples/demo-agent-repo/scripts/ 下的 wrapper 脚本,来模拟 Claude Code、Codex、Kimi Code、Qwen Code 这类真实工具。

6. 让助手检查交接状态

你也可以让助手直接检查看板并汇报结果。

底层会映射到类似这些命令:

TASK_ID=$(python -m agent_hub --projects-file examples/agent-driven-projects.example.json create-task "Manual review: choose agent" --kind noop | python - <<'PY'
import json,sys
print(json.load(sys.stdin)["id"])
PY
)
python -m agent_hub --projects-file examples/agent-driven-projects.example.json mark-needs-human "$TASK_ID" --note "operator must decide whether Codex or Claude should own this task"
python -m agent_hub --projects-file examples/agent-driven-projects.example.json add-task-label "$TASK_ID" routing
python -m agent_hub --projects-file examples/agent-driven-projects.example.json add-task-note "$TASK_ID" "ambiguous ownership; human should choose executor"
python -m agent_hub --projects-file examples/agent-driven-projects.example.json list-human-inbox

7. 让助手使用保存视图

当看板上已经有有价值的筛选视图时,助手就可以用保存查询回答类似这样的问题:

底层命令类似:

python -m agent_hub --projects-file examples/agent-driven-projects.example.json create-saved-query tasks "Needs Human" --filter status=needs_human
python -m agent_hub --projects-file examples/agent-driven-projects.example.json create-saved-query tasks "Codex Tasks" --filter project_id=demo-codex
python -m agent_hub --projects-file examples/agent-driven-projects.example.json list-saved-queries

python -m agent_hub --projects-file examples/agent-driven-projects.example.json apply-saved-query <query-id>

8. 确认看板状态

任何时候,助手或操作者都可以直接检查当前看板状态:

python -m agent_hub --projects-file examples/agent-driven-projects.example.json dashboard
curl -s http://127.0.0.1:8080/dashboard | sed -n '1,80p'

预期结果

更重要的是,正常使用方式应该很清楚:你和 Codex 或 Claude Code 对话,助手把工作提交进 agent-hub,而这个看板就成为很多代码助手任务共享的可视化层。