docs: update agent and UI protocol documentation

- Update api-endpoints.md with new agent endpoints
- Update run-agent-input.md with new input schemas
- Update sse-events.md with new event types
- Update ui-schema.md with schema changes
This commit is contained in:
qzl
2026-03-19 18:42:45 +08:00
parent 0abf51e837
commit 641d847008
5 changed files with 158 additions and 17 deletions
+10 -2
View File
@@ -27,6 +27,8 @@ Base URL: `/api/v1/agent`
- Body: `RunAgentInput`
- 详细结构见 `docs/protocols/agent/run-agent-input.md`
- `forwardedProps.agent_type` 必填,由调用方透传,task 不做默认赋值
- `agent_type=memory` 仅用于自动化调度内部触发,API 入口返回 422
### Response
@@ -81,8 +83,9 @@ Base URL: `/api/v1/agent`
当前阶段执行说明:
- 公开事件阶段为 `worker` / `memory`
- `router` 已从运行链路移除,不再作为阶段事件对外发送
- `worker` 模式采用两阶段:`router` -> `worker`
- `memory` 模式保持单阶段:`memory`
- 因此阶段事件可能出现 `router` / `worker` / `memory`
### 错误码
@@ -129,6 +132,11 @@ Base URL: `/api/v1/agent`
tool 消息在存储层用于运行时上下文续接,不在 `/history` 对外返回。续接时以 `metadata.tool_agent_output` 作为主信源(`content` 为轻量摘要)。
可见性说明:
- `/history` 仅返回命中 `ui.history` 可见位的消息。
- 内部消息(例如 memory 私有输入)可落库但不会出现在 `/history`
### 说明
- 若用户没有任何会话:返回