uudam42/agent-memory-engine
Free面向编码 Agent 的本地优先持久记忆与项目知识运行时。维护证据支撑的结构化记忆树(约束/架构/决策/故障/流程),复杂任务前自动按意图召回相关上下文,任务后反思并据置信度决定是否留存。SQLite FTS5 检索、分支感知记忆、统一 ContextPack(token 预算),数据全留在 `.memory-engine/`、无云调用。
About uudam42/agent-memory-engine
Agent Memory Engine is a local-first MCP (Model Context Protocol) server that provides coding agents with persistent, evidence-backed project memory and grounded project knowledge across sessions. It automatically builds a project knowledge base from code, tests, ADRs, logs, git diffs, and more. Before complex tasks, it retrieves relevant architecture, constraints, incidents, and source context using intent-aware recall. After tasks, it performs automatic reflection and decides whether and how to retain lessons. The system maintains a structured memory tree (constraints, architecture, decisions, incidents, procedures) with confidence-aware promotion, conflict detection, and ancestor consolidation. Data stays entirely in a local .memory-engine/ directory; no cloud calls, no telemetry. Retrieval uses SQLite FTS5 with an optional semantic backend (sqlite-vec + embeddings). It is a Python MCP server using stdio transport, with zero-touch bootstrap and incremental indexing.
Key Features
Pros & Cons
- Local-first: all data stays on device, no cloud calls or telemetry
- Automatic: zero-config bootstrap, incremental indexing, automatic reflection
- Structured memory tree with confidence-aware promotion and conflict detection
- Evidence-backed: each memory node links to source evidence (test output, code, reviews)
- Flexible retrieval: FTS5 full-text search with optional semantic embeddings
- No Docker or TypeScript required; pure Python MCP server with stdio transport
- Git-aware: synchronizes with repository branches and changes
- Open source with permissive license (MIT)
- Requires Python environment and MCP protocol support in the agent client
- Primarily designed for coding agents; not a general-purpose knowledge base tool
- Semantic retrieval feature requires additional dependencies (sentence-transformers/Ollama) and is off by default
- May need manual review of conflict detections to resolve high-risk flags