uudam42/agent-memory-engine logo

uudam42/agent-memory-engine

Free

面向编码 Agent 的本地优先持久记忆与项目知识运行时。维护证据支撑的结构化记忆树(约束/架构/决策/故障/流程),复杂任务前自动按意图召回相关上下文,任务后反思并据置信度决定是否留存。SQLite FTS5 检索、分支感知记忆、统一 ContextPack(token 预算),数据全留在 `.memory-engine/`、无云调用。

FreeFree tier
Type
Open Source

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

Persistent memory tree: MemoryNode hierarchy for constraints, architecture, modules, decisions, incidents, procedures
Evidence-backed memory: Each node links to source evidence entries (test output, code references, review notes)
Candidate staging: Reflection generates MemoryCandidates before promoting to the live tree
Confidence-aware promotion: create, update, merge, supersede, discard, needs_review actions
Conflict detection: High-risk areas (auth, schema, state-machine, retry) flagged for review
Ancestor consolidation: Parent node summaries auto-updated after each promotion
Intent-aware recall: Automatic retrieval before coding tasks without manual queries
Progressive inspection: Drill down into any memory node, children, and linked evidence
Automatic post-task reflection: Agent reports outcome, system decides whether and how to retain knowledge
Knowledge ingestion: Supports Markdown, code, ADR, test reports, runtime logs, git diffs

Pros & Cons

Pros
  • 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)
Cons
  • 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

Best For

Providing coding agents with persistent project memory across sessionsAutomatically retrieving relevant architecture, constraints, and incident context before complex coding tasksCapturing and retaining debugging lessons and historical decisionsBuilding an automatically updated project knowledge base from code, docs, and logsEnhancing LLM-based coding agents with evidence-backed ground truth instead of flat RAG

FAQ

What is Agent Memory Engine?
Agent Memory Engine is a local-first MCP server that gives coding agents persistent, evidence-backed project memory. It automatically builds a project knowledge base, retrieves relevant architecture, constraints, incidents, and source context before complex tasks, and retains verified lessons after successful work.
Does Memory Engine require cloud services?
No. Memory Engine is fully local-first. All data stays inside the `.memory-engine/` directory. There is no telemetry, no cloud calls, and no external infrastructure required.
What are the system requirements?
Memory Engine is a Python MCP server using stdio transport. It does not require TypeScript, Docker, or an external daemon. It runs with just Python. Optional semantic retrieval adds a dependency on sentence-transformers or Ollama.
How does it ensure memory persistence across sessions?
Memory Engine stores all memory nodes, knowledge, and index data in a local `.memory-engine/` directory using SQLite. It auto-initializes on first connection and incrementally indexes only changed files, so all context persists without manual setup.