docs(agentic): 落创始人4问校正——两阶段/真实结构/三层校验/reuse二维
- 新增图A 生成两阶段(工作室 Agent Team 星形多agent设计 → 单写实现) - 图3 按 AgentScope 真实对象结构重画(Agent 无状态引擎持有 Workspace 双轴注入 / Agent 非常驻每run现组装) - 验收改三层(L1编译运行必须/L2设计符合尽量/L3效果只评分·初期只L1) - 图6 reuse 二维重做(来源×共享范围·官方能力列全·自建核对该删的改官方·公共=自建∩共享) - 图说 md §4 三层表 + §5 四问校正记录 + §6 术语映射;均基于 agentscope 2.0.3 源码实证 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ -1,64 +1,58 @@
|
||||
# tier2 agentic 运行时架构图说
|
||||
|
||||
> 🚧 评审版 · **全套 8 张已出**(5 张 svg 大图 + 3 张 mermaid)。
|
||||
> **这是什么**:tier2 自治富游戏生成轨——agentic 这条线的「看图入口」。把「编排 → 启动 → 调用 → 运行时 → 返回结果」这条生命周期,以及它在整体里的位置、内部怎么转,用一套架构图讲清。复杂重要的用 svg/png 高保真大图,简单的用 mermaid。颗粒度面向 vibecoding——看图能照着实现。
|
||||
> **给谁看**:要判断「整个 agentic 架构是不是想要的那个」的创始人;要照图实现的工程师 / vibecoding 的人。
|
||||
> 🚧 评审版 · **9 张图**(6 svg + 3 mermaid)· 已纳入创始人 4 问校正(见 §5)。
|
||||
> **这是什么**:tier2 自治富游戏生成轨——agentic 这条线的「看图入口」。把「编排 → 启动 → 调用 → 运行时 → 返回结果」整条生命周期、它在系统里的位置、内部怎么转,用一套图讲清。复杂重要的用 svg/png 高保真大图,简单的用 mermaid。颗粒度面向 vibecoding。
|
||||
> **给谁看**:判断「整个 agentic 架构是不是想要的那个」的创始人;照图实现的工程师 / vibecoding 的人。
|
||||
|
||||
---
|
||||
|
||||
## 0. 阅读约定与同步纪律
|
||||
|
||||
- **映射的设计档**:本图说不另立设计,只把以下四份「画出来」——《[自治富游戏引擎](自治富游戏引擎.md)》(范式)、《[tier2 四层工程架构](tier2四层工程架构.md)》(四层切分)、《[tier2 实现详设](tier2实现详设.md)》(契约 / spike runbook)、《[agentic 集成架构](agentic集成架构.md)》(控制 / 管理面)。所有运行时机制以 **agentscope 2.0.3 源码实证**为准(`/root/oss/agentscope`,已逐条核过)。
|
||||
- **同步纪律(创始人要求)**:**设计文档一变动,本图说与对应 svg 必须同步更新**,并在图脚注注明对应版本。已并入 wave 收口清单——图与设计不允许漂移。
|
||||
- **产物形式**:svg 入仓(GitHub / 编辑器直接渲染矢量、可编辑),并转一份 png 一并入仓(png 在 mini-desktop 转——6c6g 禁 chrome、无转换器)。
|
||||
- **映射的设计档**:本图说不另立设计,只把《[自治富游戏引擎](自治富游戏引擎.md)》《[tier2 四层工程架构](tier2四层工程架构.md)》《[tier2 实现详设](tier2实现详设.md)》《[agentic 集成架构](agentic集成架构.md)》画出来。运行时机制以 **agentscope 2.0.3 源码实证**为准(`/root/oss/agentscope`,逐条核过)。
|
||||
- **同步纪律(创始人要求)**:**设计一变动,本图说与对应 svg 必须同步更新**,图脚注注明版本。已并入 wave 收口清单。
|
||||
- **产物形式**:svg 入仓(GitHub/编辑器直接渲染矢量),png 在 mini-desktop 转(6c6g 禁 chrome、无转换器)。
|
||||
|
||||
## 1. 全图通用图例
|
||||
|
||||
每张图都带两套贯穿标注:
|
||||
**生产维度**(大厂生产环境关心):安全(Workspace 隔离/密钥/产物消毒)、可观测(Event System → OTel → Studio)、可靠(四熔断/checkpoint/HITL/durable/fallback)、成本(预算软刹+硬杀/quota 台账)、数据(AgentState/落库/哈希)、伸缩(多实例/多租户/会话隔离)、质量(三层校验)。
|
||||
|
||||
**生产维度(大厂生产环境关心的领域)**——架构图不只画「功能怎么连」,还要让人一眼看到生产环境怎么保证它可靠、可观测、安全、可扩展、成本可控:
|
||||
|
||||
| 维度 | 落点 |
|
||||
|---|---|
|
||||
| 安全 | Workspace 沙箱隔离、密钥(`NEWAPI_KEY`)只走 env 不入库、forbidden-import、产物消毒 |
|
||||
| 可观测 | Event System(typed stream)→ TracingMiddleware → OpenTelemetry → Studio |
|
||||
| 可靠 | 四熔断、checkpoint 中断恢复、HITL、durable session、provider fallback |
|
||||
| 成本 | 预算闸(token 软刹 + 金额硬杀)、new-api quota 台账 |
|
||||
| 数据 | 会话状态(Redis)、产物落库(MySQL+OSS)、内容哈希 |
|
||||
| 伸缩 | `create_app` 多实例、多租户、会话隔离 |
|
||||
| 质量 | 双层验收门(确定性硬门 + M3 视觉软检) |
|
||||
|
||||
**复用边界**:**实线 = AgentScope 生态官方现成直接用;虚线 = tier2 自建(挂官方 Middleware 或薄层);双线 = 两条生成线共享的公共组件**。
|
||||
**复用边界(二维 · 见图 6)**:来源(**官方现成** vs **自建**)× 共享范围(**两线公共** vs **tier2 私有**)。⚠️「公共组件」是**自建的共享件、不是现成的**。
|
||||
|
||||
## 2. 图集
|
||||
|
||||
### 图 A · 生成两阶段(工作室设计 → 单写实现)
|
||||
|
||||

|
||||
|
||||
整个生成是**两阶段**。**阶段 1 是游戏工作室**——用 AgentScope 的 Agent Team(星形):一个 leader agent 分析并拆解用户意图,spawn 出玩法/关卡/数值机制/UI/音乐音效/特效/资产等多个专业**设计 worker** 并行发散(基于玩法模板 prompt + 工程初始化模板),结果经 TeamSay 汇回 leader(worker 之间不互连),leader 收敛成一份结构化设计(GDD + 各维度设计 + 工程骨架)。**阶段 2 是单写实现**——把这份设计交给单写 agent,它在 ReAct 循环里独自把代码写出来(运行时内部见图 3)、过三层校验、产出结构化游戏源项目。**设计用多 agent 是因为各专业发散、不共享代码状态;实现用单写是因为多系统共享同一套代码与约定,并行写几乎必然不一致**(曾把 Flappy 拆并行写,背景跑成了马里奥)。
|
||||
|
||||
### 图 1 · 系统全景 / 部署
|
||||
|
||||

|
||||
|
||||
最高层定位:tier2 agentic 是一个**独立 service**,`game-cloud`(Java)通过官方 **Agent Service 的 REST 端点 + SSE 事件流**调它;它向上经 **new-api 网关**(统一出口、协议不锁)调模型,向内用 **Workspace**(Local/Docker/E2B 沙箱)干活,把会话/产物落到 Redis/MySQL/OSS,并把 trace 导出到 Studio。它与现行 **SAA 廉价线运行期零耦合**——两条生成线只在「计费 / 送审 / feed / 验收基线」这些**公共组件**上交汇。
|
||||
tier2 agentic 是独立 service,game-cloud 经官方 **Agent Service 的 REST + SSE** 调它;它经 **new-api**(统一出口、协议不锁)调模型,用 **Workspace**(Local/Docker/E2B)干活,把会话/产物落到 Redis/MySQL/OSS,trace 导出 Studio。它与 **SAA 廉价线运行期零耦合**,两线只在「计费/送审/feed/验收基线」这些**公共组件**上交汇。
|
||||
|
||||
### 图 2 · 调用时序(cloud ↔ agentic)
|
||||
|
||||

|
||||
|
||||
你最关心的「cloud 怎么调 agentic API」。关键是 **tier2 不自造 API,直接用官方 Agent Service**:cloud 用 `POST /sessions` 建一个 durable 会话并触发 run,再用 `GET /sessions/{id}/events` 订阅一条 **SSE 事件流**。运行时每一步(thinking / tool / result)作为 **Event** 经 SSE 流式推给 cloud;这条流是**可恢复的**——断线重连会 replay 已缓冲的事件。中途可挂起做 HITL(让人确认/编辑工具参数)再精确恢复,也可随时取消 session。产物落库后,cloud 收到完成 event(verdict + 产物引用),取回进 feed。
|
||||
**tier2 不自造 API,直接用官方 Agent Service**:`POST /sessions` 建 durable 会话并触发 run,`GET /sessions/{id}/events` 订阅 SSE。运行时每步(thinking/tool/result)作为 Event 经 SSE 流式推 cloud,**断线重连可 replay 缓冲**。中途可 HITL(确认/编辑工具参数)再精确恢复,也可取消。产物落库后回完成 event(verdict + 产物引用)。
|
||||
|
||||
### 图 3 · 运行时内部架构
|
||||
### 图 3 · 运行时内部架构(AgentScope 真实对象结构)
|
||||
|
||||

|
||||
|
||||
运行时内部怎么转:中心是**单写者 ReAct 循环**(官方 `Agent` + `ReActConfig`,一个 agent 持全局、独自写,不并行拆),每轮推理→调工具→观测→验收,没过走 repair 回环。外圈 **Middleware 洋葱**关熔断(预算软刹是官方现成的,超时/卡死/fail-closed 硬杀自建挂上去)。循环向右连 environment 沙箱工作站(写码/构建/真跑,CDP 探针是公共件)、向下连 M3(Anthropic 原生 thinking)、左下挂记忆(ReMe)。产物经**双层验收门**判定(确定性硬门定 pass/fail、零 LLM 自评;M3 软检只观测)。底部是 checkpoint / 落库 / 可观测三件生产基础设施。
|
||||
**这张按 AgentScope 真实对象结构画**(纠正了上一版把 environment 当「被调用的旁边数据面」的错)。核心是 **Agent——一个无状态 ReAct 引擎**,它通过构造参数持有 model(M3)/toolkit/middlewares/state(AgentState)等。**Workspace 是 Agent 的执行环境,但它沿两条轴「注入」Agent**:① 它的工具/MCP/skills 被 `get_toolkit` 装进 Toolkit 给 Agent;② 它本身作为 offloader(管 context 卸载)给 Agent。所以 **Agent 持有 Workspace 引用,不是嵌在 Workspace 里**;真正「跑在 Workspace 里」的是 MCP 进程、skills、卸载文件。还有一条关键的生产事实:**Agent 实例非常驻**——Agent Service 每次 run 现组装一个 Agent、跑完即弃,一切可变态都在可持久化的 `AgentState`(落 Redis),所以天然可中断、可恢复、可水平扩。验收是**三层**(见下)。而「四层(environment/harness/context/prompt)」只是**职责视角**,叠在这个真实结构上,不是并列模块。
|
||||
|
||||
### 图 4 · 单写者 ReAct 循环流程(一轮迭代)
|
||||
|
||||

|
||||
|
||||
把图 3 中心那个循环展开成一轮的控制流:组装 context → reason 调 M3 → 判断「调工具还是收尾」。调工具就去 Workspace 写码/构建/真跑、CDP 取证、过双层验收;没过回 repair 重组 context 再来。模型某轮直接产纯文本(不调工具)就是收尾、出产物。右侧四熔断任一触发即优雅收尾,每轮 checkpoint。
|
||||
把图 3 中心那个循环展开成一轮:组装 context → reason 调 M3 → 判断「调工具还是收尾」→ 调工具就去 Workspace 写码/构建/真跑、CDP 取证、过**三层校验**,没过回 repair。模型产纯文本即收尾、出产物。右侧四熔断任一触发即优雅收尾,每轮 checkpoint。
|
||||
|
||||
### 图 5 · 编排与配置结构
|
||||
|
||||
「编排 agentic」= 写一次代码骨架(`create_app` 起服务 + 组装 Agent 的 model/toolkit/middleware/memory/react_config),「配置」= 三类外置(机制硬代码、安全/构建走版本化审计、策略热改不发版)。不是 Dify 那种可视化拖拽,但策略层可配热改、不必每次改代码重部署。
|
||||
「编排」= 写一次代码骨架(`create_app` + 组装 Agent 的 model/toolkit/middleware/memory/react_config),「配置」= 三类外置(机制硬代码、安全/构建走版本化审计、策略热改不发版)。
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
@ -68,7 +62,7 @@ flowchart TB
|
||||
AG --> M["model:AnthropicChatModel(M3)"]
|
||||
AG --> TK["toolkit:Workspace 工具 + CDP 探针"]
|
||||
AG --> MW["middlewares:预算软刹(官方) + 超时/卡死/硬杀(自建)"]
|
||||
AG --> MEM["memory:ReMe"]
|
||||
AG --> MEM["memory:ReMe / AgentState.context"]
|
||||
AG --> RC["react_config:max_iters"]
|
||||
end
|
||||
subgraph 配置["配置外置(三类)"]
|
||||
@ -80,15 +74,15 @@ flowchart TB
|
||||
HOT -. 改配置不发版 .-> AG
|
||||
```
|
||||
|
||||
### 图 6 · 复用边界全景(官方 / 自建 / 公共)
|
||||
### 图 6 · 复用边界(来源 × 共享范围)
|
||||
|
||||

|
||||
|
||||
把「优先用官方」这条原则画成三色边界:左列是 AgentScope 生态直接用的(循环/工具/中间件/M3 接入/沙箱/服务化/记忆/可观测/HITL/结构化产出,一大列),中列是 tier2 真正要自建的(超时/卡死/硬杀熔断、金额成本、签名案例库、引擎 manifest、源项目契约、fixtures——都挂在官方扩展点或薄层上),右列是两条生成线共享、不进 tier2 私有的公共组件(验收基线/计费/送审/feed/trace 契约/new-api)。一眼看出自研面其实很小。
|
||||
**两个维度**:来源(官方现成 vs 自建)× 共享范围(两线公共 vs tier2 私有)。左列是 AgentScope 官方现成(列全,十几组:Event/Agent/Model/Context/Tool/MCP/Permission/Middleware/Workspace/State/Agent Service/Agent Team/Embedding/Formatter/Skill),直接用、不算 tier2 资产。右上是**自建的两线公共件**(九门/三层校验/CDP 探针/计费/送审/feed/trace 契约)——**它们是自建的、只是两线共享,不是现成的**。右下是 tier2 私有自建(通用治理 6 项 + 游戏专属 2 项)。还标了「官方没有」(无 RAG/无 evaluate/A2A 仅基座)和「该删」(token 计量/软预算/结构化调用/OTel/经验召回/多 agent 总线——都改用官方),把自研面缩到最小。
|
||||
|
||||
### 图 7 · 产物与契约
|
||||
|
||||
返回的产物不是一个打包 blob,而是一个**结构化源项目**(改源不改包、重新构建),由 tier2 源项目契约钉住其文件树/构建/依赖/落库;过程则由 trace 契约记录(公共核心子集 + 各线自己的扩展段)。
|
||||
返回的是**结构化源项目**(改源不改包、重新构建),由源项目契约钉住文件树/构建/依赖/落库;过程由 trace 契约记录。
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
@ -105,74 +99,74 @@ flowchart TB
|
||||
|
||||
### 图 8 · 关键类图
|
||||
|
||||
让 vibecoding 的人知道用哪些类、怎么组合:实线类是 AgentScope 官方的,`<<自建>>` 标注的是 tier2 挂在官方基类上写的。
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class Agent {
|
||||
+reply()
|
||||
+react_config
|
||||
+middlewares
|
||||
}
|
||||
class ReActConfig {
|
||||
+max_iters
|
||||
}
|
||||
class Toolkit {
|
||||
+register_tool_function()
|
||||
}
|
||||
class MiddlewareBase {
|
||||
+on_reasoning()
|
||||
+on_model_call()
|
||||
}
|
||||
class Agent { +reply() +react_config +middlewares }
|
||||
class ReActConfig { +max_iters }
|
||||
class Toolkit { +register_tool_function() }
|
||||
class MiddlewareBase { +on_reasoning() +on_model_call() }
|
||||
class ReplyBudgetControlMiddleware
|
||||
class TimeoutMiddleware
|
||||
class StuckDetectMiddleware
|
||||
class AnthropicChatModel {
|
||||
+thinking_enable
|
||||
+thinking_budget
|
||||
+credential.base_url
|
||||
}
|
||||
class AgentState {
|
||||
+cur_iter
|
||||
+context
|
||||
}
|
||||
class AnthropicChatModel { +thinking_enable +credential.base_url }
|
||||
class AgentState { +cur_iter +context }
|
||||
class WorkspaceBase
|
||||
Agent --> ReActConfig
|
||||
Agent --> Toolkit
|
||||
Agent --> MiddlewareBase
|
||||
Agent --> AnthropicChatModel
|
||||
Agent --> AgentState
|
||||
Agent ..> WorkspaceBase : offloader(轴②)
|
||||
WorkspaceBase ..> Toolkit : 资源注入(轴①)
|
||||
MiddlewareBase <|-- ReplyBudgetControlMiddleware
|
||||
MiddlewareBase <|-- TimeoutMiddleware
|
||||
MiddlewareBase <|-- StuckDetectMiddleware
|
||||
WorkspaceBase <|-- LocalWorkspace
|
||||
WorkspaceBase <|-- DockerWorkspace
|
||||
WorkspaceBase <|-- E2BWorkspace
|
||||
note for Agent "无状态引擎 · 每 run 现组装(非常驻)· 状态全在 AgentState"
|
||||
note for TimeoutMiddleware "自建"
|
||||
note for StuckDetectMiddleware "自建"
|
||||
```
|
||||
|
||||
## 3. 图清单与状态
|
||||
|
||||
| # | 图 | 覆盖步骤 | 形式 | 状态 |
|
||||
|---|---|---|---|---|
|
||||
| 1 | 系统全景 / 部署 | 定位 | svg | ✅ |
|
||||
| 2 | 调用时序(cloud ↔ agentic) | 启动 + 调用 + 返回 | svg | ✅ |
|
||||
| 3 | 运行时内部架构 | 运行时 | svg | ✅ |
|
||||
| 4 | 单写者 ReAct 循环流程 | 运行时动态 | svg | ✅ |
|
||||
| 5 | 编排与配置结构 | 编排 + 配置 | mermaid | ✅ |
|
||||
| 6 | reuse 边界全景 | 复用边界 | svg | ✅ |
|
||||
| 7 | 产物与契约 | 返回形态 | mermaid | ✅ |
|
||||
| 8 | 关键类图 | 实现 | mermaid | ✅ |
|
||||
| # | 图 | 形式 | 状态 |
|
||||
|---|---|---|---|
|
||||
| A | 生成两阶段(工作室→单写) | svg | ✅ 新增 |
|
||||
| 1 | 系统全景 / 部署 | svg | ✅ |
|
||||
| 2 | 调用时序(cloud↔agentic) | svg | ✅ |
|
||||
| 3 | 运行时内部(真实对象结构) | svg | ✅ 重画 |
|
||||
| 4 | 单写 ReAct 循环流程 | svg | ✅ |
|
||||
| 5 | 编排与配置 | mermaid | ✅ |
|
||||
| 6 | reuse 边界(二维) | svg | ✅ 重做 |
|
||||
| 7 | 产物与契约 | mermaid | ✅ |
|
||||
| 8 | 关键类图 | mermaid | ✅ |
|
||||
|
||||
## 4. 术语映射(图 3 沿用旧词,此处对齐官方)
|
||||
## 4. 三层校验(创始人定义)
|
||||
|
||||
图 3(先出的金样板)用了「沙箱 / API-Session / 可观测」等旧词,与 AgentScope 2.0 官方术语对应如下,后续若重绘图 3 一并对齐:
|
||||
| 层 | 内容 | 处置 | 工具包 |
|
||||
|---|---|---|---|
|
||||
| **L1 硬约束** | 编译报错 / 启动报错 / 运行错误日志 | **必须解决 · 循环** | 确定性:构建日志 / console error / CDP 错误捕获(九门多数落此) |
|
||||
| **L2 设计符合** | 玩法/关卡实现 vs 最新设计、UI 缺组件 | **尽量解决** | 设计符合度校验(部分九门:机制进展) |
|
||||
| **L3 效果** | 特效 / 画面美观 / 好不好玩 | **只评分不解决** | M3 视觉软检(绝不阻塞、绝不拒发) |
|
||||
|
||||
| 图里旧词 | AgentScope 2.0 官方 |
|
||||
**迭代原则**:初期只识别硬问题(L1),L2/L3 渐进完善;**绝不让效果问题阻塞真问题**;用户可经 HITL 发消息要求继续解决任意层。
|
||||
|
||||
## 5. 关键校正记录(创始人 4 问 · 2026-06-22)
|
||||
|
||||
1. **补两阶段**:原图只画了单写 agent;补「工作室多 agent 设计(Agent Team 星形)→ 单写实现」两阶段(图 A)。单写约束只管「写代码」那步。
|
||||
2. **environment 嵌套纠错**:environment = Workspace 是 Agent 的执行环境,沿两轴(资源→Toolkit / offloader)注入 Agent;Agent 持有引用、非嵌套;Agent 实例非常驻(图 3 重画)。
|
||||
3. **验收改三层**:L1 必须 / L2 尽量 / L3 只评分,不同工具包,初期只做 L1(§4、图 3/4)。
|
||||
4. **复用边界二维**:来源 × 共享范围;官方能力列全;自建严格核对(该删的改用官方);公共组件 = 自建 ∩ 共享(图 6)。
|
||||
|
||||
## 6. 术语映射(图里词 → AgentScope 2.0 官方)
|
||||
|
||||
| 图里词 | AgentScope 2.0 官方 |
|
||||
|---|---|
|
||||
| 沙箱工作站 | **Workspace**(LocalWorkspace / DockerWorkspace / E2BWorkspace) |
|
||||
| API / Session 层 | **Agent Service**(REST + SSE,`/sessions` 等) |
|
||||
| 可观测(OTel) | **Event System**(typed stream)→ TracingMiddleware → Studio |
|
||||
| 熔断(Middleware) | **Middleware 洋葱**(`on_reasoning` / `on_model_call` …) |
|
||||
| environment / 沙箱工作站 | **Workspace**(LocalWorkspace / DockerWorkspace / E2BWorkspace),经 Toolkit + offloader 双轴接入 Agent |
|
||||
| API / Session 层 | **Agent Service**(REST + SSE,`/sessions` 等;Agent 非常驻) |
|
||||
| 可观测 | **Event System**(typed stream)→ TracingMiddleware → Studio |
|
||||
| 熔断 | **Middleware 洋葱**(`on_reasoning`/`on_model_call`…) |
|
||||
| checkpoint | **AgentState**(pydantic)+ StorageBase(Redis) |
|
||||
| 工作室多 agent | **Agent Team**(leader-worker 星形 · TeamCreate/AgentCreate/TeamSay) |
|
||||
|
||||
94
docs/architecture/架构/生成引擎/assets/00-生成两阶段.svg
Normal file
@ -0,0 +1,94 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 740" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
|
||||
<defs>
|
||||
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
|
||||
<marker id="arrowG" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#16a34a"/></marker>
|
||||
<style>
|
||||
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
|
||||
.h1{font-size:24px;font-weight:700}.h2{font-size:15px;font-weight:700}.lbl{font-size:13px;font-weight:600}
|
||||
.flow{stroke:#334155;stroke-width:1.8;fill:none}.star{stroke:#16a34a;stroke-width:1.5;fill:none}
|
||||
</style>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="1480" height="740" fill="#f8fafc"/>
|
||||
<text x="40" y="38" class="t h1">图 A · 生成两阶段:工作室(多 agent 设计)→ 单写(实现)</text>
|
||||
<text x="40" y="58" class="mut sm">AgentScope Agent Team 星形:leader 拆解+调度,多专业设计 worker 发散;再交单写 agent 实现。设计用多 agent(发散·专业分工),实现用单写(防并行写冲突)。</text>
|
||||
|
||||
<!-- 阶段1 工作室 -->
|
||||
<rect x="40" y="80" width="720" height="600" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="58" y="106" class="t h2">阶段 1 · 游戏工作室(Agent Team 星形)</text>
|
||||
|
||||
<rect x="58" y="120" width="200" height="46" rx="9" fill="#e2e8f0" stroke="#0f172a" stroke-width="1.6"/>
|
||||
<text x="158" y="148" text-anchor="middle" class="t sm">一句话 brief + play_spec</text>
|
||||
|
||||
<rect x="58" y="320" width="200" height="100" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="158" y="356" text-anchor="middle" class="t lbl">leader agent</text>
|
||||
<text x="158" y="378" text-anchor="middle" class="mut xs">意图分析 + 拆解</text>
|
||||
<text x="158" y="396" text-anchor="middle" class="mut xs">+ 调度 + 收敛</text>
|
||||
|
||||
<line x1="158" y1="166" x2="158" y2="318" class="flow" marker-end="url(#arrow)"/>
|
||||
|
||||
<!-- 7 worker -->
|
||||
<rect x="330" y="118" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="147" class="t sm">玩法设计 worker</text>
|
||||
<rect x="330" y="176" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="205" class="t sm">关卡设计 worker</text>
|
||||
<rect x="330" y="234" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="263" class="t sm">数值/机制设计 worker</text>
|
||||
<rect x="330" y="292" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="321" class="t sm">UI 设计 worker</text>
|
||||
<rect x="330" y="350" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="379" class="t sm">音乐 / 音效设计 worker</text>
|
||||
<rect x="330" y="408" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="437" class="t sm">特效设计 worker</text>
|
||||
<rect x="330" y="466" width="410" height="48" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.6"/><text x="344" y="495" class="t sm">资产设计 worker</text>
|
||||
|
||||
<!-- leader → worker 扇出 -->
|
||||
<line x1="258" y1="360" x2="328" y2="142" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="362" x2="328" y2="200" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="366" x2="328" y2="258" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="370" x2="328" y2="316" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="374" x2="328" y2="374" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="378" x2="328" y2="432" class="star" marker-end="url(#arrowG)"/>
|
||||
<line x1="258" y1="382" x2="328" y2="490" class="star" marker-end="url(#arrowG)"/>
|
||||
|
||||
<text x="58" y="450" class="mut xs">· 基于玩法模板 prompt + 工程初始化模板</text>
|
||||
<text x="58" y="470" class="mut xs">· worker 不互连(星形)·</text>
|
||||
<text x="58" y="488" class="mut xs"> TeamSay 收发汇 leader</text>
|
||||
|
||||
<rect x="58" y="540" width="682" height="120" rx="10" fill="#bbf7d0" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="72" y="566" class="t lbl">leader 收敛 → 结构化设计</text>
|
||||
<text x="72" y="590" class="mut xs">GDD(玩法/胜负/机制)+ 关卡/数值表 + UI 规格 + 音乐音效/特效设计</text>
|
||||
<text x="72" y="610" class="mut xs">+ 资产清单 + 工程骨架初始化(玩法模板代码脚手架)</text>
|
||||
<text x="72" y="636" class="mut xs">Agent Team 工具:TeamCreate / AgentCreate(派生 worker)/ TeamSay / TeamDelete · 经 MessageBus 异步驱动</text>
|
||||
|
||||
<!-- 移交 -->
|
||||
<line x1="740" y1="600" x2="788" y2="350" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="746" y="475" class="xs t">移交结构化设计</text>
|
||||
<text x="746" y="492" class="xs t">+ 工程骨架</text>
|
||||
|
||||
<!-- 阶段2 单写 -->
|
||||
<rect x="790" y="80" width="650" height="600" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="808" y="106" class="t h2">阶段 2 · 单写实现</text>
|
||||
|
||||
<rect x="828" y="130" width="574" height="70" rx="10" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="838" y="156" class="t sm">结构化设计(GDD + 各维度 + 工程骨架)</text>
|
||||
<text x="838" y="178" class="mut xs">阶段 1 的产物,作为单写 agent 的输入</text>
|
||||
|
||||
<rect x="868" y="244" width="494" height="74" rx="10" fill="#dcfce7" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="1115" y="272" text-anchor="middle" class="t lbl">单写 agent(实现)</text>
|
||||
<text x="1115" y="296" text-anchor="middle" class="mut xs">ReAct 循环写代码(运行时内部 → 图 3)</text>
|
||||
|
||||
<rect x="868" y="356" width="494" height="64" rx="10" fill="#ffffff" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="1115" y="383" text-anchor="middle" class="t sm">三层校验(L1 必须 / L2 尽量 / L3 评分)</text>
|
||||
<text x="1115" y="404" text-anchor="middle" class="mut xs">未过 → repair 回环</text>
|
||||
|
||||
<rect x="868" y="458" width="494" height="64" rx="10" fill="#bbf7d0" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="1115" y="485" text-anchor="middle" class="t lbl">产出:结构化游戏源项目</text>
|
||||
<text x="1115" y="506" text-anchor="middle" class="mut xs">→ 落库 MySQL + OSS</text>
|
||||
|
||||
<line x1="1115" y1="200" x2="1115" y2="242" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="1115" y1="318" x2="1115" y2="354" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="1115" y1="420" x2="1115" y2="456" class="flow" marker-end="url(#arrow)"/>
|
||||
<path d="M 868,388 L 828,388 L 828,280 L 866,280" class="flow" marker-end="url(#arrow)"/>
|
||||
|
||||
<rect x="828" y="556" width="574" height="104" rx="10" fill="#ffffff" stroke="#2563eb" stroke-width="1.4"/>
|
||||
<text x="842" y="582" class="t sm" font-weight="700">为什么这样分两阶段:</text>
|
||||
<text x="842" y="606" class="mut xs">· 设计阶段是发散、各专业不共享代码状态 → 多 agent 并行最优</text>
|
||||
<text x="842" y="628" class="mut xs">· 实现阶段多系统共享同一套代码/约定 → 单写防不一致</text>
|
||||
<text x="842" y="650" class="mut xs"> (曾把 Flappy 拆并行写,背景跑成了马里奥)</text>
|
||||
|
||||
<text x="40" y="724" class="mut xs">映射:自治富游戏引擎.md(单写者)· tier2实现详设.md · agentic集成架构.md | 基于 agentscope 2.0.3 Agent Team 源码实证 | 设计变动须同步本图</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
@ -1,209 +1,120 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 1190" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 1060" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
|
||||
<defs>
|
||||
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L8,3 L0,6 Z" fill="#334155"/>
|
||||
</marker>
|
||||
<marker id="arrowBack" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
||||
<path d="M0,0 L8,3 L0,6 Z" fill="#64748b"/>
|
||||
</marker>
|
||||
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#334155"/></marker>
|
||||
<marker id="arrowB" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth"><path d="M0,0 L8,3 L0,6 Z" fill="#2563eb"/></marker>
|
||||
<style>
|
||||
.t{fill:#0f172a}.w{fill:#ffffff}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
|
||||
.h1{font-size:24px;font-weight:700}.h2{font-size:16px;font-weight:700}.lbl{font-size:13px;font-weight:600}
|
||||
.flow{stroke:#334155;stroke-width:2;fill:none}.flowb{stroke:#64748b;stroke-width:1.5;fill:none;stroke-dasharray:5 4}
|
||||
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
|
||||
.h1{font-size:24px;font-weight:700}.h2{font-size:14px;font-weight:700}.lbl{font-size:13px;font-weight:600}
|
||||
.flow{stroke:#334155;stroke-width:2;fill:none}.inj{stroke:#2563eb;stroke-width:1.8;fill:none;stroke-dasharray:6 3}
|
||||
.badge{font-size:10.5px;font-weight:700}
|
||||
</style>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="1480" height="1060" fill="#f8fafc"/>
|
||||
<text x="40" y="38" class="t h1">图 3 · 运行时内部架构(AgentScope 真实对象结构)</text>
|
||||
<text x="40" y="58" class="mut sm">Agent 是无状态引擎、持有 Workspace(双轴注入);Agent 实例非常驻(每 run 现组装);验收三层。四层(environment/harness/context/prompt)为职责视角,叠在真实结构上。</text>
|
||||
|
||||
<rect x="0" y="0" width="1480" height="1190" fill="#f8fafc"/>
|
||||
<text x="40" y="40" class="t h1">图 3 · tier2 agentic 运行时内部架构(金样板)</text>
|
||||
<text x="40" y="60" class="mut sm">单写者 ReAct 循环 · 四层(environment / harness / context / prompt) · 标注大厂生产维度 · 颗粒度面向 vibecoding</text>
|
||||
<rect x="30" y="72" width="1420" height="920" rx="14" fill="#ffffff" stroke="#0f172a" stroke-width="2.5"/>
|
||||
<text x="48" y="96" class="t h2">Agent Service(FastAPI · 多租户 · durable) — Agent 实例非常驻:每 run 现组装 → 跑完即弃,状态全在可持久化 AgentState</text>
|
||||
|
||||
<!-- service 外框 -->
|
||||
<rect x="30" y="74" width="1420" height="836" rx="14" fill="#ffffff" stroke="#0f172a" stroke-width="2.5"/>
|
||||
<text x="50" y="98" class="t h2">tier2 agentic service · 独立进程(运行期零耦合 SAA) · AgentScope 2.0.3 · create_app(FastAPI · 多租户 · 多会话)</text>
|
||||
<!-- 入口 -->
|
||||
<rect x="50" y="110" width="150" height="44" rx="9" fill="#e2e8f0" stroke="#0f172a" stroke-width="1.6"/>
|
||||
<text x="125" y="137" text-anchor="middle" class="t sm">game-cloud</text>
|
||||
<rect x="248" y="110" width="430" height="44" rx="9" fill="#f1f5f9" stroke="#0f172a" stroke-width="1.6"/>
|
||||
<text x="260" y="130" class="t xs">ChatService:取 AgentRecord(模板) + SessionRecord.state</text>
|
||||
<text x="260" y="147" class="mut xs">→ 现组装 Agent → 跑完写回 state(Agent 非常驻)</text>
|
||||
<line x1="200" y1="132" x2="246" y2="132" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="690" y="130" class="xs mut">REST /sessions</text>
|
||||
<text x="690" y="146" class="xs mut">+ SSE(可恢复)</text>
|
||||
|
||||
<!-- 入口行 -->
|
||||
<rect x="55" y="112" width="180" height="52" rx="10" fill="#e2e8f0" stroke="#0f172a" stroke-width="2"/>
|
||||
<text x="145" y="135" text-anchor="middle" class="t lbl">game-cloud</text>
|
||||
<text x="145" y="153" text-anchor="middle" class="mut xs">(Java · 调用方)</text>
|
||||
<!-- Agent 引擎 -->
|
||||
<rect x="50" y="186" width="660" height="498" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="66" y="210" class="t h2">Agent · 无状态 ReAct 引擎(每 run 现组装) 〔官方〕</text>
|
||||
|
||||
<rect x="300" y="112" width="395" height="52" rx="10" fill="#f1f5f9" stroke="#0f172a" stroke-width="2"/>
|
||||
<text x="312" y="134" class="t lbl">API / Session 层</text>
|
||||
<text x="312" y="153" class="mut xs">建 session · 异步长任务 · HITL 中断/恢复 · 取消 · 会话隔离</text>
|
||||
<text x="640" y="128" class="badge" fill="#7c3aed">伸缩</text>
|
||||
<text x="640" y="153" class="badge" fill="#0ea5e9">可靠</text>
|
||||
<rect x="66" y="222" width="306" height="50" rx="8" fill="#f5f3ff" stroke="#7c3aed" stroke-width="1.6"/>
|
||||
<text x="76" y="242" class="t xs">model:AnthropicChatModel(M3 thinking)</text>
|
||||
<text x="76" y="259" class="mut xs">→ new-api /v1/messages + NEWAPI_KEY</text>
|
||||
<rect x="382" y="222" width="312" height="50" rx="8" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="392" y="242" class="t xs">toolkit:内置工具 + 游戏工具</text>
|
||||
<text x="392" y="259" class="mut xs">写多文件 / esbuild / headless / CDP 探针</text>
|
||||
|
||||
<line x1="235" y1="138" x2="298" y2="138" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="238" y="130" class="xs mut">HTTP POST /generate (brief+play_spec)</text>
|
||||
<rect x="66" y="280" width="306" height="54" rx="8" fill="#fffbeb" stroke="#d97706" stroke-width="1.6" stroke-dasharray="5 4"/>
|
||||
<text x="76" y="300" class="t xs">middlewares(6-hook 洋葱)</text>
|
||||
<text x="76" y="319" class="mut xs">预算软刹〔官方〕+ 超时/卡死/硬杀〔自建〕</text>
|
||||
<rect x="382" y="280" width="312" height="54" rx="8" fill="#f1f5f9" stroke="#475569" stroke-width="1.6"/>
|
||||
<text x="392" y="300" class="t xs">state:AgentState 〔一切可变态·可持久化〕</text>
|
||||
<text x="392" y="319" class="mut xs">context / cur_iter / permission / tool / tasks</text>
|
||||
|
||||
<!-- harness 控制面 -->
|
||||
<rect x="55" y="190" width="612" height="362" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2"/>
|
||||
<text x="70" y="214" class="t h2">harness 控制面 · 单写者 ReAct 循环</text>
|
||||
<rect x="66" y="342" width="628" height="40" rx="8" fill="#ffffff" stroke="#16a34a" stroke-width="1.4"/>
|
||||
<text x="76" y="367" class="mut xs">offloader = Workspace(context 卸载) · PermissionEngine(用 state.permission_context · 驱动 HITL)</text>
|
||||
|
||||
<!-- middleware 洋葱 -->
|
||||
<rect x="72" y="226" width="578" height="308" rx="10" fill="none" stroke="#ea580c" stroke-width="1.8" stroke-dasharray="6 4"/>
|
||||
<text x="84" y="245" class="lbl" fill="#ea580c">Middleware 洋葱链</text>
|
||||
<text x="230" y="245" class="xs mut">预算软刹 ReplyBudgetControlMiddleware〔官方〕 | 超时 / 卡死 / fail-closed 硬杀〔自建〕</text>
|
||||
<text x="600" y="245" class="badge" fill="#16a34a">成本·可靠</text>
|
||||
<!-- ReAct 循环 -->
|
||||
<text x="66" y="408" class="lbl" fill="#15803d">ReAct 循环(max_iters,默认 20)</text>
|
||||
<rect x="66" y="418" width="150" height="48" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/><text x="141" y="447" text-anchor="middle" class="t sm">① reason</text>
|
||||
<rect x="230" y="418" width="150" height="48" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/><text x="305" y="447" text-anchor="middle" class="t sm">② act</text>
|
||||
<rect x="394" y="418" width="146" height="48" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/><text x="467" y="447" text-anchor="middle" class="t sm">③ observe</text>
|
||||
<rect x="554" y="418" width="140" height="48" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/><text x="624" y="447" text-anchor="middle" class="t sm">④ 验收</text>
|
||||
<line x1="216" y1="442" x2="228" y2="442" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="380" y1="442" x2="392" y2="442" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="540" y1="442" x2="552" y2="442" class="flow" marker-end="url(#arrow)"/>
|
||||
<path d="M 624,466 L 624,484 L 141,484 L 141,468" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="360" y="500" text-anchor="middle" class="xs mut">未过 → repair 回环(同一 agent)</text>
|
||||
<text x="66" y="524" class="mut xs">· 收尾 = 产纯文本(不调工具);到 max_iters / 熔断 → 优雅收尾(ExceedMaxItersEvent)</text>
|
||||
<text x="66" y="544" class="mut xs">· 四熔断:步数(官方) / 预算(软刹官方+硬杀自建) / 卡死探测(自建) / 双超时(自建)</text>
|
||||
<rect x="66" y="556" width="628" height="26" rx="6" fill="#fef2f2" stroke="#dc2626" stroke-width="1.2" stroke-dasharray="4 3"/>
|
||||
<text x="76" y="573" class="xs" fill="#b91c1c">铁律:确定性归机器、绝不让 LLM 自评;L3 效果软检永不放行/拒发(防 Goodhart)</text>
|
||||
<text x="66" y="608" class="badge" fill="#16a34a">可靠</text><text x="120" y="608" class="badge" fill="#dc2626">安全</text><text x="174" y="608" class="badge" fill="#0891b2">数据</text>
|
||||
|
||||
<!-- Agent 框 -->
|
||||
<rect x="90" y="258" width="542" height="262" rx="10" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
|
||||
<text x="104" y="280" class="t lbl">Agent · ReActConfig(max_iters,默认 20) 〔官方〕</text>
|
||||
<!-- Workspace -->
|
||||
<rect x="740" y="186" width="360" height="290" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="756" y="210" class="t h2">Workspace = Agent 执行环境</text>
|
||||
<text x="756" y="229" class="mut xs">Local / Docker / E2B 〔官方〕</text>
|
||||
<rect x="1040" y="196" width="52" height="18" rx="3" fill="#dc2626"/><text x="1045" y="209" class="badge" fill="#fff">安全</text>
|
||||
<rect x="756" y="244" width="155" height="38" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="766" y="267" class="t xs">.mcp(MCP 进程)</text>
|
||||
<rect x="925" y="244" width="158" height="38" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="935" y="267" class="t xs">skills(动态)</text>
|
||||
<rect x="756" y="290" width="155" height="38" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="766" y="313" class="t xs">data(卸载文件)</text>
|
||||
<rect x="925" y="290" width="158" height="38" rx="7" fill="#dbeafe" stroke="#2563eb" stroke-width="1.4"/><text x="935" y="313" class="t xs">sessions(上下文)</text>
|
||||
<text x="756" y="358" class="t xs" font-weight="700">双轴注入 Agent:</text>
|
||||
<text x="756" y="380" class="mut xs">① 资源(tools/MCP/skills) → get_toolkit → Toolkit</text>
|
||||
<text x="756" y="400" class="mut xs">② 本身作 offloader(context 卸载)</text>
|
||||
<text x="756" y="424" class="mut xs">→ Agent 持有 Workspace 引用,不是嵌在里面</text>
|
||||
<text x="756" y="448" class="mut xs">真正『跑在 Workspace 里』= MCP 进程 / skills / 文件</text>
|
||||
|
||||
<!-- 循环 4 步 -->
|
||||
<rect x="104" y="296" width="118" height="56" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/>
|
||||
<text x="163" y="320" text-anchor="middle" class="t lbl">① reason</text>
|
||||
<text x="163" y="339" text-anchor="middle" class="mut xs">推理(调 M3)</text>
|
||||
<line x1="740" y1="252" x2="696" y2="247" class="inj" marker-end="url(#arrowB)"/>
|
||||
<text x="700" y="240" class="xs" fill="#2563eb">①资源→Toolkit</text>
|
||||
<line x1="740" y1="362" x2="696" y2="362" class="inj" marker-end="url(#arrowB)"/>
|
||||
<text x="700" y="356" class="xs" fill="#2563eb">②offloader</text>
|
||||
|
||||
<rect x="236" y="296" width="118" height="56" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/>
|
||||
<text x="295" y="320" text-anchor="middle" class="t lbl">② act</text>
|
||||
<text x="295" y="339" text-anchor="middle" class="mut xs">调工具(沙箱)</text>
|
||||
<!-- 三层校验 -->
|
||||
<rect x="740" y="500" width="690" height="200" rx="12" fill="#ffffff" stroke="#15803d" stroke-width="2.4"/>
|
||||
<text x="756" y="524" class="t h2">三层校验(不同工具包)</text>
|
||||
<rect x="1378" y="510" width="52" height="18" rx="3" fill="#15803d"/><text x="1383" y="523" class="badge" fill="#fff">质量</text>
|
||||
<rect x="756" y="536" width="658" height="46" rx="8" fill="#bbf7d0" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="766" y="557" class="t sm">L1 硬约束:编译 / 启动 / 运行报错</text>
|
||||
<text x="766" y="575" class="mut xs">→ 必须解决 · 循环 · 确定性工具(构建日志 / console error / CDP 错误捕获)</text>
|
||||
<rect x="756" y="588" width="658" height="44" rx="8" fill="#d9f99d" stroke="#65a30d" stroke-width="1.8"/>
|
||||
<text x="766" y="609" class="t sm">L2 设计符合:玩法/关卡实现 vs 最新设计、UI 缺组件</text>
|
||||
<text x="766" y="626" class="mut xs">→ 尽量解决 · 设计符合度校验工具</text>
|
||||
<rect x="756" y="638" width="658" height="44" rx="8" fill="#fef9c3" stroke="#ca8a04" stroke-width="1.8"/>
|
||||
<text x="766" y="659" class="t sm">L3 效果:特效 / 画面美观 / 好不好玩</text>
|
||||
<text x="766" y="676" class="mut xs">→ 只评分不解决 · M3 软检 · 绝不阻塞;初期只做 L1,L2/L3 渐进;用户可 HITL 要求继续解决任意层</text>
|
||||
|
||||
<rect x="368" y="296" width="118" height="56" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/>
|
||||
<text x="427" y="320" text-anchor="middle" class="t lbl">③ observe</text>
|
||||
<text x="427" y="339" text-anchor="middle" class="mut xs">收产物+截图</text>
|
||||
<!-- Event System -->
|
||||
<rect x="50" y="700" width="660" height="68" rx="10" fill="#f1f5f9" stroke="#475569" stroke-width="2"/>
|
||||
<text x="66" y="724" class="t h2">Event System(可观测)</text>
|
||||
<rect x="640" y="708" width="56" height="18" rx="3" fill="#0ea5e9"/><text x="645" y="721" class="badge" fill="#fff">观测</text>
|
||||
<text x="66" y="746" class="mut xs">reply_stream → AgentEvent(text / thinking / tool / result)</text>
|
||||
<text x="66" y="762" class="mut xs">→ SSE 流给 cloud(可恢复 · 见图 2)+ TracingMiddleware → OTel → Studio</text>
|
||||
|
||||
<rect x="500" y="296" width="118" height="56" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.6"/>
|
||||
<text x="559" y="320" text-anchor="middle" class="t lbl">④ 验收裁决</text>
|
||||
<text x="559" y="339" text-anchor="middle" class="mut xs">过 / 修 / 熔断</text>
|
||||
|
||||
<line x1="222" y1="324" x2="234" y2="324" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="354" y1="324" x2="366" y2="324" class="flow" marker-end="url(#arrow)"/>
|
||||
<line x1="486" y1="324" x2="498" y2="324" class="flow" marker-end="url(#arrow)"/>
|
||||
<!-- 修复回环 -->
|
||||
<path d="M 559,352 L 559,372 L 163,372 L 163,354" class="flowb" marker-end="url(#arrowBack)"/>
|
||||
<text x="300" y="388" text-anchor="middle" class="xs" fill="#64748b">未过 → repair 回环(同一 agent 持全局,不并行拆)</text>
|
||||
|
||||
<text x="104" y="430" class="mut xs">· 收尾 = 模型产纯文本(不再调工具);到 max_iters / 熔断触发 → 优雅收尾(ExceedMaxItersEvent)</text>
|
||||
<text x="104" y="450" class="mut xs">· 四熔断:步数(max_iters·官方) / 预算(软刹官方+硬杀自建) / 卡死探测(自建) / 双超时(自建)</text>
|
||||
<text x="104" y="470" class="mut xs">· 长程一致性:checkpoint(AgentState) + 半轮副作用幂等</text>
|
||||
<rect x="104" y="484" width="514" height="26" rx="6" fill="#fef2f2" stroke="#dc2626" stroke-width="1.2" stroke-dasharray="4 3"/>
|
||||
<text x="114" y="501" class="xs" fill="#b91c1c">铁律:确定性归机器、绝不让 LLM 给自己打分;M3 软检永远不放行/不拒发(防 Goodhart)</text>
|
||||
|
||||
<!-- environment 沙箱 -->
|
||||
<rect x="690" y="190" width="760" height="250" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="2"/>
|
||||
<text x="706" y="214" class="t h2">environment · 沙箱工作站(AgentScope sandbox)</text>
|
||||
<text x="1380" y="210" class="badge" fill="#dc2626">安全</text>
|
||||
|
||||
<rect x="708" y="226" width="232" height="56" rx="8" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="824" y="249" text-anchor="middle" class="t lbl">Filesystem</text>
|
||||
<text x="824" y="268" text-anchor="middle" class="mut xs">写多文件 src/ 工程</text>
|
||||
|
||||
<rect x="952" y="226" width="232" height="56" rx="8" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="1068" y="249" text-anchor="middle" class="t lbl">CODE</text>
|
||||
<text x="1068" y="268" text-anchor="middle" class="mut xs">esbuild 构建 / shell</text>
|
||||
|
||||
<rect x="1196" y="226" width="236" height="56" rx="8" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="1314" y="249" text-anchor="middle" class="t lbl">Browser</text>
|
||||
<text x="1314" y="268" text-anchor="middle" class="mut xs">headless 真跑 + 截图</text>
|
||||
|
||||
<rect x="708" y="294" width="340" height="58" rx="8" fill="#dbeafe" stroke="#2563eb" stroke-width="2.6"/>
|
||||
<text x="718" y="316" class="t lbl">CDP 探针 〔公共组件·双线〕</text>
|
||||
<text x="718" y="335" class="mut xs">注入输入 / 帧 delta / 像素回读 / 活动 hash</text>
|
||||
|
||||
<rect x="1060" y="294" width="372" height="58" rx="8" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="1070" y="316" class="t lbl">引擎能力包(Phaser,第一版硬编码)</text>
|
||||
<text x="1070" y="335" class="mut xs">能装载工具 / RAG / skill;Pixi 后置抽接口</text>
|
||||
|
||||
<text x="708" y="378" class="mut xs">· 沙箱隔离 = 安全边界;官方 Browser 沙箱不暴露 page.evaluate → CDP 探针靠同容器 run_shell_command 自驱(自建)</text>
|
||||
<text x="708" y="398" class="mut xs">· 硬代码=沙箱接线/权限硬上限;版本化审计=依赖锁/引擎版本/构建 profile;热配置=资源软配额</text>
|
||||
|
||||
<!-- Model -->
|
||||
<rect x="690" y="458" width="760" height="92" rx="12" fill="#f5f3ff" stroke="#7c3aed" stroke-width="2"/>
|
||||
<text x="706" y="482" class="t h2">Model · AnthropicChatModel(M3) 〔官方〕</text>
|
||||
<text x="1380" y="478" class="badge" fill="#16a34a">成本</text>
|
||||
<text x="706" y="506" class="mut sm">thinking_enable + thinking_budget(thinking 分离)→ AnthropicCredential.base_url = new-api `/v1/messages` + NEWAPI_KEY</text>
|
||||
<text x="706" y="528" class="mut xs">统一出口=new-api(协议不锁,Anthropic 原生);约束 max_tokens > thinking_budget;自动配 AnthropicChatFormatter</text>
|
||||
|
||||
<!-- context -->
|
||||
<rect x="55" y="590" width="612" height="200" rx="12" fill="#fffbeb" stroke="#d97706" stroke-width="2"/>
|
||||
<text x="70" y="614" class="t h2">context · 运行时载荷</text>
|
||||
<text x="600" y="610" class="badge" fill="#0891b2">数据</text>
|
||||
|
||||
<rect x="72" y="626" width="286" height="62" rx="8" fill="#fef3c7" stroke="#d97706" stroke-width="1.6"/>
|
||||
<text x="82" y="648" class="t lbl">Memory(ReMe)〔官方〕</text>
|
||||
<text x="82" y="668" class="mut xs">持久 + 向量/BM25 检索 + 压缩</text>
|
||||
|
||||
<rect x="368" y="626" width="282" height="62" rx="8" fill="#fef3c7" stroke="#d97706" stroke-width="1.6" stroke-dasharray="6 4"/>
|
||||
<text x="378" y="648" class="t lbl">debug 案例库 〔自建·虚线〕</text>
|
||||
<text x="378" y="668" class="mut xs">签名精确匹配,命中省一次 LLM</text>
|
||||
|
||||
<rect x="72" y="698" width="286" height="54" rx="8" fill="#fef3c7" stroke="#d97706" stroke-width="1.6"/>
|
||||
<text x="82" y="720" class="t lbl">源项目视图 / GDD</text>
|
||||
<text x="82" y="739" class="mut xs">错误史 / 预算状态 / 当前 src 切片</text>
|
||||
|
||||
<rect x="368" y="698" width="282" height="54" rx="8" fill="#fef3c7" stroke="#d97706" stroke-width="1.6"/>
|
||||
<text x="378" y="720" class="t lbl">prompt(⊂ context)</text>
|
||||
<text x="378" y="739" class="mut xs">sys_prompt + agent skills(热配置)</text>
|
||||
|
||||
<!-- 验收 -->
|
||||
<rect x="690" y="590" width="760" height="200" rx="12" fill="#ffffff" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="706" y="614" class="t h2">双层验收门</text>
|
||||
<text x="1392" y="610" class="badge" fill="#15803d">质量</text>
|
||||
|
||||
<rect x="708" y="626" width="724" height="64" rx="8" fill="#bbf7d0" stroke="#15803d" stroke-width="2.4"/>
|
||||
<text x="718" y="649" class="t lbl">① 确定性硬门 〔公共组件·双线〕 → 定 pass/fail · 零 LLM 自评</text>
|
||||
<text x="718" y="671" class="mut xs">九门(引擎无关重写) + 跨表联动门 + 经济门 + latch;公共 CDP harness(泛化 Phaser)</text>
|
||||
|
||||
<rect x="708" y="700" width="724" height="58" rx="8" fill="#fef9c3" stroke="#ca8a04" stroke-width="1.8"/>
|
||||
<text x="718" y="722" class="t lbl">② M3 视觉软检</text>
|
||||
<text x="718" y="742" class="mut xs">看好不好看 / 像不像题面 → 只产观测·告警·HITL 升级;绝不放行、绝不单独拒发</text>
|
||||
|
||||
<!-- 基建带 -->
|
||||
<rect x="55" y="820" width="1395" height="72" rx="12" fill="#f1f5f9" stroke="#475569" stroke-width="2"/>
|
||||
<text x="70" y="844" class="t lbl">运行时基础设施(production)</text>
|
||||
|
||||
<rect x="72" y="852" width="395" height="32" rx="7" fill="#ffffff" stroke="#475569" stroke-width="1.4"/>
|
||||
<text x="82" y="873" class="mut xs">checkpoint:AgentState → Redis(可中断/恢复)〔数据·可靠〕</text>
|
||||
|
||||
<rect x="487" y="852" width="440" height="32" rx="7" fill="#ffffff" stroke="#475569" stroke-width="1.4"/>
|
||||
<text x="497" y="873" class="mut xs">产物:结构化游戏源项目 → 落库 MySQL + OSS(内容哈希)〔数据〕</text>
|
||||
|
||||
<rect x="947" y="852" width="485" height="32" rx="7" fill="#ffffff" stroke="#475569" stroke-width="1.4"/>
|
||||
<text x="957" y="873" class="mut xs">可观测:TracingMiddleware → OpenTelemetry → Studio(:3000)〔可观测〕</text>
|
||||
|
||||
<!-- 连线 -->
|
||||
<line x1="490" y1="166" x2="380" y2="188" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="395" y="182" class="xs mut">进生成循环</text>
|
||||
|
||||
<line x1="632" y1="300" x2="688" y2="252" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="636" y="276" class="xs mut">act</text>
|
||||
<line x1="688" y1="300" x2="632" y2="330" class="flowb" marker-end="url(#arrowBack)"/>
|
||||
<text x="636" y="332" class="xs" fill="#64748b">观测</text>
|
||||
|
||||
<line x1="560" y1="510" x2="688" y2="500" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="566" y="496" class="xs mut">reason 调 M3</text>
|
||||
|
||||
<line x1="1070" y1="440" x2="1070" y2="588" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="1080" y="520" class="xs mut">真跑产物 + 截图 → 验收</text>
|
||||
|
||||
<line x1="300" y1="552" x2="300" y2="588" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="306" y="574" class="xs mut">组装 context 载荷 → harness</text>
|
||||
|
||||
<line x1="1070" y1="790" x2="1070" y2="818" class="flow" marker-end="url(#arrow)"/>
|
||||
<text x="1080" y="810" class="xs mut">全绿 → 落库 / 观测</text>
|
||||
<!-- 四层职责标注 -->
|
||||
<rect x="50" y="784" width="1380" height="80" rx="10" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.6" stroke-dasharray="5 4"/>
|
||||
<text x="66" y="808" class="t h2">四层 = 职责视角(叠在上面的真实结构上,非并列模块)</text>
|
||||
<text x="66" y="832" class="mut xs">environment = Workspace(执行环境:工作目录 + 工具 + 沙箱) harness = Agent ReAct 循环 + Middleware(控制面)</text>
|
||||
<text x="66" y="852" class="mut xs">context = AgentState.context + 自动压缩 + offload prompt = sys_prompt + agent skills(热配置)</text>
|
||||
|
||||
<!-- 图例 -->
|
||||
<text x="40" y="948" class="t h2">生产维度图例(大厂生产环境关心)</text>
|
||||
<g class="badge">
|
||||
<rect x="40" y="962" width="14" height="14" rx="3" fill="#dc2626"/><text x="60" y="974" class="t xs">安全:沙箱隔离 / 密钥(NEWAPI_KEY) / forbidden-import / 产物消毒</text>
|
||||
<rect x="470" y="962" width="14" height="14" rx="3" fill="#0ea5e9"/><text x="490" y="974" class="t xs">可观测:trace / token / cost → Studio</text>
|
||||
<rect x="800" y="962" width="14" height="14" rx="3" fill="#16a34a"/><text x="820" y="974" class="t xs">可靠:四熔断 / checkpoint 恢复 / HITL</text>
|
||||
<rect x="1150" y="962" width="14" height="14" rx="3" fill="#16a34a"/><text x="1170" y="974" class="t xs">成本:预算闸 + quota 台账</text>
|
||||
<rect x="40" y="988" width="14" height="14" rx="3" fill="#0891b2"/><text x="60" y="1000" class="t xs">数据:状态(Redis) / 产物落库(MySQL+OSS) / 内容哈希</text>
|
||||
<rect x="470" y="988" width="14" height="14" rx="3" fill="#7c3aed"/><text x="490" y="1000" class="t xs">伸缩:create_app 多实例 / 多租户 / 会话隔离</text>
|
||||
<rect x="800" y="988" width="14" height="14" rx="3" fill="#15803d"/><text x="820" y="1000" class="t xs">质量:双层验收门(确定性 + 软检)</text>
|
||||
</g>
|
||||
|
||||
<text x="40" y="1042" class="t h2">复用边界图例</text>
|
||||
<g>
|
||||
<rect x="40" y="1056" width="40" height="24" rx="6" fill="#ffffff" stroke="#16a34a" stroke-width="2"/>
|
||||
<text x="92" y="1072" class="t xs">实线〔官方〕= AgentScope 生态现成直接用</text>
|
||||
<rect x="430" y="1056" width="40" height="24" rx="6" fill="#ffffff" stroke="#475569" stroke-width="1.8" stroke-dasharray="6 4"/>
|
||||
<text x="482" y="1072" class="t xs">虚线〔自建〕= tier2 自己写(挂官方 Middleware / 薄层)</text>
|
||||
<rect x="900" y="1056" width="40" height="24" rx="6" fill="#ffffff" stroke="#2563eb" stroke-width="2.8"/>
|
||||
<text x="952" y="1072" class="t xs">双线〔公共〕= 两条生成线共享的公共组件</text>
|
||||
</g>
|
||||
|
||||
<text x="40" y="1118" class="mut xs">映射设计档:自治富游戏引擎.md / tier2四层工程架构.md / tier2实现详设.md / agentic集成架构.md | 基于 agentscope 2.0.3 源码实证 | 设计变动须同步本图</text>
|
||||
<text x="50" y="900" class="t h2">复用边界:</text>
|
||||
<rect x="170" y="886" width="34" height="20" rx="5" fill="#fff" stroke="#16a34a" stroke-width="2"/><text x="212" y="901" class="t xs">实线〔官方〕</text>
|
||||
<rect x="320" y="886" width="34" height="20" rx="5" fill="#fff" stroke="#475569" stroke-width="1.8" stroke-dasharray="6 4"/><text x="362" y="901" class="t xs">虚线〔自建〕</text>
|
||||
<text x="480" y="901" class="mut xs">生产维度:可靠 / 安全 / 数据 / 可观测 / 质量(标在对应组件角)</text>
|
||||
<text x="50" y="958" class="mut xs">映射:tier2四层工程架构.md · 自治富游戏引擎.md | 基于 agentscope 2.0.3 源码实证(Agent 双轴持有 Workspace · Agent 非常驻 · Middleware 洋葱) | 设计变动须同步本图</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 11 KiB |
@ -38,9 +38,9 @@
|
||||
<text x="520" y="551" text-anchor="middle" class="mut xs">CDP 探针取证(公共)</text>
|
||||
|
||||
<rect x="390" y="590" width="260" height="66" rx="10" fill="#ffffff" stroke="#15803d" stroke-width="2.4"/>
|
||||
<text x="520" y="613" text-anchor="middle" class="t sm">双层验收门</text>
|
||||
<text x="520" y="632" text-anchor="middle" class="mut xs">确定性硬门 pass/fail(零 LLM 自评)</text>
|
||||
<text x="520" y="649" text-anchor="middle" class="mut xs">+ M3 视觉软检(只观测)</text>
|
||||
<text x="520" y="613" text-anchor="middle" class="t sm">三层校验</text>
|
||||
<text x="520" y="632" text-anchor="middle" class="mut xs">L1 编译/运行 · L2 设计符合</text>
|
||||
<text x="520" y="649" text-anchor="middle" class="mut xs">L3 效果(只评分·不阻塞)</text>
|
||||
|
||||
<rect x="390" y="752" width="260" height="58" rx="10" fill="#bbf7d0" stroke="#15803d" stroke-width="2"/>
|
||||
<text x="520" y="776" text-anchor="middle" class="t lbl">产出:结构化游戏源项目</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@ -1,71 +1,75 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 800" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1480 980" font-family="-apple-system,'PingFang SC','Microsoft YaHei',Segoe UI,sans-serif">
|
||||
<defs>
|
||||
<style>
|
||||
.t{fill:#0f172a}.mut{fill:#475569}.sm{font-size:12px}.xs{font-size:11px}
|
||||
.h1{font-size:24px;font-weight:700}.h2{font-size:15px;font-weight:700}.it{font-size:12.5px;fill:#0f172a}
|
||||
.h1{font-size:24px;font-weight:700}.h2{font-size:15px;font-weight:700}.it{font-size:12px;fill:#0f172a}
|
||||
</style>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="1400" height="800" fill="#f8fafc"/>
|
||||
<text x="40" y="40" class="t h1">图 6 · 复用边界全景(官方 / 自建 / 公共)</text>
|
||||
<text x="40" y="60" class="mut sm">原则:能用 AgentScope 官方现成就不自研;自建一律挂官方扩展点 / 薄层;公共组件两条生成线共享、不进 tier2 私有。</text>
|
||||
<rect x="0" y="0" width="1480" height="980" fill="#f8fafc"/>
|
||||
<text x="40" y="38" class="t h1">图 6 · 复用边界(来源 × 共享范围)</text>
|
||||
<text x="40" y="58" class="mut sm">两个维度:来源(AgentScope 官方现成 vs 自建)× 共享范围(两线公共 vs tier2 私有)。关键纠正:「公共组件」其实是<tspan font-weight="700" fill="#b91c1c">自建的共享件,不是现成的</tspan>。</text>
|
||||
|
||||
<!-- 列1 官方现成 -->
|
||||
<rect x="40" y="86" width="430" height="668" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="60" y="116" class="h2" fill="#15803d">AgentScope 生态官方现成</text>
|
||||
<text x="60" y="136" class="mut xs">〔实线 · 直接用〕</text>
|
||||
<!-- 官方现成 -->
|
||||
<rect x="40" y="86" width="590" height="788" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-width="2.4"/>
|
||||
<text x="58" y="114" class="h2" fill="#15803d">AgentScope 官方现成</text>
|
||||
<text x="58" y="133" class="mut xs">〔实线 · 直接用 · 不算 tier2 自建资产〕</text>
|
||||
<g class="it">
|
||||
<text x="60" y="172">· Agent + ReActConfig(多轮循环 + 步数熔断)</text>
|
||||
<text x="60" y="208">· Toolkit(工具注册 · execute_shell/python)</text>
|
||||
<text x="60" y="244">· Middleware 洋葱(ReplyBudgetControl 预算软刹)</text>
|
||||
<text x="60" y="280">· AnthropicChatModel + Formatter(M3 thinking)</text>
|
||||
<text x="60" y="316">· AgentState(checkpoint 状态对象)</text>
|
||||
<text x="60" y="352">· Workspace(Local / Docker / E2B 沙箱)</text>
|
||||
<text x="60" y="388">· Agent Service(REST + SSE · 多租户 · durable)</text>
|
||||
<text x="60" y="424">· Event System(text/thinking/tool/result 流)</text>
|
||||
<text x="60" y="460">· TracingMiddleware(OpenTelemetry 埋点)</text>
|
||||
<text x="60" y="496">· ReMe(持久记忆 + 检索 + 压缩)</text>
|
||||
<text x="60" y="532">· Studio(可观测 dashboard)</text>
|
||||
<text x="60" y="568">· Permission System + HITL(中断 / 恢复)</text>
|
||||
<text x="60" y="604">· generate_structured_output(结构化产出)</text>
|
||||
<text x="60" y="640">· Schedule / Credential(定时 · 托管密钥)</text>
|
||||
<text x="58" y="168">· Message & Event System(typed stream:text/thinking/tool/result)</text>
|
||||
<text x="58" y="204">· Agent(无状态 ReAct 引擎 + 工具并发执行)</text>
|
||||
<text x="58" y="240">· ReActConfig(max_iters) + ModelConfig(fallback 回退)</text>
|
||||
<text x="58" y="276">· Model(9 provider + thinking + generate_structured_output)</text>
|
||||
<text x="58" y="312">· Context(自动压缩 + offload + tool 结果截断)</text>
|
||||
<text x="58" y="348">· Tool(Toolkit + 内置工具 + ToolGroup + 并发标志)</text>
|
||||
<text x="58" y="384">· MCP 集成(stdio / HTTP)</text>
|
||||
<text x="58" y="420">· Permission System(5 mode + HITL 中断/恢复)</text>
|
||||
<text x="58" y="456">· Middleware(6 hook + 内置 Budget/Mem0/Tracing/TTS)</text>
|
||||
<text x="58" y="492">· Workspace(Local / Docker / E2B 执行环境)</text>
|
||||
<text x="58" y="528">· State / Session(AgentState + 持久化 Redis/PG)</text>
|
||||
<text x="58" y="564">· Agent Service(REST + SSE · 8 router · storage · MessageBus)</text>
|
||||
<text x="58" y="600">· Schedule(cron)+ Credential(托管密钥)</text>
|
||||
<text x="58" y="636">· Agent Team(leader-worker 多 agent · 星形)</text>
|
||||
<text x="58" y="672">· Embedding / Formatter / Skill / Exception</text>
|
||||
</g>
|
||||
<rect x="58" y="700" width="554" height="150" rx="10" fill="#fef2f2" stroke="#dc2626" stroke-width="1.4"/>
|
||||
<text x="70" y="724" class="t sm" font-weight="700">官方没有(别误判去找):</text>
|
||||
<text x="70" y="746" class="mut xs">· 无独立 RAG / 向量检索层(仅 Mem0 / ReMe 长期记忆)</text>
|
||||
<text x="70" y="766" class="mut xs">· 无 evaluate / benchmark 模块(1.x 的已移除)</text>
|
||||
<text x="70" y="786" class="mut xs">· A2A 仅基座(AG-UI 有成品 AGUIProtocolMiddleware)</text>
|
||||
<text x="70" y="812" class="t xs" font-weight="700">该删(之前误标自建 → 改用官方):</text>
|
||||
<text x="70" y="832" class="mut xs">token 计量 / 软预算 / 结构化调用 / OTel / 经验存储召回 / 多 agent 总线</text>
|
||||
|
||||
<!-- 自建·公共 -->
|
||||
<rect x="650" y="86" width="790" height="360" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="3"/>
|
||||
<text x="668" y="114" class="h2" fill="#1d4ed8">自建 · 两线公共</text>
|
||||
<text x="668" y="133" class="mut xs">〔双线 · 两条生成线共享 · 是自建的、不是现成〕</text>
|
||||
<g class="it">
|
||||
<text x="668" y="172">· 确定性九门(在真浏览器真玩一遍判能不能玩)</text>
|
||||
<text x="668" y="212">· 三层校验工具:L1 编译/运行错误 · L2 设计符合度 · L3 效果评分</text>
|
||||
<text x="668" y="252">· CDP 低层探针(注入输入 / 帧 delta / 像素回读 / 活动 hash)</text>
|
||||
<text x="668" y="292">· 计费台账(读 new-api quota → ¥)</text>
|
||||
<text x="668" y="332">· 送审 / 审核台 · feed / 发布</text>
|
||||
<text x="668" y="372">· trace 契约(公共核心子集 + 各线扩展段)</text>
|
||||
</g>
|
||||
<text x="668" y="416" class="mut xs">为什么公共:两条生成线产物都要计费/送审/进同一 feed、都靠同一套确定性验收判能玩 → 抽共享,不重复造。</text>
|
||||
|
||||
<!-- 自建·私有 -->
|
||||
<rect x="650" y="466" width="790" height="408" rx="12" fill="#ffffff" stroke="#475569" stroke-width="2" stroke-dasharray="7 5"/>
|
||||
<text x="668" y="494" class="h2" fill="#334155">自建 · tier2 私有</text>
|
||||
<text x="668" y="513" class="mut xs">〔虚线 · 挂官方扩展点 / 薄层〕</text>
|
||||
<text x="668" y="544" class="t sm" font-weight="700">通用 agent 治理层(框架不提供):</text>
|
||||
<g class="it">
|
||||
<text x="668" y="574">· 墙钟超时 + fail-closed 硬熔断(官方只软刹)</text>
|
||||
<text x="668" y="606">· 卡死 / 无进展探测</text>
|
||||
<text x="668" y="638">· ¥成本台账(挂 ModelCallEndEvent · token×单价)</text>
|
||||
<text x="668" y="670">· finish 接线(自治跑完 → 吐结构化游戏定义)</text>
|
||||
<text x="668" y="702">· 错误签名精确命中层(ReMe 当存储/召回底座)</text>
|
||||
<text x="668" y="734">· 两阶段编排策略(Agent Team leader 的拆解+调度提示)</text>
|
||||
</g>
|
||||
<text x="668" y="772" class="t sm" font-weight="700">游戏专属(与框架正交):</text>
|
||||
<g class="it">
|
||||
<text x="668" y="802">· Phaser 引擎适配 / 能力包</text>
|
||||
<text x="668" y="834">· tier2 源项目契约(建议与 finish schema 共用一份,避免漂移)</text>
|
||||
</g>
|
||||
|
||||
<!-- 列2 自建 -->
|
||||
<rect x="490" y="86" width="400" height="668" rx="12" fill="#ffffff" stroke="#475569" stroke-width="2" stroke-dasharray="7 5"/>
|
||||
<text x="510" y="116" class="h2" fill="#334155">tier2 自建</text>
|
||||
<text x="510" y="136" class="mut xs">〔虚线 · 挂官方扩展点 / 薄层〕</text>
|
||||
<g class="it">
|
||||
<text x="510" y="178">· 超时熔断 middleware(wall-clock)</text>
|
||||
<text x="510" y="218">· 卡死语义探测 middleware</text>
|
||||
<text x="510" y="258">· fail-closed 硬杀(超额强制停)</text>
|
||||
<text x="510" y="298">· 金额(¥)成本累计(官方只到 token)</text>
|
||||
<text x="510" y="338">· debug 案例库(签名精确匹配薄层)</text>
|
||||
<text x="510" y="378">· 引擎能力包 manifest(Phaser)</text>
|
||||
<text x="510" y="418">· tier2 源项目契约</text>
|
||||
<text x="528" y="440" class="mut xs">文件树 / 构建 profile / 依赖锁 / 落库寻址</text>
|
||||
<text x="510" y="478">· mini-肥鹅 spike fixtures</text>
|
||||
<text x="510" y="518">· agent 收尾接线 → 产结构化游戏定义</text>
|
||||
<text x="510" y="558">· Phaser 引擎适配(第一版硬编码)</text>
|
||||
</g>
|
||||
|
||||
<!-- 列3 公共 -->
|
||||
<rect x="910" y="86" width="450" height="668" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-width="3"/>
|
||||
<text x="930" y="116" class="h2" fill="#1d4ed8">公共组件</text>
|
||||
<text x="930" y="136" class="mut xs">〔双线 · 两条生成线共享〕</text>
|
||||
<g class="it">
|
||||
<text x="930" y="178">· CDP 验收基线(九门 harness 泛化 Phaser)</text>
|
||||
<text x="930" y="218">· 计费台账(读 new-api quota)</text>
|
||||
<text x="930" y="258">· 送审 / 审核台</text>
|
||||
<text x="930" y="298">· feed / 发布</text>
|
||||
<text x="930" y="338">· trace 契约(公共核心子集 + 扩展段)</text>
|
||||
<text x="930" y="378">· new-api 网关(统一出口 · 协议不锁)</text>
|
||||
</g>
|
||||
<rect x="930" y="410" width="410" height="120" rx="10" fill="#dbeafe" stroke="#2563eb" stroke-width="1.6"/>
|
||||
<text x="944" y="436" class="t sm" font-weight="700">为什么这些是公共:</text>
|
||||
<text x="944" y="460" class="mut xs">两条生成线(SAA 廉价线 + tier2 富游戏)</text>
|
||||
<text x="944" y="480" class="mut xs">产物都要计费、送审、进同一个 feed,</text>
|
||||
<text x="944" y="500" class="mut xs">都靠同一套确定性验收基线判能不能玩。</text>
|
||||
<text x="944" y="520" class="mut xs">→ 抽出共享,不在 tier2 私有里重复造。</text>
|
||||
|
||||
<text x="40" y="784" class="mut xs">映射:tier2四层工程架构.md §8 · agentic集成架构.md | 基于 agentscope 2.0.3 源码实证 | 设计变动须同步本图</text>
|
||||
<text x="40" y="922" class="mut xs">映射:tier2四层工程架构.md §8 · agentic集成架构.md | 基于 agentscope 2.0.3 源码逐项核对(哪些官方已有/哪些真自建) | 设计变动须同步本图</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.8 KiB |