
Inkwell
io.github.veronchenko由 GitHub 帳號 veronchenko 發布v0.14.0更新於 Oct 24, 2026
Persistent memory for AI agents: Markdown entries, hybrid search, typed graph links
發布方自己的服務:Memory.fit
概覽
Inkwell 是自架的持久記憶伺服器,讓 AI 助理跨工作階段儲存、搜尋並連結 Markdown 知識條目。
- 可以做什麼
- 建立或更新知識條目,需指定條目類型,支援重複偵測、可選的取代式版本化與相關條目連結建議。讀取單一條目及其帶類型的圖譜關係、反向連結和依類型分組的樞紐成員。以關鍵字加本機語意的混合排序搜尋和瀏覽條目,可依標籤、條目類型或所屬樞紐篩選。列出所有標籤及條目數量,刪除條目時若仍有其他條目連結會提出警告。從 Markdown 檔案重建搜尋索引,並執行結構定義完整性檢查,回報失效連結、未宣告類型和缺少欄位。
- 適用情境
- 適合需要讓助理把決策、根因、操作流程和偏好從一個工作階段或專案帶到下一個工作階段或專案,並且希望這些知識以可讀、可 diff 的 Markdown 檔案保存在自己的磁碟上,而不是放在託管記憶服務中的情境。
- 執行需求
- 以本機 Docker 容器執行,需掛載知識庫磁碟區;資料路徑由 INKWELL_DATA_PATH 指定。選用的網頁儀表板預設關閉,需設定 INKWELL_ENABLE_DASHBOARD 才會啟用。網路傳輸和多租戶模式需要額外設定與 API 金鑰。語意搜尋模型隨本機提供,不需雲端服務。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Inkwell,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Inkwell — Persistent Knowledge Base MCP Server
[License: MIT] [Docker Pulls] [Python 3.12+]
Inkwell is a self-hosted Model Context Protocol server that gives AI agents persistent memory across sessions and projects. Three things set it apart from the other memory servers: plain Markdown files are the source of truth (the index is a throwaway cache you can delete and rebuild), entries are connected by a typed kb:// graph rather than dumped into a flat pile, and updates are bi-temporal — superseding a fact keeps the old version readable instead of overwriting it.
Docker Hub: foreigndmitryi/inkwell-memory · Website: veronchenko.github.io/inkwell-memory
Formerly Engram. Renamed in 0.14.0 — there are a dozen unrelated projects called "Engram" and the name had stopped being findable. Not affiliated with any of them, nor with the Engram keyboard layout. See the changelog for what the rename breaks.
Table of Contents
- Concept
- Features
- Comparison
- Measured Against a Plain Markdown Wiki
- Design Patterns
- Architecture
- Quick Start
- Search
- Tools
- Dashboard
- Graph Relations
- Usage Examples
- Prompt Your Agent
- Configuration
- Storage Format
- Development
- License
Concept
Agent conversations end and take their context with them. Inkwell is the piece that survives: a knowledge base an agent searches before acting and writes to after resolving something non-obvious, so the next session — same project or a different one — starts with what was already learned instead of re-deriving it.
It deliberately stores zero discoverable information. If a fact can be pulled from code, git history, config files, or existing docs, it does not belong in Inkwell — that's what greps and re-reads are for. What belongs is the kind of knowledge a conversation would otherwise lose: a decision and the alternatives it ruled out, a bug's root cause and fix, a procedure learned the hard way, a preference stated once that should hold from then on.
Two things keep the base usable as it grows:
- Atomicity — one entry, one fact.
rememberwarns (non-blocking) on Markdown headers, more than 3 paragraphs, or content past 512 B/1 KB, pushing multi-fact dumps back into separate linked entries instead of a wall of text no search will rank well. - The graph, not a pile — entries link to each other via
kb://uuid#typereferences, so related facts (a hub project, its features, a diagnostic tied to one of them) stay navigable both ways instead of living as isolated rows.
Features
- Hybrid search — SQLite FTS5 (BM25, Porter stemming) fused with cosine similarity over local Model2Vec embeddings and an IDF-weighted exact-match channel over title/tags via Reciprocal Rank Fusion; finds entries by meaning or by a literal proper noun BM25/embeddings alone would dilute among lexically-similar distractors, with zero cloud dependency
- Typed graph relations —
kb://uuid#typelinks between entries, resolved both directions (outgoing + backlinks) on everyrecall, with an optional second hop (hops=2) to see how two entries connect through an intermediate one - Schema-enforced entry types —
hub,decision,diagnostic,feature,procedure,integration,pattern,snippet,preference,idea— declared inschema.jsonand exposed to the client as an enum, so an invalid type can't be written; filterable on search/list doctorintegrity pass — one schema-driven check over the Markdown files for dangling and superseded links, undeclared types, missing template fields, supernodes, and tag/type collisionspart_ofstructural membership — links a detail entry (decision,diagnostic,feature,procedure,integration, ...) to its hub, enforced per type by the schema; filterable onsearch/list, grouped alongsidekb://back-links in a hub'srecalldigest- Bi-temporal versioning —
remember(..., supersede=True)creates a new version instead of overwriting; old versions stay in history (include_superseded=True) instead of being lost - Duplicate detection & link suggestions —
remembermatches near-identical titles to avoid duplicate entries, and returnssuggested_links(embedding-similarity matches) so related facts get cross-referenced instead of orphaned - Atomicity guardrails — non-blocking warnings on structural anti-patterns (headers, >3 paragraphs, oversized content) so the base stays one-fact-per-entry as it scales
- Web dashboard — force-directed graph view, hybrid search, and a CRUD panel over the same knowledge base the MCP tools use (see Dashboard)
- Three transports — stdio (agent-managed), SSE, streamable-http — so the same server works for a single local agent or a shared multi-agent deployment
- Markdown as source of truth — the SQLite index is a rebuildable cache; delete it and
rebuild, no data is ever lost
Comparison
Inkwell trades automatic extraction (Mem0, Zep) for an agent-curated, atomic, explicitly-linked knowledge base — no LLM-driven ingestion pipeline, no graph database dependency, and the on-disk Markdown stays human-readable and diffable.
Measured Against a Plain Markdown Wiki
Inkwell was benchmarked against the same knowledge base packaged as an ordinary Markdown wiki — one file per topic, organized in folders by project and category (decision, diagnostic, feature, procedure, ...), each project with an index page and cross-links between related pages, browsed with Read/Grep/Glob/Bash. Same content, two ways of finding it — for equivalent fact coverage, Inkwell's search/recall used:
32 questions (single-hop, multi-hop, negative, cross-lingual, supersede) over 5,070 entries — 70 curated facts across 4 fictional projects plus 5,000 real-text distractor entries, so retrieval has to work at a scale that doesn't fit in an agent's context:
Every category folder is a flat list of one-file-per-entry, and every project folder (real or distractor) has its own README.md index page linking to all of them — structurally identical, so the wiki arm can't tell curated fact from distractor by shape alone.
An agent that already knows where to look doesn't need to grep, re-read, and re-grep its way there — the efficiency edge holds for equivalent fact coverage. Retrieval ranking has also been improving: adding an IDF-weighted exact-match channel (below) moved MRR from 0.851 to 0.857 and recall@5 from 0.851 to 0.869, with no regression across any language.
Design Patterns
- Reciprocal Rank Fusion — BM25 and embedding rankings are computed independently and merged by rank position rather than raw score, avoiding the need to normalize incomparable similarity metrics.
- Rebuildable cache over source of truth — the SQLite index is fully derived from the Markdown files (
rebuildregenerates it from scratch); the database is never the only copy of a fact. - Bi-temporal versioning —
supersedewrites a new entry and points the old one at it viasuperseded_by, instead of overwriting in place, so history stays queryable (include_superseded). - HATEOAS-style graph traversal — every
recallresponse carries its own outgoing/incomingkb://links, so navigating the knowledge graph doesn't require a separate query per hop. - Shared domain layer, two transports — the dashboard's REST API and the MCP tools both call the same
KnowledgeBase/SQLiteBackendmethods, so there is exactly one code path for writes regardless of which surface triggered them.
Architecture
Markdown files in <data-path>/entries/ are the only source of truth. The SQLite index (search_backend.py) is a disposable cache built from them — BM25 + Model2Vec embeddings fused via Reciprocal Rank Fusion, plus the kb:// relation graph — and can always be regenerated with rebuild. server.py exposes that index to an agent as MCP tools (remember/recall/search/...); the dashboard is an alternate entry point at the same layer, hitting the same KnowledgeBase/index directly over REST instead of MCP, so remember/delete behave identically whether called by an agent or edited by hand in the browser.
src/server.py— MCP tool definitions (remember,recall,search,list,tags,forget,rebuild,doctor), one process, stdio/SSE/streamable-http transportsrc/database.py—KnowledgeBase: Markdown + YAML frontmatter CRUD, UUID assignment, duplicate detection, bi-temporal supersede logicsrc/schema.json+src/schema.py— the entry taxonomy and its per-type rules as data, plus the loader that turns them into theentry_typeenum the MCP client validates againstsrc/doctor.py— the schema-driven integrity pass shared by thedoctortool,rebuild's warnings, andremember's conformance checksrc/search_backend.py—SQLiteBackend: BM25 (FTS5) fused with Model2Vec cosine similarity via Reciprocal Rank Fusion, pluskb://relation extraction/graph traversal; embeddings are computed lazily on write and stored as a BLOB columnsrc/dashboard/— a second, optional process (app.pyFastAPI REST +/api/graph,static/index.htmlvanilla-JS canvas graph,__main__.pyits own uvicorn entry point) reusing the sameKnowledgeBaseplugins/inkwell-hooks/— a self-contained plugin installable in both Claude Code and Codex (.claude-plugin/plugin.json,SessionStart/SessionEnd+ aPreToolUsesearch-before-remember gate, plus a Claude-Code-onlyinkwell-project-onboarderagent) that mechanically enforces the search-first, remember-after workflow instead of relying on a system prompt alone; listed asinkwell-hooksin both the repo-root.claude-plugin/marketplace.json(Claude Code) andplugins/marketplace.json(Codex)
In Docker, the MCP server and the dashboard run as two processes in one container (docker-entrypoint.sh), sharing the same /knowledge volume; the container exits if either process dies.
Quick Start
stdio
Your agent manages the server. Recommended for Claude Code, ChatGPT Desktop, Cursor.
SSE
Persistent server on the network. Share knowledge across multiple agents.
-p 8192 (host port omitted) has Docker pick a free ephemeral host port
instead of failing when a fixed port like 8192 is already taken by
another container — check the actual assignment with docker port.
Use -p 8192:8192 instead if you need the host port to stay fixed.
HTTP
Stateless, load-balanceable.
Multi-tenant
One server, several teams, each isolated to its own data folder and API key. Set INKWELL_MULTI_TENANT=1 (requires INKWELL_PUBLIC_URL and INKWELL_ADMIN_API_KEY, and a network transport — never stdio); src/app.py then serves MCP, the admin UI, and the dashboard from one process. Provision a team with inkwell add-team <name> (run via docker exec, see src/cli.py) to get back its API key, then point each team's agent at /mcp with that key as a bearer token:
Or as a raw mcpServers config (Claude Desktop and other clients):
TeamTokenVerifier (src/server.py) hashes the token and looks it up in admin.db on every request — no caching, so a revoked key stops working immediately.
Search
Hybrid: SQLite FTS5 (Porter stemming, BM25) fused with cosine similarity over local Model2Vec embeddings (minishlab/potion-multilingual-128M, no cloud dependency) via Reciprocal Rank Fusion — so a query that shares no literal words with an entry can still find it by meaning. Falls back to keyword-only if the embedding model can't load. The index is still a single SQLite file you can query with standard SQL tools.
Tools
Entry schema
The entry taxonomy and its per-type rules live in schema.json, not in Python: which frontmatter fields a type requires, which template body fields it should carry, whether search may boost it by usage, and whether recall digests its back-links. entry_type is exposed to the MCP client as an enum built from that schema, so an undeclared type is rejected before the call reaches the server.
Resolution order, first found wins: <data-path>/schema.json, then the packaged src/schema.json. A user file replaces the packaged one outright — the two are never merged, so copy the default and edit it. The schema is read once at startup, so editing it requires restarting the server. Entries written by hand can still carry an undeclared type; doctor reports those.
Dashboard
A web UI for visually exploring and hand-editing the same knowledge base the MCP tools use — no protocol duplication, every action goes through KnowledgeBase.
- Force-directed graph of all entries and their
kb://relations — click a node to inspect it, click a legend chip to filter by type (matches stay lit, others dim) - Hybrid search over the same BM25 + semantic index as the
searchMCP tool, with tag andentry_typefilters - CRUD panel to create, edit, supersede, or delete entries without touching Markdown files by hand — outgoing/incoming graph relations shown alongside the fields
- Dark, dense, no-chrome interface — a maintenance tool, not a consumer app (see
PRODUCT.md/DESIGN.md)
Disabled by default (the container only runs the MCP server). Enable it as a second process in the same container:
Or run it standalone locally: python -m dashboard (see Configuration for INKWELL_DASHBOARD_HOST/INKWELL_DASHBOARD_PORT).
Graph Relations
Link entries with kb://uuid#type URLs in Markdown content:
recall returns both directions, plus size metadata:
Like HATEOAS for knowledge — every response carries the links to navigate the graph.
Usage Examples
Store knowledge
Ask your agent:
"Remember that our API runs on port 8080 and depends on PostgreSQL 15."
Inkwell creates a Markdown file with a unique UUID, indexes it, and confirms. The agent can now recall this fact in any future session.
Search
"What do we know about PostgreSQL?"
Inkwell searches across all entries by content, title, and tags. Results are ranked by relevance.
Navigate the graph
"What depends on PostgreSQL?"
If entries link to the PostgreSQL article with kb://uuid#depends-on, Inkwell returns all backlinks — showing every service that depends on it, without the agent having to search for each one.
Share knowledge across agents
Start Inkwell with SSE or HTTP transport. Multiple agents — even from different providers (Claude, ChatGPT, Copilot) — connect to the same server. What one agent remembers, all others can recall.
Prompt Your Agent
Add this to your system prompt or project instructions to make your agent use Inkwell as a reflex, not an afterthought:
A system prompt is easy to forget mid-session. plugins/inkwell-hooks/ ships a self-contained plugin (SessionStart, SessionEnd, PreToolUse handlers, plus a Claude-Code-only inkwell-project-onboarder agent) that mechanically nudges the agent to search Inkwell before starting work and denies remember until a search or recall has run, instead of relying on it recalling this section unprompted. Works in both Claude Code and Codex — install with /plugin marketplace add <this-repo> then /plugin install inkwell-hooks@inkwell-memory (Claude Code), or codex plugin marketplace add <this-repo>/plugins then codex plugin add inkwell-hooks@inkwell-memory (Codex) — see plugins/inkwell-hooks/README.md for what each hook does and the full install flow.
Disable Claude Code's built-in auto memory
Claude Code ships its own automatic memory (MEMORY.md under ~/.claude/projects/<project>/memory/, loaded every session). Running it alongside Inkwell means two systems writing overlapping notes and competing for the agent's attention, which gets in the way more than it helps. Turn it off in settings.json:
Or via environment variable (takes precedence over the setting and the /memory toggle): CLAUDE_CODE_DISABLE_AUTO_MEMORY=1. See Claude Code's memory docs for details.
Configuration
All options have INKWELL_* environment variable fallbacks. CLI args take priority.
Storage Format
Entries are Markdown files with YAML frontmatter in <data-path>/entries/:
type is required on every remember call (a dedicated field, not part of tags) — it classifies the entry (hub, decision, diagnostic, procedure, preference, snippet, ...) and is filterable via search/list. resource is optional: a canonical file/folder path the entry describes. Legacy entries written before these fields existed still read fine.
The search index is a rebuildable cache at <data-path>/index/inkwell.db. Delete it and rebuild — no data is ever lost. rebuild also reports schema-conformance warnings (missing type, malformed resource) across existing entries.
Development
License
來源:README.md,提交 69e4ce6
工具
0版本歷史
1- v0.14.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Memory 整合

Memory.fit
fit.memory官方發布者
託管式 Memory.fit 伺服器,讓 AI 讀取你的訓練、睡眠、恢復與飲食資料,並寫回每週計畫、每日目標和飲食計畫。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方發布者
pg.ddx.io: the PostgreSQL community's memory 的託管 MCP 服務,由 pg.ddx.io 發布;無需登入;Streamable HTTP;29 個工具。
var.gg Naming Memory
gg.var官方發布者
遠端 MCP 伺服器,可依領域概念推薦並檢索韓、日、中、越、英多語言的程式識別字名稱,並提供 ERD 結構查詢。

Counterparts
ai.counterparts
為 Claude Code 與 Claude Desktop 提供的本地優先長期記憶:助理自行寫下關於你與專案的筆記,並在之後的對話中回想起來。

LAHZE - Persian AI Memory Platform
由 GitHub 帳號 pedramgholizadeh 發布
以波斯語為先的地理記憶平臺:發現地點,起草併發布僅限波斯語的記憶。AI 翻譯