四层心智模型
wesgine v1.0 的核心心智模型:四层架构从容器到请求主体。
四层概览
Layer 1 Container(Hypervisor) — 管 Cell 生命周期 + 共享资源池
Layer 2 Kernel(Loop 五件套) — Cognitive / Context / Execution / Memory / Govern
Layer 3 Cell(三位一体) — Runtime Instance + Tenant Unit + Portable Snapshot
Layer 4 Actor(请求主体) — 谁在说话、谁的记忆、谁的配额
Layer 1:Container(Hypervisor)
Hypervisor 是控制面,薄,全局唯一。
只做三件事:
- Cell 生命周期管理
- 共享 Provider 池
- 跨 Cell 只读观测
绝不做:Chat() / Run() / Memory() / Sessions()。
Layer 2:Kernel(Loop 五件套)
Agent 引擎的基本面,是 Cell 的内核:
| 子系统 | 职责 |
|---|---|
| Cognitive | 认知解析(LLM 调用 + Provider 路由) |
| Context | 上下文组装(系统提示 + 历史 + Overlay) |
| Execution | 工具执行(Registry + Executor) |
| Memory | 持久记忆(七层模型 + 读写隔离) |
| Govern | 治理(Hardline + Sandbox + Zone) |
Layer 3:Cell(三位一体)
Cell 是 Layer 2 Kernel 的具体化实例:
| 角色 | 含义 |
|---|---|
| Runtime Instance | 一组正在运行的 Kernel 子系统实例 |
| Tenant Unit | 隔离域,AX-1 的物理体现 |
| Portable Snapshot | 可导出/导入的完整快照 |
心智模型不是"一个引擎里装了很多 Cell",而是"Hypervisor 里跑了很多个独立的 wesgine 实例"。
Layer 4:Actor(请求主体)
Actor 是运行时一等标识符。
引擎基于 Actor 在 Cell 内做:
- 记忆隔离(L3 about_me / L4 agent_memory)
- 资源调度
- 认知路由
- 行为归因
wesgine 不定义用户身份体系(AX-2),但 Actor 是运行时必填字段。
各产品映射
| 产品 | Layer 1 | Layer 3 | Layer 4 |
|---|---|---|---|
| wescode | 管理多 workspace Cell | N Cell(ws-{hash}) | 1 Actor("local") |
| wesclaw 桌面 | 透明 | 1 Cell("main") | 1 Actor |
| wesclaw SaaS | 存在 | N Cell | M Actor/Cell |
| wescraft 个人 | 透明 | 1 Cell("personal") | 1 Actor |
| wescraft 团队 | 存在 | N Cell | M Actor/Cell |
| teleclaw | 存在 | N Cell(1/部门) | M Actor/Cell |
核心价值层次
Agent 引擎 Kernel(基本面)
↓
Cell = Kernel 的具体化实例
↓
Hypervisor = 编排容器(n=1 透明、n≥2 启用调度)
↓
多/单租户 = 部署形态(不是产品定位)