数据契约 v1(真接口真字段)

豆包/任何前端可直接按此接数据,样式随便换、数据不用换 UI 草图接口文档

① 怎么用

基址:https://agent.dtzx86.com(本地等价 http://127.0.0.1:19200)
读接口:免鉴权(CORS 已允许 *.dtzx86.com)
写接口:需 x-chat-key(向 DP 申请)或页面 pageToken
约定:消息 at 已是本地时间;列表用 after 游标(持久化 nextAfter);ok:true 为成功

② 接口清单(字段为实测抓取)

状态接口用途返回字段结构
200 GET /api/zt/summary 总览:需求/任务/事件计数 + 最新 ok, counts, latest, dispatch, features
{ok: bool, counts: {samples: num, dispatch: num, pending: num, features: num, kb: num}, latest: {id: str, at: str, text: str(长), card: {summary: …, types: …, domains: …, objects: …, nodes: …, priority
{"ok": true, "counts": {"samples": 4, "dispatch": 5, "pending": 0, "features": 2, "kb": 1}, "latest": {"id": "63a6947a67", "at": "2026-10-22T16:16:36", "text": "节点派单员,这边的结果分析出来以后,由派单员派发,同时在群内留痕问我确认,派单员最好本地agent,必须牵涉到云agent的如果我10分钟没有回复。默认派单正确,超时我回复派错,需要支持回滚。每一个
200 GET /api/zt/requirements?withSum=1 需求总表(含统计) ok, seq, total, count, items
{ok: bool, seq: num, total: num, count: {done: num, doing: num, todo: num, blocked: num}, items: [{id: …, day: …, title: …, status: …, owner: …, evidence: …, priority: …, tag: …}, …]}
{"ok": true, "seq": 88, "total": 99, "count": {"done": 35, "doing": 26, "todo": 34, "blocked": 4}, "items": [{"id": "R-001", "day": "昨天", "title": "群聊是唯一入口,自然语言派任务", "status": "done", "owner": "DP", "evidence": "chat-svc + 群内 bot", "priority": "P0", "tag": ["项
200 GET /api/zt/task/board 任务板:byStatus/doneReqs/byReq/notDelivered/integration ok, total, byStatus, doneReqs, byReq, notDelivered, integration
{ok: bool, total: num, byStatus: {进行中: num, 已完成: num, 已替换: num, 已交付: num, 已验收: num, 阻塞: num, 待开始: num}, doneReqs: [{reqNo: …, title: …, priority: …, status: …, state: …, stages: …, doneCount: …, total
{"ok": true, "total": 243, "byStatus": {"进行中": 110, "已完成": 14, "已替换": 80, "已交付": 13, "已验收": 4, "阻塞": 2, "待开始": 20}, "doneReqs": [{"reqNo": "R-066", "title": "显示被调用工具后面待命的临时工具及其测试状态和替换推荐率", "priority": "P0", "status": "doing", "state": "部分完成", "stages": ["DS:已交
200 GET /api/zt/flow/stages 五段进度(需求/设计/开发/测试/上线) ok, at, reqTotal, stages
{ok: bool, at: str, reqTotal: num, stages: [{name: …, total: …, done: …, doing: …, todo: …, blocked: …, pct: …}, …]}
{"ok": true, "at": "2026-10-25 02:42:00", "reqTotal": 99, "stages": [{"name": "需求", "total": 113, "done": 15, "doing": 23, "todo": 0, "blocked": 2, "pct": 13}, {"name": "设计", "total": 13, "done": 6, "doing": 1, "todo": 6, "blocked": 0, "pct": 46}, {"name": "开发
200 GET /api/zt/event/list?limit=5 事件台账(EV 编号) ok, total, items
{ok: bool, total: num, items: [{evId: …, date: …, seq: …, kind: …, title: …, fingerprint: …, normalized: …, at: …}, …]}
{"ok": true, "total": 35, "items": [{"evId": "EV-20261025-004", "date": "20261025", "seq": 4, "kind": "测试", "title": "千问接入演练", "fingerprint": "4b7e7510dd11", "normalized": "千问接入演练", "at": "2026-10-24 17:25:16", "createdBy": "system", "note": ""}, {"evId": "EV-
200 GET /api/zt/techdoc 技术方案列表(含状态/版本) ok, total, items
{ok: bool, total: num, items: [{id: …, ver: …, title: …, body: …, by: …, at: …, refs: …, tags: …}, …]}
{"ok": true, "total": 16, "items": [{"id": "TD-1792893907508", "ver": 2, "title": "分层职责规范 V1(L1 脚本 / L2 值班 / L3 本体)", "body": "# 分层职责规范 V1(L1 脚本 / L2 值班 / L3 本体)\n\n> 老板拍板于 2026-10-25:所有 Agent 与脚本必须按本规范分层,不许越权、不许冒充。\n\n## 一、三层定义\n\n| 层 | 名称 | 是什么 | 会思考吗 | 单次成本
200 GET /api/zt/req/pairing 对接配对表(ready/total) ok, total, ready, items
{ok: bool, total: num, ready: num, items: [{tag: …, state: …, members: …, canConnectAt: …}, …]}
{"ok": true, "total": 3, "ready": 2, "items": [{"tag": "usage-api", "state": "可对接", "members": [{"key": "R-126-1", "createdAt": "2026-10-24 09:09:35", "owner": "DB-总管家", "claimedAt": "2026-10-24 09:09:35", "status": "已对接", "reqNo": "R-126", "pointNo": "1", "ti
200 GET /api/db/messages?room=%E4%BA%A4%E6%B5%81%E5%8C%BA&after=0&limit=3 交流区增量消息(at 已本地化) ok, room, after, limit, count, nextAfter, remaining, items
{ok: bool, room: str, after: num, limit: num, count: num, nextAfter: num, remaining: num, items: [{id: …, at: …, tsRaw: …, from: …, text: …, audio: …, media: …, replyTo: …}, …]}
{"ok": true, "room": "交流区", "after": 0, "limit": 3, "count": 3, "nextAfter": 7114, "remaining": 2289, "items": [{"id": 6874, "at": "2026-10-25 10:34:51", "tsRaw": "2026-10-25T02:34:51.847Z", "from": "值班总管", "text": "【值班总管】已认领 8 张「待开始」卡,转入进行中并交本体执行:\n· T-093643
200 GET /api/db/rooms 房间统计 ok, rooms
{ok: bool, rooms: {总群: num, 典通平台: num, 钢衡: num, APP复刻: num, 反向开票: num, 法律助手: num, 小红书: num, Agent开发智能系统: num}}
{"ok": true, "rooms": {"总群": 1186, "典通平台": 99, "钢衡": 66, "APP复刻": 1, "反向开票": 1, "法律助手": 1, "小红书": 1, "Agent开发智能系统": 567, "私聊·DB-总管家": 22, "私聊·豆包": 20, "私聊·代码主力": 4, "私聊·豆包-助理": 16, "私聊·DP-总管家": 6, "自检": 324, "⑥部署": 6, "②设计": 31, "⑦验收": 1556, "按地区批量调价·大群": 1, "
200 GET /api/zt/agents Agent 名册(编号/昵称/职责/语音) ok, agents
{ok: bool, agents: [{code: …, role: …, nickname: …, name: …, voice: …, duty: …}, …]}
{"ok": true, "agents": [{"code": "A-01", "role": "总管家", "nickname": "总管", "name": "DP-总管家", "voice": "zh-CN-XiaoxiaoNeural", "duty": "调度/交付/广播"}, {"code": "A-02", "role": "主管家", "nickname": "豆包", "name": "DB-总管家", "voice": "zh-CN-YunxiNeural", "duty": "UI/前端/需
200 GET /api/zt/memory/stats 共享记忆统计 ok, total, sampled, byScope, byKind, byRole, newest
{ok: bool, total: num, sampled: num, byScope: {public: num, role: num}, byKind: {decision: num, task: num, role_card: num, fact: num}, byRole: {DB-总管家: num, 千问: num, DeerFlow: num, 红队-独立评审: num, 巡检器:
{"ok": true, "total": 1640, "sampled": 200, "byScope": {"public": 193, "role": 7}, "byKind": {"decision": 10, "task": 3, "role_card": 7, "fact": 180}, "byRole": {"DB-总管家": 1, "千问": 1, "DeerFlow": 1, "红队-独立评审": 1, "巡检器": 1, "DP-开发": 1, "DP-总管家": 1}, "newest": [
200 GET /api/zt/memory/list?limit=3 共享记忆列表/检索 ok, total, items
{ok: bool, total: num, items: [{id: …, at: …, scope: …, role: …, kind: …, title: …, content: …, source: …}, …]}
{"ok": true, "total": 3, "items": [{"id": 1661, "at": "2026-10-25T02:31:17.441905+00:00", "scope": "public", "role": "all", "kind": "decision", "title": "L1 本地脚本自动化边界(不进群)", "content": "L1=本地脚本自动化(/app/actions/):只在页面触发/接口触发;回执写「动作流」+日志,**不进交流区、不听群消息**。L2=交流区(/
200 GET /api/zt/tools/status 工具状态(在用/异常) ok, at, total, inuse, error, items
{ok: bool, at: str, total: num, inuse: num, error: num, items: [{tool: …, kind: …, port: …, state: …, today: …, total: …, lastAt: …, lastAgent: …}, …]}
{"ok": true, "at": "2026-10-25 02:42:01", "total": 17, "inuse": 8, "error": 0, "items": [{"tool": "chat-svc", "kind": "服务", "port": 19200, "state": "在用", "today": 0, "total": 0, "lastAt": "", "lastAgent": ""}, {"tool": "memory-svc", "kind": "服务", "port": 19202
200 GET /api/zt/tools/watchlist 巡检清单(在巡/停检) ok, total, watching, paused, items
{ok: bool, total: num, watching: num, paused: num, items: [{tool: …, port: …, status: …, watch: …, reason: …}, …]}
{"ok": true, "total": 8, "watching": 8, "paused": 0, "items": [{"tool": "chat-svc", "port": 19200, "status": "service", "watch": true, "reason": "基础服务常驻"}, {"tool": "memory-svc", "port": 19202, "status": "service", "watch": true, "reason": "基础服务常驻"}, {"tool": 
200 GET /api/zt/usage 用量与费用 ok, at, totalTokens, totalCostCNY, todayTokens, todayCostCNY, calls, prices, byAgent, byDay
{ok: bool, at: str, totalTokens: num, totalCostCNY: num, todayTokens: num, todayCostCNY: num, calls: num, prices: {deepseek-flash: {in: …, out: …, currency: …}, deepseek-chat: {in: …, out: …, currency
{"ok": true, "at": "2026-10-25 02:42", "totalTokens": 201122, "totalCostCNY": 0.2227, "todayTokens": 200191, "todayCostCNY": 0.2217, "calls": 1348, "prices": {"deepseek-flash": {"in": 0.5, "out": 2, "currency": "CNY"}, "deepseek-chat": {"in": 2, "out": 8, "cur
200 GET /api/zt/broadcast/list?limit=3 广播历史(标题/类型) ok, total, items
{ok: bool, total: num, items: [{id: …, at: …, type: …, title: …, by: …}, …]}
{"ok": true, "total": 3, "items": [{"id": 7114, "at": "2026-10-25T02:41:01.118Z", "type": "警报", "title": "📣【警报】🔔 提示:契约自测", "by": "警报器"}, {"id": 6812, "at": "2026-10-25T02:33:03.779Z", "type": "测试", "title": "📣【测试】【自动测试失败】1 项不通过(已建卡 T-581582)\nT2 样式门禁:有页面不通过\n—
200 GET /api/zt/onboard/pack 自助接入包(步骤/规则/鉴权) ok, doc, diagram, base, rooms, auth, steps, rules, roster, brief
{ok: bool, doc: str, diagram: str(长), base: {local: str, public: str}, rooms: {talk: str, action: str, broadcast: str}, auth: {agent: str, boss: str, read: str}, steps: [str(长), …], rules: [str, …]}
{"ok": true, "doc": "https://center.dtzx86.com/app/api-doc/", "diagram": "https://center.dtzx86.com/app/api-diagram/", "base": {"local": "http://127.0.0.1:19200", "public": "https://agent.dtzx86.com"}, "rooms": {"talk": "交流区", "action": "动作流", "broadcast": "总群
200 GET /api/zt/action/list 动作执行记录(L1) ok, allow, total, items
{ok: bool, allow: [str, …], total: num, items: [{id: …, name: …, at: …, by: …, state: …, ms: …, out: …}, …]}
{"ok": true, "allow": ["健康检查", "看进度", "重启服务", "重启所有 Agent", "跑测试", "清理任务板", "重建简报", "部署交流区", "认领卡"], "total": 40, "items": [{"id": "ACT-1792895498568", "name": "看进度", "at": "2026/10/25 10:42:00", "by": "验证", "state": "已完成", "ms": 6, "out": "五段: 需求13%/设计46%/开发5

③ 写接口(需要 key)

接口作用参数
POST /api/talk/send发消息{text, by, room, pageToken?|x-chat-key}
POST /api/zt/task/ack|deliver认领/交付任务卡{taskId, by, note, artifacts}
POST /api/zt/broadcast广播{type, title, detail, level, notifyGroup}
POST /api/zt/event/next|link事件登记/关联{kind, title, evId, type, ref}
POST /api/zt/req/draft|draft/confirm需求草稿/定稿派卡{text} / {id, priority}
POST /api/zt/semantic/parse精炼(返回 engine,rule=降级){text}
POST /api/zt/memory/write写共享记忆{scope, role, kind, title, content}
POST /api/zt/action/run触发 L1 脚本动作{name, pageToken|x-chat-key}

④ 尚未建数据的两块(诚实说明)

模块现状说明
警报 /app/alerts/未建R-124:需先定分级与 5 分钟响应口径,再出数据
语音 /app/voice/未建R-101~108:需先接通流式识别/合成
8 节点流转 /app/flow/未建R-110:可先读 task/board + flow/stages 拼出来
☰ 全部模块▦ 移动版◉ 大屏
首页交流区需求总表需求确认页面清单文档中心接口文档
实时数据读取中… 源 /api/zt/pages/list
数据契约(10 岗实时) 读取中…
读取中…
数据源 /api/zt/org/posts