# Repository Briefing: Krittof/SynapseVault
> Source: https://repoforai.com/repo/Krittof/SynapseVault (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Krittof/SynapseVault
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (84/100 · Maintenance 35/35 · Adoption 9/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.0.0 (2026-12-03) — https://github.com/Krittof/SynapseVault/releases
- **Review Snapshot**: 2026-12-03 (Note: v2.0.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Self-Hosted, Local AI, MCP, API
- **Momentum**: 23 ★ total (+3 24h / +22 7d) · 2 forks
- **Topics**: `ai-memory`, `claude-code`, `codex`, `coding-agent`, `cursor`, `fts5`, `local-first`, `mcp`, `mcp-server`, `model-context-protocol`, `python`, `sqlite`
- **When to Use**: Best for: Developers who switch among coding agents and want one local, auditable source for project rules, decisions, and recurring lessons. Skip if: Your main workload is bulk semantic search over raw documents, you require a validated multi-tenant service, or a few version-controlled Markdown files already cover your needs.

## Overview
```text
### Architecture & Core Mechanics
SynapseVault routes multiple coding agents into one local SQLite vault. The core uses Python 3.11+ with no third-party runtime dependencies, SQLite WAL for persistence, and FTS5 for lexical search. MCP capture, the DeepSeek Harness bridge, manual imports, and the opt-in read-only watcher feed a staging inbox after secret and blocked-term checks and five-field idempotency checks.

A human or optional LLM curator turns staged inputs into discrete memories with bilingual search terms and typed one-hop links. Recall filters records by scope and temporal validity, ranks lexical and relational matches, reranks for diversity, and reserves slots for pinned rules. The local daemon serves an API and Web Console; agents can use automatic hook injection, stdio MCP, or both.

### Key Capabilities & Differentiators
Tier 0 combines NFKC normalization, CJK bigrams, BM25, clause-level matching, and one-hop relations. CAS revision chains and bi-temporal `as_of` queries support historical recall, while suppression and tombstones keep retired material out of ordinary recall and prevent log rescans from reviving tombstoned entries. Persisted traces identify the record and version used; `memory_index` → `memory_timeline` → `memory_get` lets an agent inspect results before fetching the full text.

Optional Tier 1 fuses cosine vector matches with lexical results via Reciprocal Rank Fusion. Tier 1A uses an OpenAI-compatible `/v1/embeddings` endpoint, and Tier 1B uses `llama-server` with a local GGUF embedding model. Tier 0 remains available when the optional semantic lookup misses its deadline. The balanced injection preset permits four items, reserves one pinned slot, and caps output at 1,400 characters. Tier 0 recorded 97.73% Recall@1 and 100% Recall@5 on curated bilingual memories; those results do not establish performance on raw conversation archives.

### Trade-offs & Limitations
A shared vault earns its keep when several agents must agree on which decisions and rules are current. Compared with per-client Markdown files, it adds version-aware retrieval, pinned context, and recall traces, at the cost of a daemon, token management, and a curation workflow. The Markdown mirror helps with Git review, but it is an export, not a substitute for managing state in SQLite.

Compared with vector-first RAG, Tier 0 is simpler to run offline, but it depends on useful memory records and searchable vocabulary. Paraphrases with no lexical overlap can still be missed without embeddings. Remote embeddings add a data and network boundary; local GGUF embeddings avoid that boundary but add model setup and active compute. For a centrally shared or multi-tenant service, validate isolation, concurrency, and recovery before relying on the scoped-token API; the local deployment path does not establish those properties.

### Hardware & Deployment Guide
Start from the checkout with Python 3.11+ and SQLite FTS5 support: `python -m llm_memory.clients.cli daemon --port 8775`. Use `python -m llm_memory.clients.cli token bootstrap` for initial access to the Web Console at `http://127.0.0.1:8775/`. The core requires no pip install when run from the checkout, no Docker, and no Node.js build; Node.js is relevant to the optional standalone 3D viewer. Check `/v1/health`, mount clients with scoped tokens, and use an absolute interpreter path for GUI clients.

Keep the service on loopback for a local rollout and start with offline Tier 0. Add Tier 1A only if sending embedding inputs to the chosen endpoint is acceptable; use Tier 1B when semantic recall must stay local and the machine can handle on-demand embeddings. The listed v1.1.0 release introduced modular retrieval, guardrails, and audit traces; v1.1.1 added live global and per-client budget tuning. The manifest shows 1.3.0 while the latest listed release is v1.1.1, so verify the desired features against the exact revision you deploy.
```

## Key Capabilities
```text
- Capture: MCP, manual imports, and opt-in read-only log watching feed a screened, deduplicated staging inbox.
- Retrieval: SQLite FTS5/BM25 combines CJK bigrams, bilingual search terms, and one-hop relations before MMR reranking.
- Context budgets: The balanced preset allows four items, reserves one pinned slot, and caps injection at 1,400 characters.
- Lifecycle: Bi-temporal queries, CAS revision chains, suppression, and tombstones distinguish historical context from current guidance.
- Auditability: Persisted recall traces carry record IDs and versions; MCP can reveal the index, timeline, and full record separately.
- Semantic fallback: OpenAI-compatible embeddings or local GGUF vectors augment Tier 0 through RRF without making a model mandatory.
```

## Quick Start / Clone
```bash
# 1. Clone and start loopback daemon (Python 3.11+, zero pip install required)
git clone https://github.com/Krittof/SynapseVault.git
cd SynapseVault
python -m llm_memory.clients.cli daemon --port 8775

# 2. In a second terminal, fetch your local admin token
python -m llm_memory.clients.cli token bootstrap
```
