Ariel Memory

io.github.Cipher208由 GitHub 帳號 Cipher208 發布v1.0.0更新於 Oct 24, 2026

Two-layer memory MCP server for AI agents with 37 tools, RAG, graphs, wiki, auth

發布方自己的服務:Memory.fit

概覽

AI 產生的概覽

以本機 SQLite 為基礎的 AI 代理記憶伺服器,提供多層持久記憶、混合搜尋與知識圖譜。

可以做什麼
Ariel Memory 將代理記憶儲存在本機上的純 SQLite 檔案中。代理預設看到六個工具:think 將內容路由到正確的層(事實、情節、wiki 或圖譜),dream 跨所有層執行混合搜尋並回傳受 token 預算限制的摘要,forget 執行刪除並封存,evolve 記錄代理個性與規則,project 追蹤每個專案的決策與產出,memory_hook 支援推送式擷取。可選的額外層級最多暴露 65 個細粒度操作,包括帶類型節點與邊的知識圖譜、wiki 頁面、來源追蹤以及每小時自我維護。
適用情境
當助理需要跨工作階段持久記憶,且不想將資料傳送到雲端 API 或執行獨立的向量資料庫時,值得加入。它適合需要記住使用者偏好、先前決策與專案情境的代理,以及資料必須留在本機網路或氣隙環境中的情境。
執行需求
以本機 stdio 程序執行,可透過 npm 套件 mcp-ariel-memory 或 PyPI 套件 a-memory 安裝。未宣告帳戶、API 金鑰或環境變數。隱私閘門與圖譜挖掘器所需的可選 spaCy NER 模型需以 a-memory-ner 指令個別安裝;略過它們會安全降級。可透過命令列參數啟用附儀表板的 HTTP 傳輸。
安裝前請注意
記憶資料以明文 SQLite 儲存,僅認證與 saga 密鑰使用 NaCl 信封加密。伺服器可透過 forget 工具刪除或封存記憶,自動鉤子可自動儲存對話內容。可選 NER 模型從 wheel URL 而非 PyPI 安裝,安裝前請確認這些來源。工具暴露需在 MCP 用戶端設定的 env 區塊中設定,而非 shell 設定檔。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Ariel Memory,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

a-memory

Your AI agents forget. a-memory makes them remember. 4-tier agent memory with hybrid search and a real knowledge graph — all in plain SQLite files. Zero cloud. Zero external APIs.

[CI] [codecov] [License: MIT] [Python 3.11+] [Ruff] [MCP Compatible] [Docs] [Release]

Also available on PyPI: pip install a-memory — optional extras: a-memory[embeddings] for real multilingual embeddings.


Why SQLite?

Every other memory server sends your agent's data through a cloud API or requires a separate vector database.

a-memory stores everything in SQLite files on your machine.

  • Zero infrastructure. No Docker, no database server, no embedding API keys.
  • Zero data leaving your network. Works air-gapped.
  • Layer-isolated by design. User facts and agent identity never share a namespace.
  • One directory = entire memory. Back up with cp, sync with rsync.

Why this exists

Three problems a-memory solves:

① Agent self-evolution — your AI stops repeating mistakes between sessions. It remembers decisions, errors, and corrections in a dedicated agent layer, and an hourly consolidation sweep promotes what matters into long-term facts.

② User persona persistence — your agent knows who it's talking to even after weeks of silence. Preferences, history, emotional context live in the user layer, isolated from agent identity.

③ Project continuity — project tracks per-project context: decisions with rationale and outcomes, artifact maps, a graphify-powered code index — so a fresh session picks up where the last one left off.


Get started

bash
pip install a-memorya-memory          # MCP server on stdio — connect from any MCP client

The server runs without these, but the privacy gate (hooks ingest) and the graph miners need two spaCy NER models. Neither is on PyPI — en-core-web-sm 404s there and ru-core-news-sm is an unrelated placeholder — so they can only be installed by wheel URL, and a wheel URL cannot be a dependency: PyPI rejects any distribution whose metadata carries a direct URL. One command installs them from the URLs the package already knows:

bash
a-memory-ner                 # install (console script, ships in the wheel)a-memory-ner --check         # report what is missing, install nothing

From a source checkout, python scripts/install_ner_models.py is the same command.

Skipping them is safe: the gate falls back and reports degraded instead of failing.

Point your MCP client at it:

json
{  "mcpServers": {    "a-memory": {      "command": "a-memory"    }  }}

HTTP transport with dashboard:

bash
a-memory --transport http --port 8000 --dashboard

Or run from source:

bash
git clone https://github.com/Cipher208/a-memory.gitcd a-memoryuv syncuv run ariel-memory

The seven primitives

Agents see exactly seven tools — one verb per intent, plus the event bridge (6 verbs + memory_hook), no tool-choice paralysis:

PrimitiveIntentWhat it does
thinkrememberRoutes content to the right layer (L4 facts / L3 episodes / wiki / graph) based on importance, emotion, and relations
dreamrecallHybrid search across ALL layers (FTS5 + binary embeddings + wiki + graph), returns a token-budgeted digest
forgetlet goContext-aware deletion with Shadow Bin archival (exact / fuzzy / recent) — plus a dry run that writes nothing and an undo that puts back what the bin kept
evolvegrowRecords personality/rules evolution for the agent
projectcontinuePer-project identity, decision log, artifact map, code index
wake_upresumeOne-call memory lift for a fresh session — the critical set in one call, instead of walking a recall protocol step by step
memory_hooksignalThe event bridge: fires one lifecycle event (session_started, new_message, …) so an external harness can push memory into ariel on its own schedule

Quick demo — Python MCP client:

python
# think — routed to the right store automaticallyawait session.call_tool("think", {"text": "User prefers dark mode", "layer": "user"})
# dream — finds it across every store, a week laterres = await session.call_tool("dream", {"query": "dark mode preference"})print(res["summary"])

66 fine-grained operations exist in total, grouped into coherent opt-in tiers: the 7 primitives are exposed by default; add context (recall protocol, /new session recap, smart context budget, steering hints, tool-output compression), insight (Memory Query DSL, provenance fact-blame, quality loop, reflections, stats), write (typed memory schemas, declarative rules engine, scratchpad, counterfactuals, episodes), plus wiki and review (staged mutations, memory_report_card, daily_brief). The usual live-agent surface is one preset — ARIEL_EXPOSE=agent (59 tools), equivalent to primitives,context,insight,write,wiki,review. The remaining 7 are admin-tier: ARIEL_EXPOSE=operator (66) or all.

Tier history, because older guides still name a brief tier: it was dissolved on 2026-09-07 — daily_brief now rides review. If a doc tells you to pass brief, it is pre-1.10 and the token is simply ignored.

⚠️ Env sanitization gotcha (stdio): MCP clients pass a sanitized environment to stdio servers — setting ARIEL_EXPOSE in your shell profile does nothing. Define the tier set in your MCP client config (the env block of the server entry — see configuration guide). The server logs its resolved surface at startup (tool exposure: N/M tools) — if your agent reports seeing only the primitives, check that line first, then restart the client session (tool lists are cached per session).


Features

CategoryWhat's inside
🧠 MemoryL1 Reflex (atomic persistence) → L2 Sessions → L3 Episodic → L4 Core, importance scoring, typed memory kinds with TTL policies, layer isolation; bi-temporal fact history (is_current view hides superseded rows globally, changed_since delta-polling, drill-down to raw source surviving cold archival), hash-chained L0 journal with hot/warm/cold tiers; 66 tools (tiered exposure; 59 on the agent preset, 7 primitives by default) including /recall protocol (multi-axis + disclosure triggers), session continuity recap (/new recovery pack), one-call wake_up, open-question registry surfaced in the session brief, steering hints, tool-output compression + recall verification, provenance fact-blame, Memory Query DSL (faceted tags), typed memory schemas, a declarative rules engine, smart context budget (weighted token floors), reflections, counterfactuals, was_useful quality loop, operator diagnose/heal + integrity score
🔍 SearchFTS5 + MIB binary embeddings + hybrid RRF ranking, multi-source merge (RAG + Wiki + Episodic + Core + Graph), EDM/ITS dual-route rerank (information-gain scoring, №11-eval winner), semantic dedup gate (cosine, opt-in), RU-lemma key normalization (pymorphy3), counter-signal pessimisation, ACT-R activation with per-query min-max multipliers and memory-kind weights, embedding-path circuit breaker (graceful hash-fallback), deterministic retrieval mode, dream digest
🕸️ GraphEpistemic knowledge graph + temporal timeline, typed nodes and edges, BFS traversal, 1-hop GraphRAG expansion (provenance-aware edge filter), 12 self-maintaining miners (degree-capped anti-hub, wiki↔fact provenance bridges with metadata backlinks, co-retrieval, zero-result gaps), orphan-anchor GC, nightly gap-registry — and a reader for it: the registry now records how often each hole is re-observed (seen_count) and surfaces the most persistent ones in the session brief, so an agent sees her own unanswered questions instead of a table nobody reads. Opt-in HDBSCAN embedding clusters with louvain agreement
📁 ProjectsDecision log (what/why/outcome), artifact map, graphify code index — survives between sessions
⚡ Auto-HooksPush-model memory: a per-agent daemon tails the conversation and ariel saves what matters on its own — importance thresholds (EMA-adaptive), staged mutations (proposal → review → apply → revert), DREAM: markers, session-start inject, gap reports, compaction-aware rehydrate (drift log + salvage + one-shot rehydrate blocks), ru-NER privacy gate (cyrillic PERSON/ORG/LOC masking). Native integrations: Hermes runs ariel as an in-process MemoryProvider plugin, MiMoCode via a fork-hooks plugin, CowAgent via code-level hooks. Wiring guide →
🎯 SkillsSkill = Memory: agent-read Markdown pages (first-class skill wiki type), progressive disclosure (wiki_list → wiki_search → wiki_read with related-facts hydration), 4KB lint cap, promotion from DREAM: skill: episodes, shared SSOT sync across agents, usage-driven reinforcement — skills guide →
🔐 SecurityNaCl SecretBox (XSalsa20-Poly1305) envelope encryption for auth/saga secrets, master key chain, rate limiting
🛠️ OpsAuto-backup cron, saga rollback pattern, Prometheus metrics, read-only replica, hourly self-maintenance (decay + consolidation + auto-VACUUM)
🌐 WikiFTS5-indexed markdown files — edit in Obsidian/VS Code, search from MCP, 6 analytical perspectives (wiki_summarize), schema lint on save, external-dir sync

Architecture

mermaid
graph TD    A[LLM Agent] -->|MCP Protocol| B[mcp_server]    B --> C{Importance Scoring}    C --> D[L1: ReflexBuffer]    D --> E[L2: SessionStore]    E --> F{EmotionTrigger?}    F -->|high emotion| G[L3: EpisodicMemory]    F -->|normal| H[L4: CoreMemory]
    B --> I[RAG Engine]    I --> J[FTS5 Search]    I --> K[MIB Binary Search]    I --> L[Hybrid RRF Ranking]
    B --> M[Wiki System]    M --> N[.md Files]    M --> O[SQLite Index]
    B --> P[Knowledge Graphs]    P --> Q[Epistemic Graph]    P --> R[Temporal Graph]
    B --> S[Project Store]    S --> T[Decisions / Artifacts / Code Index]
    U[Hourly Sweep] -->|consolidate| G    U -->|promote| H    U -->|auto-VACUUM| V[(SQLite)]

Comparison

a-memorymem0letta (memgpt)chroma
MCP native✅ 7 primitives❌ no MCP server❌❌
Layer isolation✅ User vs Agent namespaces❌❌❌
Local-only (no cloud)✅ SQLite — 0 infra⚠️ API or self-host Docker❌ needs LLM API✅ local OSS + Cloud option
Own semantic search (no API)✅ FTS5 + MIB binary hybrid⚠️ BM25+entity (LLM-dependent)❌ LLM-only⚠️ hybrid on Cloud only
Knowledge graph✅ Typed nodes + edges + temporal timeline⚠️ entities only❌❌
Envelope encryption (secrets)✅ NaCl SecretBox (auth/saga secrets; memory data is plaintext SQLite)❌❌❌
Lifecycle hooks✅ 19 names (12 user + 13 agent slots), per-layer, config-gatedlimitedlimitednone
Self-maintenance✅ Hourly consolidation + auto-VACUUM❌❌❌
Backup / restore✅ Auto-cron + saga rollback❌❌❌

Notes (Sep 2026): mem0 now ships a self-hosted Docker image and a managed cloud with hybrid BM25+entity search; chroma is 29k★ and added hybrid+FTS5 to its Cloud tier (OSS server remains vector-only). What still differentiates a-memory: zero-infra SQLite (no Docker), NaCl-encrypted auth/saga secrets, layer isolation, hourly self-maintenance, and the temporal graph timeline.


Roadmap

  • 4-layer memory hierarchy with layer isolation
  • Hybrid search (FTS5 + MIB binary embeddings)
  • Knowledge graphs (epistemic + temporal)
  • Hourly consolidation sweep + DB self-maintenance
  • mcp 2.x native SDK
  • Repo renamed to Cipher208/a-memory; PyPI package live (pip install a-memory)
  • Temporal timeline wired end to end (think/evolve/project events + dream recent digest)
  • Dream-cycle inject + auto-generated CONTEXT.md snapshot (curated context + 6 wiki perspectives + recent episodes, per-layer, per-agent)
  • Phase C — auto-hooks keystone (push-model memory: per-agent conversation daemons, external event dispatcher, importance-gated auto-save, staged mutations with review/revert, dream markers, session-start inject, gap reports; guide)
  • Phase D — compaction-aware rehydrate (drift log + salvage into the summarizer + one-shot rehydrate blocks; MiMoCode plugin / Hermes native MemoryProvider / CowAgent hooks — integration guide)
  • Phase D — /recall protocol (multi-axis proportional recall: markers → session → semantic → expand → day; drives Hermes per-turn prefetch)
  • Phase D — Skill = Memory (Markdown skills as a first-class wiki type, progressive disclosure wiki_list → wiki_search → wiki_read, 4KB lint cap, promotion pipeline, shared SSOT sync, usage-driven evolution — skills guide)
  • Phase D — working memory + meta-memories (agent scratchpad re-injected at session start, deterministic reflections, smart context budget with weighted floors, counterfactual notes, was_useful quality feedback loop)
  • Phase D — memory tools D1.2-D1.9 (session continuity recap + steering hints, tool-output compression + recall verification, provenance fact-blame, Memory Query DSL, typed memory schemas, declarative rules engine; coherent ARIEL_EXPOSE tiers: context / insight / write)
  • Phase E — hardening & closure (18 items across 3 waves): durability — atomic L1 persistence (temp→fsync→os.replace) + per-instance ring files, a circuit breaker guarding the embedding model path (3 failures → open 30s → hash-fallback keeps recall serving), least-privilege wiki roots + traversal-safe backup restore; operations — memory_diagnose/memory_heal (DB/migrations/L1-files/breaker checks + remigrate/reset-breakers/purge), integrity score in the report card, <cache:break> markers + stable-first inject ordering for provider prompt caches; retrieval — faceted tag queries (dimension:value, same-dim OR / cross-dim AND), memory-kind weights in ACT-R scoring, disclosure triggers («when X, surface Y» recall-side rules); wiring — real context_threshold/memory_pressure emitters (Hermes plugin + autohooks daemon), on_turn_end event, wiki_write staged mutations with revert, transition-level consolidation revert, causal-link producer on memory_graph_add; validation — DREAM markers anchored to message start (document-fragment false positives eliminated), post-compaction semantic audit (episode coverage by the L4 set)
  • Phase F — L0→L4 pipeline (bi-temporal fact intervals, hot/warm/cold L0 tiers with CLACK export, SHA-256 capture dedup, hash-chained journal, provenance drill-down)
  • Phase G — self-wiring graph (12 deterministic miners: sessions, markers, provenance, co-retrieval, entities, zero-result questions, wiki↔fact bridges)
  • Phase H closeout — EDM/ITS dual-route rerank + eval harness (NDCG@5, drift score, negative-control protocol, LongMemEval-S adapter)
  • S17 Stage-1 tail — deterministic retrieval mode, ENGRAM procedural kind, AdaptiveRAG pre-gate (27 LLM-free query features), EMA importance gate, counter-signal aliases, SHA-256 L0 dedup, zero-result miner, ru-NER privacy gate
  • S18-19 wave (15 items) — global is_current view + changed_since delta mode, per-query ACT-R min-max, per-block max_chars, semantic dedup gate, channel-granular sources, 3-option conflict contract (supersede/retain/annotate), orphan-anchor GC, nightly gap-registry, per-agent harness breaker, provenance edge filter, wiki↔fact metadata backlinks, wiki_read related-facts hydration, RU lemma keys (pymorphy3), 2-class textcat pilot (flag-gated), S17 supplements 8-11 (cold-archive drill-down, confirming layer, junk-vector detector, HDBSCAN clusters), B6 anti-hub degree cap
  • S20 eval — №11 ablation on MINI + LongMemEval-S (50-question stride): full dual-route arm wins on both datasets, published-baseline comparison (GPT-4o long-context league, above ChatGPT-memory); dense e5-small run 3: no parity gain over hash on this split — hash stays prod
  • Hardening wave (1.12.0) — the speaker-layer defect fixed at the writer (distill_and_route read a kind where it needed the speaker) plus a provenance-based purge of the 65 rows it had already mislabelled; a kind classifier that no longer hands a permanent label to harness boilerplate or to compound words (pre-commit, mergeCommit); the gap registry getting the reader S18 planned but never built; the L4 expectation measured against the L4 bar instead of the L3 one (71% of the diff_gap backlog was that one wrong number); and a quality gate that could not fail now failing correctly — an unpinned scanner had silently moved its JSON schema out from under it
  • Screenshot / asciinema demo in README
  • LLM-assisted consolidation on top of the deterministic sweep
  • Stage 2 — tool-surface redesign (slot system, URI keys, inject/key consolidation — planned with the A-remainder)
  • LongMemEval full 500-question split + dense-aware threshold retraining (e5-small parity shown, not a win on the 50-question stride)

Contributing

PRs welcome! See CONTRIBUTING.md.

License

MIT © Cipher208


⭐ If this project helps you, star it on GitHub.

[Star History]

來源:README.md,提交 d882df7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Memory 整合