Summary
A long-running WeChat assistant with transport abstraction, layered memory, RAG fallback, runtime observability, and cost analytics.
Business Value
Turned a script-like WeChat bot into a long-running AI assistant with diagnosability and cost control.
Engineering Depth
Showcases transport abstraction, a LangGraph runtime, degradable RAG, model auth governance, config hot reload, controlled tools, cost analytics, and runtime observability.
Evidence
本地仓库 README / HIGHLIGHTS / RELEASE_UPDATES / SYSTEM_CHAINS / tests / recent commits
Repository · Confidence High · Verified 2026-06-10
- Evidence level: strict review (core sections only show verifiable metrics)
- Source type: Repository / code records
- Source link: public link provided for independent review
- Verified at: 2026-06-10 (7 days ago, fresh evidence)
Rationale: High confidence: organized under strict evidence rules, traceable to repository or code records, includes an accessible source link, verified 7 days ago.
View evidenceBackground
目标是在 Windows 微信生态下交付可长期运行的智能助手,同时兼顾消息接入稳定性、记忆增强、配置治理与运行诊断。
Challenge
微信接入边界依赖桌面环境且稳定性敏感;如果把记忆、RAG、诊断和配置能力耦合在主回复链路内,系统很难长期运行与排障。
Action and Results
Solution
- 重构运行时:以
LangChain + LangGraph 编排 load_context / build_prompt / invoke / finalize_request,把同步回复与后台成长任务分层处理。 - 抽象接入边界:将微信入口统一收敛到
BaseTransport,隔离 Windows 微信版本、权限与消息通道的环境差异。 - 构建三层记忆:落地 SQLite 短期记忆、运行期向量记忆与导出语料 RAG,并支持轻量重排与可选本地
Cross-Encoder 自动回退。 - 补齐治理能力:完善
/api/status、/api/readiness、/api/metrics、/api/config/audit、知识库治理 API、模型认证中心、成本分析、配置热重载、受控 Tool Workflow、只读 MCP adapter 与 27 条离线 eval。
Result
交付面向 Windows 微信生态的长期运行智能助手,形成从消息接入、记忆增强到模型认证、知识库治理、运行观测、配置治理、排障评测与发布更新的完整闭环。
Key Signals
抽象 `BaseTransport` 接入层并以 `LangGraph` 重构回复主链,将同步回复与后台成长任务解耦,建立适合长期运行的微信助手架构。 构建 SQLite 短期记忆、运行期向量记忆与导出语料 RAG 三层记忆体系,支持轻量重排与可选本地 `Cross-Encoder` 自动回退,平衡召回质量与部署成本。 补齐 `/api/status`、`/api/readiness`、`/api/metrics`、`/api/config/audit`、成本分析与脱敏诊断支持包,完善运行观测、配置审计与排障能力。 落地配置热重载、回复预算、人工审批、模型认证中心、受控 Tool Workflow、只读 MCP adapter 与发布更新链路,支持 2 秒回复 deadline 与 27 条离线 smoke eval,降低误发、阻塞和凭据配置风险。 Tech Stack
PythonQuartAsyncioLangGraphRAGElectronSQLiteChromaDBBaseTransportCost Analytics