Files
SuperBizAgent-java/mvp/architecture/agent-orchestration.md
T

55 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Diagnosis Agent 执行架构
**更新日期**:2026-07-22
**状态**:当前可运行架构
## 1. 单 Agent 原则
当前业务诊断只有一个 `Diagnosis Agent`。它使用框架 `ReactAgent` 完成规划、行动、观察和最终 Draft,但项目不在外层复制 ReAct 状态机,也不使用业务 Graph 或多角色协作链。
## 2. 职责
Diagnosis Agent:
- 接收当前 query 与可选、受限的安全 PreviousTurn。
- 自主选择只读 evidence Tool。
- 根据 Agent projection 判断是否需要继续查询。
- 输出结构化 `DiagnosisDraft`,每条 analysis 绑定 framework `tool_call_id`。
- 证据不足时明确限制,不补造事实。
Diagnosis Agent 不负责:
- HTTP/SSE、Session/Run 生命周期和持久化。
- 模型/Tool/Token/timeout/cancel 预算。
- Tool 参数授权、raw response 投影或证据物理验真。
- SemanticGuard 与最终发布决定。
## 3. 执行序列
```mermaid
sequenceDiagram
participant App as Chat Application
participant Core as Harness Core
participant Agent as Diagnosis Agent
participant Tool as ACI Tool Boundary
participant EG as EvidenceGuard
participant SG as SemanticGuard
participant Release as Release Policy
App->>Core: start RunContext
App->>Agent: query + safe previous_turn
Agent->>Tool: tool name + framework tool_call_id + typed args
Tool-->>Agent: bounded agent_result
Agent-->>App: DiagnosisDraft
App->>EG: Draft + current Run canonical invocations
EG-->>App: verified snapshot or deterministic failure
App->>SG: query + full Draft + verified snapshot
SG-->>App: SUPPORTED / UNSUPPORTED
App->>Release: decide public content
Release-->>App: report or fixed fallback
```
## 4. PreviousTurn
PreviousTurn 只来自同一 Session 最近一个 `DIAGNOSIS + SUCCESS + published_result`。Fallback、失败、取消、raw evidence 和完整历史都不能进入下一轮;字段与字节上限由 Harness 配置控制。