Pensyve

io.github.major7apps由 GitHub 帳號 major7apps 發布v5.0.0更新於 Oct 30, 2026

Universal memory runtime for AI agents — episodic, semantic, and procedural memory.

已驗證STDIO僅桌面知識與記憶AI 與機器學習

概覽

AI 產生的概覽

Pensyve 是本地記憶執行環境,讓 AI 助理跨工作階段持久記住事實、對話、觀察與動作結果。

可以做什麼
  • 儲存關於使用者、專案與其他具名實體的事實,並把對話記錄為情節
  • 透過文字比對、向量嵌入與實體關係檢索記憶
  • 記錄觀察與動作結果,並透過整合提升重複事實、調整記憶保留
  • 透過專門的檢查工具檢視已儲存的記憶
  • 資料保存在本機 SQLite,也可透過自行架設的 HTTP 閘道共用儲存
適用情境
適合希望 Claude Code、Cursor、Codex 等程式開發助理在工作階段之間記住偏好、專案事實與過去結果的情境,也適合為自己的代理程式碼建立自架記憶層。
執行需求
以本機 stdio 程序執行,通常使用已發布的容器映像,或從儲存庫建置 Rust 伺服器(需 Rust 1.94 或更新版本)。透過環境變數 PENSYVE_NAMESPACE 指定命名空間。本機使用不需帳號或 API 金鑰;嵌入模型首次載入時可能下載,除非已快取。
安裝前請注意
伺服器會把記憶記錄寫入本機儲存,記錄的內容會長期保留且可被檢索,應審慎決定要保存什麼。使用 HTTP 閘道時須自行設定帶 psy_ 前綴的 API 金鑰,並設定 HTTPS 與允許的主機;文件中的範例金鑰僅供本機測試。專案處於維護模式,不再規劃新增功能。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[Pensyve logo]

Pensyve

[CI] [License: Apache 2.0] [Python 3.10+] [Rust 1.94+]

Pensyve is an open-source runtime for persistent AI agent memory. It stores facts, conversations, observations, and action outcomes so an agent can retrieve them in later sessions. You can use it through Python, a Model Context Protocol (MCP) server, a command-line tool, or a REST API.

The Rust engine uses SQLite for local storage and runs embedding models locally to search by meaning. TypeScript and Go clients connect to a gateway you run yourself. Local use does not require a Pensyve account or API key. Your application or client integration calls Pensyve to save and retrieve memories.

Choose a setup

Use caseStart here
Add persistent memory to a Python agentPython quick start
Give Claude Code, Cursor, or Codex access to memory toolsMCP server and client setup guides
Share a memory store through TypeScript, Go, or RESTHTTP gateway
Use a LangChain or LangGraph adapterPython integration or TypeScript integration

Project status

Pensyve Cloud closed on October 1, 2026. The open-source project continues in this repository under the Apache 2.0 license, with the engine, SDKs, integrations, and documentation available here.

Pensyve is in maintenance mode. Releases cover security fixes and dependency updates, with no new features planned. See the maintenance policy for contribution and support expectations. If you have a saved Cloud export, the self-hosting guide explains how to use it with your own gateway.

What you can do

  • Store facts about users, projects, or other named entities, and record conversations as episodes.
  • Search memories using text matching, embeddings, and relationships between entities.
  • Record observations and action outcomes, and use consolidation to promote repeated facts and update memory retention.
  • Keep data in local SQLite storage, or run the HTTP gateway with SQLite or PostgreSQL.

Embedding models may download when first loaded unless they are already cached. Running without network access requires preparing the model files first. See the model setup and deployment guide.

How agent memory works

Pensyve stores memory outside the language model. Your application saves facts or conversations, searches for relevant records, and adds the results to a later prompt. Reusing the same storage path and namespace lets the agent retrieve information across processes and sessions. Saving a memory does not train the language model or change its weights.

The store holds four kinds of records: facts (semantic memory), conversations (episodic memory), action outcomes (procedural memory), and observations. Your integration decides what to record and when to retrieve it. Recording a conversation does not automatically turn it into a successful procedure. See how storage and retrieval work and the usage recipes for the APIs and their limits.

Python quick start

Python 3.10 or newer is required.

bash
pip install pensyve

Create a local store, save a fact, and retrieve it:

python
import pensyve
p = pensyve.Pensyve(path="./memories", namespace="my-agent")user = p.entity("user", kind="user")
p.remember(    entity=user,    fact="Prefers dark mode and vim keybindings",    confidence=0.95,)
for memory in p.recall("editor preferences", entity=user):    print(memory.content)

Reuse the same path and namespace in a later process to retrieve saved memories. The Python SDK runs the engine in your process and does not need the HTTP gateway.

You can also record a conversation with the same p and user:

python
with p.episode(user) as episode:    episode.message("user", "Use dark mode in my editor")    episode.message("agent", "I updated the editor settings")    episode.outcome("success")
groups = p.recall_grouped("editor settings", limit=10)for group in groups:    for memory in group.memories:        print(memory.content)

recall_grouped() groups results by source session for use in an agent's prompt. See the Python SDK guide and recipes for more examples.

MCP server

Pensyve's local MCP memory server lets clients such as Claude Code, Codex, and Cursor store and retrieve memories across sessions. From a checkout of this repository, install the server with Rust 1.94 or newer:

bash
git clone https://github.com/major7apps/pensyve.gitcd pensyvecargo install --path pensyve-mcp --locked

Make sure Cargo's binary directory is on your client's PATH, then add a stdio server entry to its MCP configuration:

json
{  "mcpServers": {    "pensyve": {      "command": "pensyve-mcp",      "args": ["--stdio"],      "env": {        "PENSYVE_NAMESPACE": "my-project"      }    }  }}

The server provides tools such as pensyve_remember, pensyve_recall, pensyve_observe, and pensyve_inspect. It stores data locally and needs no API key. The configuration file location depends on your client. See the MCP setup guide and integration guides.

HTTP gateway

Run the gateway to access Pensyve over REST or MCP HTTP, including from the TypeScript and Go SDKs. From the repository root, start a local instance:

bash
HOST=127.0.0.1 PENSYVE_API_KEYS=psy_local_example \  cargo run --release -p pensyve-mcp-gateway

In another terminal, save and recall a fact:

bash
curl http://localhost:3000/v1/remember \  -H "Authorization: Bearer psy_local_example" \  -H "Content-Type: application/json" \  -d '{"entity":"user","fact":"Prefers Python","confidence":0.95}'
curl http://localhost:3000/v1/recall \  -H "Authorization: Bearer psy_local_example" \  -H "Content-Type: application/json" \  -d '{"query":"programming language","entity":"user"}'

The MCP HTTP endpoint is http://localhost:3000/mcp. Use the same API key in your client's Authorization: Bearer header.

The example key is for local testing. For a deployment, choose your own key with the required psy_ prefix and configure HTTPS and allowed hosts. See the self-hosting guide, gateway configuration, and security documentation.

SDKs and integrations

The TypeScript and Go SDKs require a running gateway. Configure its URL and, when authentication is enabled, an API key from that gateway.

InterfaceInstallation or guide
Pythonpip install pensyve, SDK guide
TypeScriptnpm install @pensyve/sdk, SDK guide
Gogo get github.com/major7apps/pensyve/pensyve-go/v5@latest, SDK guide
Claude CodePlugin setup
CursorMCP setup and rules
CodexPlugin setup
LangChain and LangGraphPython adapter, TypeScript adapter
Other clients and frameworksIntegration index

Command-line tool

From the repository root, install the CLI and inspect its commands:

bash
cargo install --path pensyve-cli --lockedpensyve --helppensyve statuspensyve recall "editor preferences" --entity user

The binary is named pensyve. Its default output is JSON, and --format text selects text output. The CLI uses its own default local storage location; it does not automatically open the ./memories directory from the Python example. See the CLI source and command definitions for storage and namespace options.

Documentation

GuideContents
Documentation indexChoose a setup, find API guides, and identify historical plans
Getting startedSetup by client or SDK
Self-hostingGateway deployment, model files, backups, and saved Cloud exports
RecipesRecall, facts, episodes, observations, and other API examples
ArchitectureStorage, retrieval, and component boundaries
SecurityAuthentication, namespace isolation, and execution limits
ReliabilityTests and runtime guarantees
ChangelogRelease history and breaking changes

Development and contributions

Start with CONTRIBUTING.md for prerequisites and setup. From the repository root:

bash
uv sync --extra devmake buildmake check

make build compiles Rust and builds the Python extension. make check runs the Rust and Python lint and test commands. TypeScript and Go have separate checks documented in the contribution guide.

Issues and pull requests follow the maintenance policy. Report security issues through private vulnerability reporting.

License

Pensyve is licensed under Apache 2.0.

來源:README.md,提交 d2c56fa

工具

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

版本歷史

2
  1. v5.0.0最新Oct 1, 2026
  2. v4.0.0Sep 16, 2026

評分

已滿足適用檢查項的 40%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

    請在儲存庫或註冊中心條目中宣告授權條款。