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.

已验证STDIO仅桌面数据库知识与记忆

概览

AI 生成的概览

让助手把持久记忆保存在单个本地 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。
安装前请注意
记忆数据库保存助手写入的全部内容,应把该 SQLite 文件及其校准附属文件视为敏感数据并一起备份。检索严格按 agent_id 限定,用错标识的会话取不到任何内容。README 指出升级到 2.6 会在首次启动时把模式从版本 13 迁移到 17 并改变部分工具行为;2.5.3 在没有 CPERSONA_AUTH_TOKEN 时不会启动 HTTP 传输,除非设置 CPERSONA_ALLOW_UNAUTHENTICATED_HTTP,stdio 不受影响。启动时的更新检查会访问 pypi.org。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CPersona,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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 .backup copies 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 dashboard opens 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:

text
/plugin install cpersona --marketplace Cloto-dev/cpersona

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:

bash
# 1. Run an embedding server (recommended; it powers vector search)uvx --from "cembedding[onnx]" cembedding-download-model --model bge-m3EMBEDDING_PROVIDER=onnx_bge_m3 uvx --from "cembedding[onnx]" cembedding
# 2. Register CPersona with your client (Claude Code shown)claude mcp add-json cpersona '{"type":"stdio","command":"uvx","args":["cpersona"],"env":{"CPERSONA_DB_PATH":"/home/you/.claude/cpersona.db","EMBEDDING_MODE":"http","EMBEDDING_HTTP_URL":"http://127.0.0.1:8401/embed"}}' -s user
# 3. In a new session, ask the agent to store something, then recall it in another new session
# 4. See what it remembers, in the browsercpersona dashboard

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:

BackendDeploymentSS-UserSS-AsstSS-PrefTemp. ReasMulti-SKnow. UpdOverallContext Tokens
CPersona 2.6.11 (pro mode)local97.1494.6496.6786.4785.7188.4689.604,262.5
CPersona 2.6.11 (lite mode)local95.7183.9390.0080.4574.4482.0582.20993.3
MemOScloud100.00100.00100.0089.4778.9584.6289.204,151

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:

GuideWhat it covers
Getting StartedInstall, embedding server, client registration, verification
Behavior ContractsWhat you may rely on: recall ordering, dedup, scan window, response shapes
ToolsEvery tool, grouped by what you reach for it for
ArchitectureStorage, the retrieval pipeline, isolation axes
RoadmapWhat each release line is for and may break; planned retrieval features and the scale ladder
Operations RunbookBackup, degradation detection, tuning, CJK guidance, corpus sync
ConfigurationEvery environment variable and its default
Quality AssuranceHow a release is gated: audits, the bug ledger, structural and mutation gates
FAQShort answers to the questions operators actually ask

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

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
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v2.5.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分