Skip to main content
Glama

agentmem

为 Claude Code、Cursor 和 Codex 提供的共享内存,能够识别哪些信息依然有效。保存会话、捕获陈旧和冲突的规则,并防止智能体重复犯错。

PyPI Python License: MIT Tests

问题所在

你的 AI 编码助手在会话之间会遗忘一切。它会重复犯同样的错误。它无法区分当前规则和过时规则。上下文会被压缩,恢复过程非常痛苦。

大多数内存工具解决的是存储问题。而 agentmem 解决的是信任问题。

开始使用 (Claude Code / Cursor / Codex)

pip install quilmem[mcp]
agentmem init --tool claude --project myapp

就是这样。重启你的编辑器。你的智能体现在拥有了 13 个内存工具。运行 memory_health 进行确认。

仅限 Python? pip install quilmem 无需 MCP 扩展即可工作。请参阅下方的 Python API

60 秒演示

from agentmem import Memory

mem = Memory()

# Store typed memories
mem.add(type="bug", title="loudnorm undoes SFX levels",
        content="Never apply loudnorm to final mix. It re-normalizes everything.",
        status="validated")

mem.add(type="decision", title="Use per-line atempo",
        content="Bake speed into per-line TTS. No global pass.",
        status="active")

# Something you're not sure about yet
hypothesis = mem.add(type="decision", title="Maybe try 2-second gaps before CTA",
        content="Hypothesis from last session. Needs testing.",
        status="hypothesis")

# Search — validated and active memories rank highest.
# Deprecated and superseded memories are excluded automatically.
results = mem.search("audio mixing")

# Context-budgeted recall — fits the best memories into your token limit
context = mem.recall("building a narration track", max_tokens=2000)

# Lifecycle — promote what's proven, deprecate what's not
mem.promote(hypothesis.id)                # hypothesis -> active -> validated
mem.deprecate(hypothesis.id, reason="Disproven by data")

# Supersede: replace an outdated memory with a newer one
replacement = mem.add(type="decision", title="Use 1-second gaps before CTA",
        content="Confirmed by A/B test.", status="active")
mem.supersede(hypothesis.id, replacement.id)  # old points to replacement

# Health check — is your memory system trustworthy?
from agentmem import health_check
report = health_check(mem._conn)
# Health: 85/100 | Conflicts: 0 | Stale: 2 | Validated: 14

为什么与众不同

其他内存工具只是存储信息。 agentmem 知道哪些信息依然有效。

Mem0

Letta

Mengram

agentmem

内存存储

全文搜索

向量

智能体驱动

知识图谱

FTS5

内存生命周期状态

部分

假设 -> 活动 -> 已验证 -> 已弃用 -> 已取代

冲突检测

部分

内置

陈旧度检测

内置

健康评分

内置

来源跟踪

source_path + source_hash

信任排名召回

已验证 > 活动 > 假设

人类可读源文件

**

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - A tier

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Thezenmonster/agentmem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server