
Pensieve
io.github.praveen-ilangovan由 GitHub 帳號 praveen-ilangovan 發布v0.1.0更新於 Oct 24, 2026
Manually-triggered, self-organising personal memory for AI agents; SQLite, no vector DB.
概覽
Pensieve 是給 AI 助理使用的本機個人記憶庫,需手動觸發,以單一 SQLite 檔案儲存,提供 MCP 伺服器與命令列兩種入口。
- 可以做什麼
- 把筆記記錄到頂層 stream 中,一則筆記可同時屬於多個 stream,並可軟刪除與還原。依名稱尋找、依全文內容搜尋,或依最近變更時間回想。圍繞實體(人物、組織、主題)整理筆記,並把反覆出現的實體提升為 thread。以引用方式掛上 asset 指標(儲存庫、檔案、目錄、URL、圖片、文件)並附使用提示,僅在請求時讀取。透過命令列以同一引擎檢視與管理 stream、thread 與筆記。
- 適用情境
- 當你希望助理跨工作階段保留長期的個人脈絡,並且想自己明確決定要存什麼、要回想什麼時使用。適合在少數幾個穩定領域工作、需要輕量且自組織回想而非任務管理的人。
- 執行需求
- 以本機 stdio 程序在使用者機器上執行,需要 Python 3.12 或更新版本。從 PyPI 安裝 pensieve-mcp 套件(例如用 pipx 或 uv),或用 uvx 臨時執行,然後在 MCP 用戶端把 pensieve-mcp 指令註冊為 stdio 伺服器。記憶保存在使用者家目錄下的單一檔案中;可選的助理技能隨原始碼儲存庫提供,不在安裝套件內。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pensieve,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Pensieve
[PyPI version] [Python versions] [License: MIT] [MCP Registry] [Glama score]
A personal, agent-driven memory that survives across sessions.
You talk to an AI assistant (Claude Code) every day, but it forgets everything between sessions. Pensieve is the long-term memory you control: any time in a conversation you can say "add this to pensieve" to capture something, or "what do I know about X?" to pull it back — and it's there, organised, current, and yours.
The metaphor: deliberately draw out a strand of thought and deposit it in the vessel to revisit later.
It's a small Python + SQLite engine with two front doors: an MCP server the agent
uses, and a CLI for you. Your memory lives in a single file at ~/.pensieve.
Philosophy
Five ideas shape every decision in Pensieve:
-
An information lake, not a project manager. It stores what you know and lets you recall it. It deliberately has no tasks, statuses, or due dates — the agent infers state by reading, the store just holds the information.
-
Deliberate on both ends. Pensieve never acts on its own. It writes only when you say "remember this," and recalls only when you ask. No silent saves, no auto-loading your memory at the start of a session. You stay in control of what goes in and what comes out.
-
Structure emerges; you don't design it upfront. You don't build a taxonomy. You keep a few top-level streams (the domains you actually work in) and drop notes in. The people, orgs and topics your notes mention become entities automatically, and one that keeps recurring earns its own thread. Organisation is a consequence of use.
-
Notes are the atoms; everything else references them. A note can stand alone or live in several streams at once. Entities and threads are views over notes, not owners of them — so removing a topic never destroys a note that's also about something else.
-
Point at the world, don't copy it. Attach a repo, file or URL as an asset — a by-reference pointer with a one-line "how to use me" hint. Pensieve stores the pointer and reads it on demand; it never crawls your disk or follows a link on its own.
Want the reasoning in depth — the design decisions, the full model, the tradeoffs?
docs/philosophy.md.
The model
Recall has three lenses: by name (find), by content (search — full-text,
stemmed, ranked), and by time (recent — what changed lately).
Install
Assumes Python 3.12+.
Recommended: from PyPI
Pensieve is a standard MCP server, so the quickest way in is pipx
(or uv):
This puts pensieve (the CLI) and pensieve-mcp (the MCP server) on your PATH. Then point
your agent at it. For Claude Code:
For any other MCP client, register the pensieve-mcp command as a stdio server. To run it
ad-hoc without installing, uvx pensieve-mcp works too.
Pensieve is listed in the official MCP Registry
as io.github.praveen-ilangovan/pensieve, so registry-aware clients can discover and install
it directly.
Note: the PyPI package is the engine (CLI + MCP server). The judgment-bearing Claude skill (the
capture/fetchflows) ships with the repo, not the wheel — if you want it, use the script install below, which drops it into~/.claude/skills/pensieve/for you.
Agent setup from source
install.sh checks prerequisites up front (and changes nothing if any are missing), ensures
pipx, installs Pensieve (pensieve + pensieve-mcp on your PATH), installs the selected
agent skill, and registers the MCP server in that agent's user configuration. Claude's skill
lives in ~/.claude/skills/pensieve/; Codex's user-scoped $pensieve skill is symlinked at
~/.agents/skills/pensieve/, so it is available from every repository. It's idempotent —
re-run anytime to pick up updates.
The Codex MCP registration pins PENSIEVE_HOME=~/.pensieve, ensuring Codex reads and writes
the same personal store as Claude even when Codex is launched from this repository (whose
.env intentionally points development commands at .local/manual). The engine and MCP
tools are unchanged; the Codex skill supplies the same deliberate capture/recall discipline
as the existing Claude adapter.
Then restart the selected agent and, from any directory:
"what streams do I have? check pensieve"
Your memory lives in ~/.pensieve.
Using it (with the agent)
Pensieve shines through the agent — you speak naturally, it does the judgment and calls the tools. Everything below is just talking to Claude Code.
Set up your domains (do this once, deliberately):
"Create a pensieve stream called Career — for my job search and work."
Capture — any time something worth keeping comes up:
"Add this to pensieve: had a call with Maya about the platform role; she's reviewing my portfolio."
The agent filters for what's durable, routes it to the right stream, and recognises that
"Maya" is a person worth tracking — without you managing any of that. If a note spans two
domains (say, a talk that's relevant to both your career and a side-project), it files
one note in both.
Recall — pick the lens that fits the question:
"What do I know about Maya?" · "What did we decide about salary?" · "Catch me up — what's changed lately?"
Point at live context — so the agent knows where to read:
"Add my project repo at ~/projects/acme as an asset on the side-projects stream — hint: read README.md first." Later: "pull up the acme repo." (It follows the pointer only when you ask.)
Promote — when something recurs, the agent proposes it:
"Maya's come up across 5 notes — want her own thread under Career?"
Remove / restore — everything is soft and reversible:
"Remove that note." / "Actually, bring it back." / "I'm done with the X stream."
Using it (the CLI)
The same engine is a CLI too — handy for a quick check or scripting without the agent
(pensieve stream list, pensieve search "…", …). Full command reference with examples:
docs/cli.md.
How it works (under the hood)
- SQLite store (
~/.pensieve), self-migrating via Alembic on first use. - Full-text search via SQLite FTS5 + a porter stemmer (so "pricing" recalls "priced").
- A clean ports/adapters core: services depend on a storage port with two interchangeable backends (SQLite + an in-memory double), kept honest by a conformance test.
- The MCP server and CLI are thin "op" layers; the judgment (what to keep, how to
resolve an entity, when to promote) lives in the agent skill (
adapters/claude/).
Develop on it
This repo is a self-contained dev environment — it never touches your real ~/.pensieve.
The in-repo MCP server and CLI use a local dev store (.env → .local/manual); the global
install (./install.sh) is what points at ~/.pensieve.
Design notes live in plans/ (one file per slice, plus
plans/roadmap.md) and docs/
(philosophy.md — the why + model, cli.md — commands).
Status
Working and in daily use: streams · threads · notes · entities · promotion · assets ·
search · recency · multi-stream notes · soft remove/restore — all via CLI and MCP.
Built and validated slice by slice with a real agent. See plans/roadmap.md for what's next.
來源:README.md,提交 0854f7a
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分