- 在线对话服务:需要把多轮会话和工具调用结果落成可检索状态时,它把持久化和召回挂在 LLM 客户端注册这一步上,省掉自己维护 session 表和摘要逻辑;换成纯向量库方案,召回语义有了但实体/流程归属还得自己补。
- 多租户 SaaS 里的 Agent:用 entity_id + process_id 的 attribution 把「谁」和「哪条流程」分开,比在 prompt 里塞 user_id 更可控;自己搓一套就得处理跨会话隔离和清理。
- 已有 Postgres/MySQL 的团队:BYODB 让你把记忆写进现有库,不用为了记忆再引入一套独立存储;换 Mem0 之类的托管方案通常意味着数据要出去。
- 用 Claude Code / 自建 Agent 跑长任务:OpenClaw、Hermes 插件和 MCP 接入能捕获工具调用和决策,不用改 Agent 主循环。
Memori
MemoriLabs活跃维护 有专家点评给 AI Agent 提供持久化记忆的基础设施层,把对话和执行过程转成结构化状态,兼容任意 LLM,可直接接入现有数据设施,支持云上和本地部署。
Memori is agent-native memory infrastructure. A LLM-agnostic layer that turns agent execution and conversation into structured, persistent state for production systems. Built for enterprise, Memori works with the data infrastructure you already run, no rip-and-replace, and deploys across managed cloud, single-tenant cloud, VPC, and on-premises.
专家点评
上手难度:进阶更新于 2026-11-11给 Agent 加持久记忆的中间层,注册客户端后自动落库和召回,不用自己写状态机
适用场景
踩坑
- 默认路径是 Memori Cloud:不显式配 BYODB 就会把对话数据发到 app.memorilabs.ai,同时要 MEMORI_API_KEY 和 LLM key 两套凭证;对数据出境敏感的部署要先读 BYODB 文档再动手。
- 本地/自托管模型接入是 issue 里反复出现的诉求(Ollama/vLLM、OpenAI-compatible endpoint 两条独立 issue),说明默认链路对非官方 endpoint 的支持不完整,跑本地模型前先确认当前版本是否已覆盖。
- 记忆没保存/偏好被部分遗忘这类问题在 issue 里有单条报告,反应数很低,无法判断是普遍缺陷还是个例;上线前自己补一层写入校验和召回命中检查比较稳妥。
同类对比
Mem0 和 Zep 是同类,差别在托管程度和数据落点:能接受数据托管、想要开箱即用的选它们;必须留在自有库里的选 Memori。纯 RAG 场景其实用向量库加自写会话表就够,不必上这层。
pip install memori
npm install @memorilabs/memoriREADME 未说明,未提及显存、GPU 型号或 CPU 运行要求
项目说明
由 README 自动翻译提炼给 Agent 加持久记忆的 LLM 无关中间层,把执行与对话存成结构化状态
给 AI Agent 提供持久化记忆的基础设施层,把对话和执行过程转成结构化状态,兼容任意 LLM,可直接接入现有数据设施,支持云上和本地部署。
核心能力
- 注册 LLM 客户端后自动持久化并召回对话
- 用 attribution 绑定 entity_id 与 process_id 区分用户和流程
- 支持 BYODB 接入自有数据库,无需替换现有数据设施
- 提供 OpenClaw 与 Hermes 插件,捕获工具调用和决策
- 提供 MCP 方式一条命令接入 Agent
容易踩的坑
需要先在 app.memorilabs.ai 注册获取 MEMORI_API_KEY,并同时配置 LLM 的 API key;默认走 Memori Cloud,想用自有数据库需另看 BYODB 文档;CLI 依赖 Python 环境,通过 python -m memori 调用
- v3.3.6Version 3.3.6最新正式版2026-05-28 · 2026-05-28 01:01 UTC
What's Changed
- Release version 3.3.6rc1 with exclusive Rust
fastembedbackend for … by @devwdave in https://github.com/MemoriLabs/Memori/pull/561 - fix mysql datetime type by @devwdave in https://github.com/MemoriLabs/Memori/pull/562
- Release version 3.3.6, updating changelog and project files to reflec… by @devwdave in https://github.com/MemoriLabs/Memori/pull/563
Full Changelog: https://github.com/MemoriLabs/Memori/compare/v3.3.5...v3.3.6
- Release version 3.3.6rc1 with exclusive Rust
- v3.3.5Version 3.3.52026-05-27 · 2026-05-27 16:20 UTC
查看更新说明
What's Changed
- feat: add fastuuid package and enhance MongoDB ID handling by @devwdave in https://github.com/MemoriLabs/Memori/pull/528
- chore: remove unused cargo arguments in publish-npm workflow by @devwdave in https://github.com/MemoriLabs/Memori/pull/529
- Warn users when
allowConversationAccessis not configured (>= 2026.5.7) by @rpkruse in https://github.com/MemoriLabs/Memori/pull/530 - test (llm/helpers) : add ingestion serialization behavioral contract tests by @krishna28004 in https://github.com/MemoriLabs/Memori/pull/524
- docs: update agent skills and client setup to include memori_compacti… by @devwdave in https://github.com/MemoriLabs/Memori/pull/531
- Add cargo args to intel mac by @rpkruse in https://github.com/MemoriLabs/Memori/pull/540
- Add Claude Code Plugin to Memori by @rpkruse in https://github.com/MemoriLabs/Memori/pull/543
- Removed unneeded console log from file by @rpkruse in https://github.com/MemoriLabs/Memori/pull/544
- Refactor project ID handling in Memori skill commands by @devwdave in https://github.com/MemoriLabs/Memori/pull/545
- Update SKILL.md to clarify required configuration values for Memori i… by @devwdave in https://github.com/MemoriLabs/Memori/pull/546
- Enhance .env.example and index.ts for improved environment variable h… by @devwdave in https://github.com/MemoriLabs/Memori/pull/547
- Added Claude Code and revised OpenClaw docs by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/548
- Enhance environment variable handling and documentation for Memori Cl… by @devwdave in https://github.com/MemoriLabs/Memori/pull/549
- Update Memori integration documentation to clarify API key and signup… by @devwdave in https://github.com/MemoriLabs/Memori/pull/550
- Prerequisites addition by @gordeee in https://github.com/MemoriLabs/Memori/pull/551
- Update API key wording and add quick reference to SKILL.md by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/552
- feat(provisioning): add TiDB Zero support for BYODB provisioning by @devwdave in https://github.com/MemoriLabs/Memori/pull/536
Full Changelog: https://github.com/MemoriLabs/Memori/compare/v3.3.4...v3.3.5
- v3.3.4Version 3.3.42026-05-20 · 2026-05-20 14:52 UTC
查看更新说明
What's Changed
- Revise README to open all Python SDK sections by default by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/479
- Revert Trendshift alt text on Memori readme by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/488
- Merged Python and TypeScript BYODB pages, updated AI models in examples by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/494
- Remove irrelevant providers from the Install your LLM Provider section by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/496
- feat: add pull request template for improved contribution guidelines by @devwdave in https://github.com/MemoriLabs/Memori/pull/498
- Improved the BYODB, Cloud docs and verified them against the Python and TypeScript SDK source code by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/500
- Fixed widen _request_headers return type by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/502
- test: add unit tests for recall formatting functions and format_date_created by @krishna28004 in https://github.com/MemoriLabs/Memori/pull/501
- fixed (LLM) : safely parse OpenAI multimodal arrays in query extraction by @krishna28004 in https://github.com/MemoriLabs/Memori/pull/505
- fix(skills): restrict recall filters to valid source/signal pairs by @lborro in https://github.com/MemoriLabs/Memori/pull/503
- Update Memori MCP documentation and configuration for improved tool u… by @devwdave in https://github.com/MemoriLabs/Memori/pull/506
- Adding compaction instructions by @gordeee in https://github.com/MemoriLabs/Memori/pull/512
- Compaction brief updates by @gordeee in https://github.com/MemoriLabs/Memori/pull/513
- Added compaction updates and consistency improvements by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/515
- feat(openclaw): add
memori_compactiontool for context restore by @rpkruse in https://github.com/MemoriLabs/Memori/pull/516 - Refactor error handling for Rust core retrieval in Memori by @devwdave in https://github.com/MemoriLabs/Memori/pull/517
- Update Memori MCP documentation for workflow and tool usage by @devwdave in https://github.com/MemoriLabs/Memori/pull/518
- Enhance npm publish workflow with dry run option and verification steps by @devwdave in https://github.com/MemoriLabs/Memori/pull/520
- Ts npm release by @devwdave in https://github.com/MemoriLabs/Memori/pull/522
- feat(llm): add LiteLLM as a supported client by @RheagalFire in https://github.com/MemoriLabs/Memori/pull/461
- bump version for release by @devwdave in https://github.com/MemoriLabs/Memori/pull/525
New Contributors
- @krishna28004 made their first contribution in https://github.com/MemoriLabs/Memori/pull/501
- @gordeee made their first contribution in https://github.com/MemoriLabs/Memori/pull/512
- @RheagalFire made their first contribution in https://github.com/MemoriLabs/Memori/pull/461
Full Changelog: https://github.com/MemoriLabs/Memori/compare/v3.3.3...v3.3.4
- v3.3.3Version 3.3.32026-05-05 · 2026-05-05 18:22 UTC
查看更新说明
What's Changed
- TS OC Changes for Cloud by @rpkruse in https://github.com/MemoriLabs/Memori/pull/450
- Fixed native rust build path for ts by @rpkruse in https://github.com/MemoriLabs/Memori/pull/451
- Enhance CI workflows for multi-platform Rust builds and Android support by @devwdave in https://github.com/MemoriLabs/Memori/pull/452
- Added Agent trace & execution under core concepts and TiDB in BYODB docs by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/457
- Update OC Quickstart and Overview md files by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/459
- docs: add project-scoped MCP attribution guidance by @CaioAugustobrg in https://github.com/MemoriLabs/Memori/pull/417
- Hermes int by @devwdave in https://github.com/MemoriLabs/Memori/pull/470
New Contributors
- @CaioAugustobrg made their first contribution in https://github.com/MemoriLabs/Memori/pull/417
Full Changelog: https://github.com/MemoriLabs/Memori/compare/v3.3.2...v3.3.3
- v3.3.2Version 3.3.22026-04-29 · 2026-04-29 15:59 UTC
查看更新说明
What's Changed
- Bump version to 3.3.2 by @devwdave in https://github.com/MemoriLabs/Memori/pull/443
- Feature/3.3.2 rust core opt out by @devwdave in https://github.com/MemoriLabs/Memori/pull/444
- Enhance Android support for Rust-backed Python extension by @devwdave in https://github.com/MemoriLabs/Memori/pull/445
- Ci required checks merge gate by @devwdave in https://github.com/MemoriLabs/Memori/pull/447
- Lazy rust core init by @devwdave in https://github.com/MemoriLabs/Memori/pull/448
- Added TiDB to BYODB docs by @jayyao18 in https://github.com/MemoriLabs/Memori/pull/446
Full Changelog: https://github.com/MemoriLabs/Memori/compare/v3.3.1...v3.3.2
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Getting Started
Installation
npm install @memorilabs/memori
pip install memori
Quickstart
Sign up at app.memorilabs.ai, get a Memori API key, and start building. Full docs: memorilabs.ai/docs/memori-cloud/.
Set MEMORI_API_KEY and your LLM API key (e.g. OPENAI_API_KEY), then:
import { OpenAI } from 'openai';
import { Memori } from '@memorilabs/memori';
// Requires MEMORI_API_KEY and OPENAI_API_KEY in your environment
const client = new OpenAI();
const mem = new Memori().llm
.register(client)
.attribution('user_123', 'support_agent');
async function main() {
await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'My favorite color is blue.' }],
});
// Conversations are persisted and recalled automatically in the background.
const response = await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: "What's my favorite color?" }],
});
// Memori recalls that your favorite color is blue.
}
from memori import Memori
from openai import OpenAI
# Requires MEMORI_API_KEY and OPENAI_API_KEY in your environment
client = OpenAI()
mem = Memori().llm.register(client)
mem.attribution(entity_id="user_123", process_id="support_agent")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "My favorite color is blue."}]
)
# Conversations are persisted and recalled automatically.
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "What's my favorite color?"}]
)
# Memori recalls that your favorite color is blue.
Explore the Memories
Use the Dashboard — Memories, Analytics, Playground, and API Keys.
[!TIP] Want to use your own database? Check out docs for Memori BYODB here: https://memorilabs.ai/docs/memori-byodb/. For disposable BYODB development databases, see the TiDB Zero provisioning guide: docs/memori-byodb/databases/tidb.mdx.
LoCoMo Benchmark
Memori was evaluated on the LoCoMo benchmark for long-conversation memory and achieved 87% overall accuracy while using an average of 721 tokens per query. That is just 2.8% of the full-context footprint, showing that structured memory can preserve reasoning quality without forcing large prompts into every request.
Compared with other retrieval-based memory systems, Memori outperformed Zep, LangMem, and Mem0 while reducing prompt size by roughly 67% vs. Zep and lowering context cost by more than 36x vs. full-context prompting.
Read the benchmark overview, see the results, or download the paper.

OpenClaw (Persistent Memory for Your Gateway)
By default, OpenClaw agents forget everything between sessions. The Memori plugin fixes that. It automatically captures structured memory from conversation and agent execution after each turn — including tool calls, decisions, and outcomes — and makes it available for agents to recall on demand.
No changes to your agent code or prompts are required. The plugin hooks into OpenClaw's lifecycle, so you get structured memory, agent-controlled recall, and Advanced Augmentation with a drop-in plugin.
openclaw plugins install @memorilabs/openclaw-memori
openclaw plugins enable openclaw-memori
openclaw memori init \
--api-key "YOUR_MEMORI_API_KEY" \
--entity-id "your-app-user-id" \
--project-id "my-project"
openclaw gateway restart
For setup and configuration, see the OpenClaw Quickstart. For architecture and lifecycle details, see the OpenClaw Overview.
Hermes Agent (Persistent Memory Provider)
Memori also ships as a Hermes Agent memory provider. It captures completed conversations in the background and gives Hermes explicit memori_recall and memori_recall_summary tools for agent-controlled recall.
pip install hermes-memori
hermes-memori install
hermes config set memory.provider memori
HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
mkdir -p "$HERMES_HOME"
echo "MEMORI_API_KEY=YOUR_MEMORI_API_KEY" >> "$HERMES_HOME/.env"
echo "MEMORI_ENTITY_ID=your-app-user-id" >> "$HERMES_HOME/.env"
MEMORI_PROJECT_ID is optional; when omitted, the provider uses Hermes' active project context for scoping.
For setup and configuration, see the Hermes Quickstart. For architecture and lifecycle details, see the Hermes Overview.
MCP (Connect Your Agent in One Command)
Your agent forgets everything between sessions. Memori fixes that. It remembers your stack, your conventions, and how you like things done so you stop repeating yourself.
Works for solo developers and teams. Your agent learns coding patterns, reviewer preferences, and project conventions over time. For teams, that means shared context that new engineers pick up on day one instead of absorbing tribal knowledge over months.
If you use Claude Code, Cursor, Codex, Warp, or Antigravity, you can connect Memori with no SDK integration needed:
claude mcp add --transport http memori https://api.memorilabs.ai/mcp/ \
--header "X-Memori-API-Key: ${MEMORI_API_KEY}" \
--header "X-Memori-Entity-Id: your_username" \
--header "X-Memori-Process-Id: claude-code"
For Cursor, Codex, Warp, and other clients, see the MCP client setup guide.
Attribution
To get the most out of Memori, you want to attribute your LLM interactions to an entity (think person, place or thing; like a user) and a process (think your agent, LLM interaction or program).
If you do not provide any attribution, Memori cannot make memories for you.
mem.attribution("12345", "my-ai-bot");
mem.attribution(entity_id="12345", process_id="my-ai-bot")
Session Management
Memori uses sessions to group your LLM interactions together. For example, if you have an agent that executes multiple steps you want those to be recorded in a single session.
By default, Memori handles setting the session for you but you can start a new session or override the session by executing the following:
mem.resetSession();
// or
mem.setSession(sessionId);
mem.new_session()
# or
mem.set_session(session_id)
Supported LLMs
- Anthropic
- Bedrock
- DeepSeek
- Gemini
- Grok (xAI)
- OpenAI (Chat Completions & Responses API)
(unstreamed, streamed, synchronous and asynchronous)
Supported Frameworks
- Agno
- LangChain
- Pydantic AI
Supported Platforms
- DeepSeek
- Nebius AI Studio
Examples
For more examples and demos, check out the Memori Cookbook.
Memori Advanced Augmentation
Memories are tracked at several different levels:
- entity: think person, place, or thing; like a user
- process: think your agent, LLM interaction or program
- session: the current interactions between the entity, process and the LLM
Memori's Advanced Augmentation enhances memories at each of these levels with:
- attributes
- events
- facts
- people
- preferences
- relationships
- rules
- skills
Memori knows who your user is, what tasks your agent handles and creates unparalleled context between the two. Augmentation occurs in the background incurring no latency.
By default, Memori Advanced Augmentation is available without an account but rate-limited. When you need increased limits, sign up for Memori Advanced Augmentation or use the Memori CLI:
# Install the CLI via pip to manage your account
python -m memori sign-up <email_address>
Memori Advanced Augmentation is always free for developers!
Once you've obtained an API key, set the following environment variable (used by both Python and TypeScript SDKs):
export MEMORI_API_KEY=[api_key]
The Memori CLI uses your exported environment first, then fills missing values from a .env file in the directory where you run the command.
Managing Your Quota
At any time, you can check your quota using the Memori CLI (works for both SDKs):
python -m memori quota
Or by checking your account at https://app.memorilabs.ai/. If you have reached your IP address quota, sign up and get an API key for increased limits.
If your API key exceeds its quota limits, we will email you and let you know.
Command Line Interface (CLI)
The Memori CLI is the unified tool for managing your account, keys, and quotas across all SDKs. To use it, execute the following from the command line:
# Requires Python installed
python -m memori
This will display a menu of the available options. For more information about what you can do with the Memori CLI, please reference Command Line Interface.
Contributing
We welcome contributions from the community! Please see our Contributing Guidelines for details on:
- Setting up your development environment
- Code style and standards
- Submitting pull requests
- Reporting issues
Support
Memori Enterprise
Memori Enterprise is built for any enterprise running production agents, particularly high-volume ones such as internal SDLC.
Recently, a major project management platform automating QA with AI agents faced severe inefficiency as its agents suffered from session amnesia, repeatedly burning excessive tool calls.
By integrating Memori's agent-native memory layer in a secure private VPC, the platform captured execution traces to stop redundant discoveries and improve run over run.
This deployment delivered:
- $2.1M/year reduction in token spend on just one QA automation workflow
- Material soft ROI including increases in accuracy, reduction in latency, and reduction in human in the loop review
Following this success, this enterprise has already identified four additional high-priority agentic workflows for Memori integration.
Please email us at [email protected] if you'd like a preview.
License
Apache 2.0 - see LICENSE

