
AI代理的本地首个长期内存:一个MCP服务器,TypeScript SDK,CLI和HTTP服务在一个SQLite文件之上. 证据支持的召回,废除了陈旧指导的纠正,时间历史.
概览
当一个源被纠正后,每个依赖它的内存都会被退役,所以下一个代理从仍然真实的东西开始,而不是重复一个 stale school. Mnemosyne将内存与它的后果联系起来:一个被纠正的要求可以退休一个依赖程序,一个失败的审判可以扣留一个技能,一个新的代理人可以从一个明确的交接中恢复. 在一个 SQLite 文件内运行本地引擎; 通过 TypeScript, MCP, CLI 连接您的主机, 或者用 Python 客户端和活检查器来连接 HTTP 。 把记忆交给一个MCP客户端. 读取工程根中的.mcp.json并读取.cursor/mcp.json;两者都取取同个服务器条目. 数据库文件(mode 0600)及其母目录(mode 0700)是首先使用创建的. 从目录中解析相对路径 客户端启动服务器 ; 如果您的客户端在其他地方发射服务器, 请使用绝对路径 .
概述(AI 翻译)
** 下一个代理开始更明智。 **
**Mnemosyne是AI代理的本地第一,长期内存:一个SQLite文件,它保存着一个代理从中学到的东西及其来源的证据,服务于TypeScript,MCP,CLI或HTTP上的任何宿主. ** 当一个源被纠正后,每个依赖它的内存都会被退役,所以下一个代理从仍然真实的东西开始,而不是重复一个 stale school.
Mnemosyne将内存与它的后果联系起来:一个被纠正的要求可以退休一个依赖程序,一个失败的审判可以扣留一个技能,一个新的代理人可以从一个明确的交接中恢复. 在一个 SQLite 文件内运行本地引擎; 通过 TypeScript, MCP, CLI 连接您的主机, 或者用 Python 客户端和活检查器来连接 HTTP 。
** 2.0.0-rc.10 释放候选人 麻省理工学院-节点 js ≥22.16**
网站 快速启动 文档 实例 移民 计量结果 npm 贡献
□ 安装和连接代理
把记忆交给一个MCP客户端. ** Claude Code** 读作项目根 .mcp.json;** Cursor** 读作 [[T1];两者都取同个服务器条目. 数据库文件(mode 0600)及其母目录(mode [T3])是首先使用时创建的.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Mnemosyne
The next agent starts wiser.
Mnemosyne is local-first, long-term memory for AI agents: one SQLite file that keeps what an agent learned together with the evidence it came from, served to any host over TypeScript, MCP, CLI or HTTP. When a source is corrected, every memory that depended on it is retired, so the next agent starts from what is still true instead of repeating a stale lesson.
Mnemosyne connects memory to its consequences: a corrected requirement can retire a dependent procedure, a failed trial can withhold a skill, and a new agent can resume from an explicit handoff. Run the local engine in one SQLite file; connect your host through TypeScript, MCP, CLI, or authenticated HTTP with a Python client and live inspector.
2.0.0 · Stable release · MIT · Node.js ≥22.16
Website · Quickstart · Documentation · Examples · Migration · Measured results · npm · Contributing
Install and connect an agent
npm install mnemosy-ai # latest = 2.0.0; pin [email protected] to reproduce
npx --no-install mnemosy demo # offline: no API key, no server, no Docker
Give the memory to an MCP client. Claude Code reads .mcp.json in the project root and Cursor reads .cursor/mcp.json; both take the same server entry. The database file (mode 0600) and its parent directory (mode 0700) are created on first use. Relative paths resolve from the directory the client starts the server in; use absolute paths if your client launches servers elsewhere.
{
"mcpServers": {
"mnemosyne": {
"command": "npx",
"args": [
"-y", "-p", "[email protected]", "mnemosy", "mcp",
"--db", "./.mnemosyne/memory.sqlite",
"--workspace", "my-project", "--agent", "assistant"
]
}
}
}
Claude Code can register the same server from the shell:
claude mcp add mnemosyne -- npx -y -p [email protected] mnemosy mcp --db ./.mnemosyne/memory.sqlite --workspace my-project --agent assistant
安装
npx -y -p [email protected] mnemosy mcp --db ./.mnemosyne/memory.sqlite --workspace my-project --agent assistant配置
{
"mcpServers": {
"mnemosyne": {
"command": "npx",
"args": [
"-y", "-p", "[email protected]", "mnemosy", "mcp",
"--db", "./.mnemosyne/memory.sqlite",
"--workspace", "my-project", "--agent", "assistant"
]
}
}
}