Introduction¶
In agent development, using only a vector database as the memory layer leads to basic questions that cannot be answered: Where does the information come from? Why is it trustworthy? Who modified it? How are conflicts handled?
MemoBranch transforms memory into a governed knowledge chain. It is a local-first long-term memory layer for AI agents and production environments. It organizes conversational evidence, candidate knowledge, and canonical memory into a human-readable Markdown Wiki, using Git to provide version control, attribution records, rollback, and cross-machine synchronization.
Core Features¶
The following describes MemoBranch’s core capabilities.
Git-Native Wiki
Markdown is the source of truth. Each logical change has a corresponding Git commit, recording the specific change author and time.
Cross-Source Knowledge Compilation
Through rules and catalogs, it guides incremental maintenance of source data, entities, concepts, synthesis, comparison, and query pages. Multi-page changes are committed atomically.
Source-Backed Answers and Archiving
Navigate before reading pages, bind answers to specific cited revisions, and preserve source constraints and uncertainty when explicitly saved.
Structural and Semantic Maintenance
Structural checks do not require model involvement. Models provide evidence-based maintenance suggestions, but fixes require separate authorization.
Evidence-Driven Memory
It follows the evidence → candidates → wiki flow, preserving provenance, confidence, conditions, and revision chains.
Server-Side Access Control
Before reading content, authorization is performed by permissions, scope, sensitivity, and tenant.
Policy-Driven Envelope Encryption
Apply any sensitivity level according to policy, using per-record DEK and AES-256-GCM encryption, with support for encrypted erasure.
Hybrid Retrieval
It combines CJK/English lexical search, optional embeddings, Wiki link expansion, and incremental indexing.
Remote Git Synchronization
It supports Ahead/Behind/Diverged states, fast-forward updates, scheduled merges, conflict aborts, and controlled pushes.
Crash Recovery
It uses a pre-write journal for multi-file writes before atomic replacement, and automatically rolls back or replays on startup.
CLI + Agent Plugins
It provides CLI, MCP, and a native DeepSeek Harness plugin, sharing stable errors and a least-privilege contract.
Production Observability
It provides a single-instance maintenance service, the /healthz endpoint, Prometheus /metrics, and redacted audit logs.
Installation and Enablement¶
MemoBranch is a local service, with each vault corresponding to one tenant. According to official information, there is currently no unified command-line installation method.
Developers need to obtain the source code from the GitHub repository and deploy it as a local service. The project is developed with Node.js 20+ and TypeScript 6.x.
Typical Usage¶
The usage flow usually follows these steps:
- Data Ingestion: Conversation logs, tool results, or human input enter the system as immutable evidence.
- Candidate Generation: Evidence enters the candidate pool and awaits review.
- Knowledge Archiving: Content that passes review or is handled by human intervention enters the Wiki (canonical memory).
- Retrieval and Use: The system uses hybrid lexical or semantic retrieval, combined with permission filtering, to provide context to the agent.
- Version Control: All changes are tracked by Git, supporting rollback and historical auditing.
Applicable Scenarios and Notes¶
MemoBranch is suitable for production-level agent scenarios that require high auditability, knowledge traceability, and structured maintenance.
When using it, note the following facts:
- LLMs Are Not the Truth: Model APIs are only used for optional enhancements. The core capture, review, Git version control, recovery, and retrieval functions do not depend on model APIs.
- Sensitive Content Protection: Sensitive content uses envelope encryption, logical keys use opaque paths, and protected content is excluded from indexes and generated files.
- Local Service: It is a local service, and each vault is limited to one tenant.
- Permissions and Security: An agent cannot declare itself as an administrator. Identity and permissions are determined by server-side configuration.
Summary¶
MemoBranch uses Git-native mechanisms to solve provenance, auditing, and conflict issues in agent memory. It is a memory plugin in the DeepSeek Harness ecosystem and is suitable for scenarios that require strict knowledge management and version control.