
CPersona
io.github.Cloto-dev由 GitHub 账号 Cloto-dev 发布v2.5.3更新于 Oct 24, 2026
Persistent AI memory in one SQLite file: 3-layer hybrid search, confidence scoring, 29 tools.
概览
让助手把持久记忆保存在单个本地 SQLite 文件中,并通过向量、FTS5 与关键词混合检索,提供 29 个工具。
- 可以做什么
- CPersona 把事实、会话摘要和累积画像存入一个本地 SQLite 文件,并通过混合检索取回:由嵌入服务器驱动的向量层、FTS5 三元组检索和关键词检索,按排名或相对分数融合。工具包括 store、recall 和 reconstruct,后者返回记忆条目并附带所引用存储行的原文片段。检索按 agent_id、project_id 和 channel 隔离,多个助手或项目可共用一个数据库而不互相串扰。它不调用生成式模型,由助手自行总结并提交文本。
- 适用场景
- 当助手需要跨会话记住项目决策、偏好或此前的讨论,并且你希望这些记忆保存在自己拥有的文件中而不是托管服务里时,适合安装。也适合需要可靠取回标识符、错误字符串和精确名称的编码会话。
- 运行要求
- 以 stdio 方式在本地运行,可通过 uvx 或 pip 从 cpersona 的 PyPI 包启动;一键方式需要 Python 3.11+ 和 uv。强烈建议为向量层运行嵌入服务器,通过 CPERSONA_EMBEDDING_MODE 和 CPERSONA_EMBEDDING_URL 配置;没有它时退回到词法检索,并会报告检索质量下降。CPERSONA_DB_PATH 指定 SQLite 文件,CPERSONA_RECALL_MODE 选择融合策略。启动时会向 pypi.org 查询是否有新版本,除非把 CPERSONA_UPDATE_CHECK 设为 false。
安装
在 SourceWeft 中
- 打开 控制台中的 CPersona,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
CPersona
Long-term memory for AI agents, in one SQLite file you own.
CPersona is an MCP server that lets Claude Code, Codex, Claude Desktop, Cursor, VS Code or any other MCP client remember what you decided, why, and what happened last time — across sessions.
[PyPI] [CI] [Python] [License: MIT]
Documentation · Getting Started · Tools · Discussions
[The CPersona dashboard's memory network: each point is a memory, lines join the most similar ones, grouped by agent]The built-in dashboard, showing a made-up store of 72 memories.
Why CPersona
Every new session with a coding agent starts from zero. CPersona gives the agent a memory it can write to as it works and read from before it acts.
- Yours, on your machine. Everything lives in a single SQLite file. No account, no cloud,
no external database;
sqlite3 .backupcopies it. - No language model inside. CPersona never calls a generative model to store or recall. Your agent writes the summary; CPersona keeps it and finds it again.
- Answers you can trace.
reconstruct, the recommended way to answer from memory, quotes the stored records behind each item, so you can see where an answer came from. - Search that catches what vectors miss. Vector search runs beside full-text and keyword search, so exact names, identifiers and error strings are found too, in Japanese and other scripts without spaces as well.
- See what it remembers.
cpersona dashboardopens a read-only page of the store: what was stored last, what is recalled most, every memory in full, and the network above. - Honest when it degrades. Without an embedding server it still runs on keyword search, and says so on every recall instead of quietly returning less.
Quick start
With Claude Code or Codex, install the agent plugin and let the agent do the rest:
Then say "Set up CPersona." The plugin carries the setup skill and the hooks that remind the
agent to recall before it acts and to store as it goes. (Claude Code 2.1.275 or later. In Codex:
codex plugin marketplace add Cloto-dev/cpersona, then codex plugin add cpersona@cpersona.)
By hand, in three steps:
Getting Started covers the other clients, Windows, containers, and the short policy block that makes every future session use the memory.
Upgrading an existing install? Read the When you upgrade section of the release notes and SUPPORT.md first.
A look inside
Memories are kept per agent, and project_id and channel let several agents and projects share
one database without mixing.
Benchmarks
On OmniMemEval's LongMemEval-S pipeline (500 questions,
answered by gpt-4.1-mini, judged by gpt-4o-mini), in this project's own run. Overall is the
share of questions judged correct; Context Tokens is the average sent to the answer model per question:
Pro mode is level with MemOS within sampling error, and on LoCoMo it answers 84.03%. Setups, the registered rules and every departure from a clean run are in the results.
Documentation
cloto-dev.github.io/CPersona is the full reference, also in Japanese:
Contributing
Bug fixes, tests and documentation can be sent as a pull request straight away. For changes to the database schema, the tool contracts or the tool list, open an issue first. CONTRIBUTING.md has the setup — no embedding server is needed to run the ~4,150 test functions — and the three checks CI runs.
Questions and ideas are welcome in Discussions. A sentence in the docs that confused you is worth reporting too: it is a defect of its own.
Support
- Bugs and requests: open an issue.
- Security: report privately, as SECURITY.md describes.
- Which version to run: SUPPORT.md.
- In Japanese: the docs have a language selector, and a book on Zenn covers the design and setup.
If CPersona has earned a place in your workflow, you can sponsor the work on GitHub. It buys no feature and no place in the issue queue; starring the repository, filing a clear issue or fixing a sentence in the docs helps too.
License
MIT — see LICENSE.
来源:README.md,提交 bc1d7f2
工具
0版本历史
1- v2.5.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分

