完善文档

This commit is contained in:
chenxin committed 2026-09-22 10:58:39 +08:00
1 parent 192ea96eb4
commit efc08dab5e
82 files changed
+1455 -109

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# ADR-001: Agent Runtime
## Status
Accepted
## Context
Agent 需要统一管理 Run、Plan、Tool、Memory、Model 和 Event。
## Decision
采用统一 Agent Runtime 抽象。复杂有状态工作流可使用 LangGraph;轻量执行路径保留自研 Runtime 的演进空间。
## Consequences
Agent 能力与具体编排框架解耦,但需要维护统一领域模型。
@@ -0,0 +1,21 @@
# ADR-002: Memory Architecture
## Status
Accepted
## Context
长期 Agent 需要区分短期上下文、事件、知识、技能、关系和身份。
## Decision
采用六类逻辑记忆:
Working / Episodic / Semantic / Procedural / Social / Identity。
通过 Memory Manager 统一访问;底层采用 Redis、PostgreSQL、VectorStore 和 GraphStore。
## Consequences
记忆语义与存储实现解耦,但需要维护 Memory Consolidation 与 Retrieval 策略。
+17
View File
@@ -0,0 +1,17 @@
# ADR-003: Vector Store
## Status
Accepted
## Decision
建立 VectorStore 抽象:
- 开发:ChromaDB
- 中小生产:PostgreSQL + pgvector
- 大规模:Milvus
## Rationale
优先降低早期运维成本,同时保留大规模演进路径。
+16
View File
@@ -0,0 +1,16 @@
# ADR-004: Graph Store
## Status
Accepted
## Decision
建立 GraphStore 抽象:
- 开发:Neo4j
- 大规模:NebulaGraph
## Rationale
知识图谱与复杂关系查询需要独立抽象。
+17
View File
@@ -0,0 +1,17 @@
# ADR-005: Model Gateway
## Status
Accepted
## Context
Agent 不应绑定单一模型厂商。
## Decision
建立统一 Model Gateway,支持 OpenAI SDK、LiteLLM 及本地模型。
## Consequences
增加模型抽象层,但能够实现模型切换、能力路由和供应商解耦。
+49
View File
@@ -0,0 +1,49 @@
# Architecture Decision Records
ADR 用于记录重要架构决策。
创建 ADR 的场景:
- 技术栈替换
- 核心架构改变
- 数据模型改变
- Agent Runtime 机制改变
- 安全边界改变
- 基础设施选型改变
建议状态:
- Proposed
- Accepted
- Superseded
- Deprecated
模板:
```text
# ADR-XXX: Title
## Status
Proposed
## Context
为什么需要做这个决策?
## Decision
最终决定是什么?
## Alternatives
考虑过哪些方案?
## Consequences
优点、缺点、风险。
## Related Documents
相关文档。
```