AI随心记 系统分层落位图

AI随心记 系统分层落位图 An architecture diagram generated by Archify. 输入分割 · 混合输入→SourceItem · Architecture component · app/plugins 输入分割 混合输入→SourceItem app/plugins 抖音解析 · Bridge 优先/引擎降级 · Architecture component · sources 抖音解析 Bridge 优先/引擎降级 sources 模型网关 · chat/asr/vision 直连+计量 · AI 能力层(重心) · app/ai 模型网关 chat/asr/vision 直连+计量 app/ai 写侧 Agent · 范式卡+工具白名单+防御链 · AI 能力层(重心) · 重心 写侧 Agent 范式卡+工具白名单+防御链 重心 读侧 QA Agent · LangGraph+FC+MCP · AI 能力层(重心) · 重心 读侧 QA Agent LangGraph+FC+MCP 重心 RAG 检索 · dense+BM25→RRF→rerank · AI 能力层(重心) · app/read/rag RAG 检索 dense+BM25→RRF→rerank app/read/rag 能力注册中心 · 契约三设计 · Architecture component · app/capability 能力注册中心 契约三设计 app/capability LangGraph 编排器 · YAML 工作流→StateGraph · Architecture component · orchestrator LangGraph 编排器 YAML 工作流→StateGraph orchestrator 对外 API · /invoke 五道门槛 · Architecture component · public_api 对外 API /invoke 五道门槛 public_api 飞书文档 · HTML5 Block 配图 · 落点层 · 多端写入 · 落点 飞书文档 HTML5 Block 配图 落点 云端空间 · safe_path · 落点层 · 多端写入 · 落点 云端空间 safe_path 落点 公众号导出 · 导出型落点 · 落点层 · 多端写入 · 落点 公众号导出 导出型落点 落点 写读同步桥 · hash 幂等 · Architecture component · read_sync 写读同步桥 hash 幂等 read_sync 向量库 · chromadb kb_{id} · Architecture component · storage 向量库 chromadb kb_{id} storage SQLite WAL · 33 表+alembic 0001-0009 · 基础设施 · app/db SQLite WAL 33 表+alembic 0001-0009 app/db douyin-bridge · Playwright :8750 · 基础设施 · services douyin-bridge Playwright :8750 services 三容器部署 · OrbStack / ali-light · 基础设施 · deploy 三容器部署 OrbStack / ali-light deploy SourceItem 解析结果 LLM 调用 检索上下文 经注册中心 能力快照 deliver deliver 外部调用 落点成功 进索引 候选向量 对话调用 签名请求 AI 能力层(重心) 落点层 · 多端写入 基础设施 Legend Frontend Backend Database Cloud Security

AI 能力层(重心)

  • • 自研网关统一 OpenAI 兼容协议,供应商 ai_providers 表自管
  • • 写侧 Agent 范式卡数据化:instructions 来自 assets/agents/*.md,代码零范式文本
  • • 读侧 QA Agent:LangGraph 双节点图 + Function Calling + MCP 扩展

写读闭环

  • • 落点成功 → read_sync 自动进索引(内容 hash 幂等)
  • • 每知识库一个 chroma collection(kb_{id}),正文存 SQLite 回填
  • • RRF 排名融合 k=60,rerank 精排前 8 候选

能力平台契约

  • • entrypoint / principal / timing 三设计
  • • 失败必须显性,禁止假成功(CapabilityResult)
  • • 对外 /invoke:开关+Key+限流+白名单+SSRF 五道门槛