51 lines
1.1 KiB
Markdown
51 lines
1.1 KiB
Markdown
# 总体架构
|
||
|
||
## 目标
|
||
|
||
构建一个可长期运行、可扩展、可观测、可替换基础设施的 Agent 平台。
|
||
|
||
## 分层
|
||
|
||
```mermaid
|
||
flowchart TB
|
||
U["User / Environment"] --> C["Web / Desktop"]
|
||
C --> B["BFF / API"]
|
||
B --> A["Agent Runtime"]
|
||
A --> M["Memory"]
|
||
A --> P["Planning & Reasoning"]
|
||
A --> T["Tool Runtime"]
|
||
A --> R["RAG"]
|
||
A --> L["Model Gateway"]
|
||
T --> X["MCP / External Tools"]
|
||
A --> E["Event System"]
|
||
M --> D["Data Layer"]
|
||
R --> D
|
||
D --> PG["PostgreSQL"]
|
||
D --> RD["Redis"]
|
||
D --> VS["VectorStore"]
|
||
D --> GS["GraphStore"]
|
||
D --> FS["FileStorage"]
|
||
```
|
||
|
||
## 核心原则
|
||
|
||
1. Agent 能力与基础设施解耦。
|
||
2. 外部能力通过统一 Tool Runtime 接入。
|
||
3. 长任务必须可观测、可恢复。
|
||
4. 所有关键执行路径必须可审计。
|
||
5. 采用渐进式基础设施。
|
||
|
||
## 技术栈
|
||
|
||
Web:Next.js 16 / React 19 / TypeScript。
|
||
|
||
BFF:Node.js / TypeScript。
|
||
|
||
Agent Runtime:Python 3.12+ / FastAPI。
|
||
|
||
Desktop:Rust / Tauri v2。
|
||
|
||
高并发 I/O:Go 1.25+。
|
||
|
||
数据:PostgreSQL / Redis / VectorStore / GraphStore / Object Storage。
|