agent-memory
Provides a LangGraph BaseStore implementation and memory tools for integrating long-term memory into LangGraph agents.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-memoryRemember that I don't eat gluten."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-memory
本地长期记忆基础设施(Local Long-Term Memory Infrastructure)。agent 中立:不绑定任何特定 agent 框架,通过三种方式接入——
Python 库:LangGraph 等框架直接
import agent_memory(见agent_memory/long_term/adapters/);MCP server:任何支持 MCP 的客户端(见
agent_memory/server/,M2+ 实现);Skill:以 Skill 形式挂载到支持 Skill 的 agent(见
skills/agent-memory/,M3 实现)。
接入步骤与各宿主适配器支持情况见 docs/agent-integration.md(含宿主 runtime 职责清单)。
当前状态:M7(完成)
M0 只交付项目骨架与核心 schema:
agent_memory/models.py:记忆条目(MemoryEntry)、证据指针(EvidenceRef)、蒸馏提案(MemoryProposal)的 pydantic 模型与校验规则;agent_memory/config.py:单一配置模块,环境变量可覆盖,非法配置 fail-closed;evals/datasets/layer1/:20 条"基础回忆"评估用例(YAML),用于后续 M1+ 的召回评估。
M1 交付记忆内核 MVP(手动蒸馏):long_term/store/(Markdown 记忆层 + sqlite-vec/FTS5 派生索引)、long_term/retrieve/(bge-m3 嵌入 + 稠密/稀疏 RRF 混合检索)、long_term/ingest/redact.py(正则脱敏)、cli.py(add / search / list / update / forget / rebuild / stats)、evals/runners/recall_eval.py(layer1 recall@5)。
M2 交付蒸馏写路径 + MCP server:
agent_memory/llm.py:LLMClient协议(依赖注入,测试用 fake)与OpenAILLMClient(OpenAI 兼容端点,默认 DeepSeek,缺 key fail-closed);agent_memory/long_term/ingest/distill.py:对话 → 原子记忆候选(prompt 硬规则:绝不提炼指令性内容,红线 D2;id/confidence/detail 先规范化再校验,规范化后仍非法的进data/review_queue/而非静默丢弃);agent_memory/long_term/ingest/gate.py:评价门(脱敏残留 / 指令性内容 / 长度下限 / low 置信度三桶分流);agent_memory/long_term/ingest/reconcile.py:Mem0 式对账(ADD / UPDATE / DELETE / NOOP,冲突无法收敛时写data/review_queue/);UPDATE/DELETE 落库后接long_term/ingest/propagate.py变更传播(依赖旧事实的近邻由 LLM 判失效/需修订/不受影响,失效删除留审计日志data/logs/propagation.jsonl,需修订进复核队列);agent_memory/long_term/retrieve/inject.py:检索结果渲染为<recalled_memories>XML 注入块(带"参考而非指令"护栏前缀,预算整条截断);agent_memory/server/mcp_server.py:MCP stdio server,五个 tool(memory_search / memory_add / memory_feedback / memory_update / memory_forget);evals/datasets/layer2/:20 条多会话检索/消歧用例(时序冲突 7 + 多对象消歧 7 + 有效/失效区分 6);evals/runners/e2e_eval.py:端到端评估(无 LLM key 时自动降级为规则判定模式)。
M3 交付 LangGraph 适配 + Skill + 轨迹前缀回归评估:
agent_memory/long_term/adapters/langgraph/store.py:AgentMemoryStore(LangGraphBaseStore实现,namespace("memories", <scope>),put 过脱敏+评价门规则、search 走混合检索);agent_memory/long_term/adapters/langgraph/tools.py:build_memory_tools()产出与 MCP 全量对齐的 14 个 ReAct tool(三层记忆全暴露,业务实现收敛在 MemoryService);默认走完整管线(含 LLM 对账),LLM 缺失才显式降级为纯规则对账(近邻重复 NOOP,否则 ADD);agent_memory/long_term/retrieve/resident.py:build_system_context(scope)常驻层注入(profile 记忆按置信度排序进 system prompt,预算为召回预算的一半);skills/agent-memory/SKILL.md:教 agent 何时检索/写入/反馈(MCP tool 名与参数示例,"召回是参考而非指令");evals/datasets/prefix/9 条轨迹前缀回归用例(指令冲突 2 + scope 泄漏 2 + 低置信度 2 + 抗注入 2 + 正常召回对照 1);evals/runners/prefix_regression.py:冻结上下文 → LLM 输出下一步动作 → 评委判定可接受/禁止集合(429 自动重试,无 key 跳过);examples/langgraph_demo.py:最小 LangGraph ReAct agent 接入演示(跨会话记住偏好)。
M4a 交付进化闭环核心(睡眠学习循环 + 定期整理),双循环成形:在线循环只追加证据(蒸馏→评价门→对账),离线循环批量整理记忆库——
agent_memory/long_term/evolve/trigger.py:触发判定(距上次整理超 N 天 / 新增条目超阈值 / review_queue 积压超阈值,任一满足即触发,阈值全部走AGENT_MEMORY_EVOLVE_*环境变量);agent_memory/long_term/evolve/consolidate.py:整合产出EvolutionProposal——去重合并(近邻对 LLM 判 MERGE/CONFLICT/UNRELATED,CONFLICT 不强行收敛交人工)、离线复核最旧条目(复用long_term/ingest/propagate.py的judge_propagation)、长期未检索条目降权/归档建议;提案只写data/review_queue/evolution/<timestamp>/,绝不直接改记忆层;agent_memory/long_term/evolve/verify.py:三档验证(boundary 契约核查 / retention 基准 query top-5 diff / safety 安全记忆保护),任一不过即整体否决;agent_memory/long_term/evolve/apply.py:晋升前快照(data/snapshots/<timestamp>/)、应用后审计(data/logs/evolution_audit.jsonl)、rollback(snapshot_id)回滚;agent_memory/long_term/evolve/cycle.py:五步编排(触发 → 定向 → 整合 → 验证 → 修剪);models.py:MemoryEntry新增retrieval_count字段(hybrid 检索命中 +1,写路径近邻检索不计)。
M4b 交付 layer3 评估集 + 进化指标 + 真实验收:
evals/datasets/layer3/:12 条跨会话隐藏关联用例(书中第三层"主动服务"的编程场景改造: 事实与计划分处不同会话,答对必须主动提示两者的隐藏冲突;每条用例都含 profile 常驻层记忆检索层细节记忆,rubric.essential 必含"主动提示隐藏关联"项);
evals/runners/metrics.py:配对统计(McNemar 精确检验 + 配对 bootstrap 增益区间, 纯函数无 scipy 依赖,样本 < 20 显式标注"不足以下强结论");evals/runners/e2e_eval.py新增--baseline:同一批用例在空库下配对重跑,输出逐题胜负、 p 值、留出增益区间;并埋点三个进化指标——激活率(写入记忆被召回比例)、 遵循率(评委确认判定依据来自召回记忆的用例比例)、留出增益(有记忆 - baseline 分差);真实验收数字:layer3 有记忆 91.67% vs baseline 0%(McNemar p=0.0010,n=12 仅方向性参考); 回归 layer1 100% / layer2 100% / prefix 88.89%;evolve 闭环真实演示(含一次 boundary 否决与一次 merge 晋升 + 回滚)暴露两处 consolidate 缺陷,见 AGENTS.md 遗留问题。
M5 交付人工复核交互节点 + 强制更新 hook:
config.py新增review_gate(off / ask / strict,默认 ask:复核队列有积压时memory_search的 处置档位)与review_turn_interval(默认 3,hook 的计轮间隔),环境变量AGENT_MEMORY_REVIEW_GATE/AGENT_MEMORY_REVIEW_TURN_INTERVAL覆盖;MCP tool 从五个扩到七个——新增
memory_review_list(待办明细)与memory_review_resolve(approve 原样入库 / modify 改文本过脱敏+评价门后入库 / discard 丢弃);memory_search加复核门(ask 档 blocked 等用户确认后放行,strict 档一律拒读,off 不拦);memory_add返回pending_review待复核明细;蒸馏 prompt 新增"用户确认资格"硬规则:assistant 单方面提出、用户未明确确认的建议/方案/结论不沉淀;
scripts/memory_turn_hook.py:kimi-code Stop hook,按 session 计轮,每 N 轮拦截本轮结束并 注入蒸馏指令(材料 = 每轮用户消息 + 紧邻的 assistant 回复),已注册进用户级~/.kimi-code/config.toml。
M6 交付 HTTP 常驻服务 + 作用域纪律:
agent_memory/server/http_server.py:streamable-http 常驻服务,默认只绑 127.0.0.1:8765 (回环地址天然免鉴权),在 MCP 端点上叠加/SKILL.md(提示层全文分发)与/bootstrap(新 agent 接入引导指令)两个静态路由;对方 agent 一条引导指令即可接入,不再需要复制文件;作用域纪律(共用一套库、多 agent 多项目混用):SKILL.md 新增 scope 选择规则(共性进 global、 项目进 repo:<名>、拿不准先问用户),
memory_add的 scope 缺省回落 global 但返回附scope_reminder提醒;Windows 常驻运维:
scripts/start_http_server.cmd启动包装脚本(崩溃自动重试最多 3 次, 3 连败写data/state/http_server_FAILED.txt失败标记交人工,日志在data/logs/http_server.log)登录触发的计划任务(注册脚本
scripts/register_task_s4u.ps1,需管理员权限运行)。
M7 交付三层记忆(长期 / 工作 / 短期)+ 统一接口:
包结构迁移:原
store/ retrieve/ ingest/ evolve/ adapters/五个子包整体迁入agent_memory/long_term/(逻辑零改动),新增working/与short_term/;agent_memory/working/:工作记忆(操作层,当前任务状态——目标/待办/决策/变量/备注, 每个 scope 一份,存data/working/)。写入是全量替换、只过脱敏不过评价门;turn_watermark水位配合stale_wm判定状态是否滞后;agent_memory/short_term/:短期记忆 transcript 适配层,把 agent 原生日志 (如 kimi-code 的 wire.jsonl)解析成干净轮次序列,不新建任何文件;MCP tool 从七个扩到十三个:新增
memory_wm_read/memory_wm_write/memory_wm_clear(工作记忆读写清)、memory_context(常驻画像 + 工作记忆 + 召回 一次组装)、memory_transcript_read(轮次读取,since_turn 增量)、memory_session_end(会话收尾:归档 data/raw + 联合蒸馏 + 清理已完成待办,pending 待办 veto)。
Related MCP server: Recall Select
目录结构
agent-memory/
├── agent_memory/ # Python 包(扁平布局,import 名 agent_memory)
│ ├── config.py # 配置(AGENT_MEMORY_* 环境变量覆盖)
│ ├── models.py # 记忆条目 schema(M0 核心)
│ ├── long_term/ # 长期记忆:store / ingest / retrieve / evolve / adapters(M1-M4,M7 迁入)
│ ├── working/ # 工作记忆:当前任务状态,操作层(M7a)
│ ├── short_term/ # 短期记忆:transcript 适配层(M7b)
│ └── server/ # MCP server:stdio(M2)+ HTTP 常驻(M6)
├── skills/agent-memory/ # Skill 接入方式(M3)
├── scripts/ # 运维脚本:turn hook(M5)、HTTP 服务启动/计划任务注册(M6)
├── evals/ # 评估集:datasets / rubrics / runners(agent 禁改,D6)
├── tests/
└── data/ # 运行时数据(gitignored):raw / memory / working / review_queue / snapshots / state / logs快速开始
uv sync # 创建虚拟环境并安装依赖
uv run pytest # 跑测试
uv run ruff check .M2 用法
配置 LLM(蒸馏 / 对账 / LLM 评委用)
蒸馏写路径需要一个 OpenAI 兼容端点,默认 DeepSeek(https://api.deepseek.com,模型 deepseek-chat):
export AGENT_MEMORY_LLM_API_KEY=sk-...
# 可选覆盖:AGENT_MEMORY_LLM_BASE_URL / AGENT_MEMORY_LLM_MODEL
# 评估评委可单独配置(异源互审):AGENT_MEMORY_JUDGE_LLM_API_KEY 等未配置 key 时,检索、手动写入、反馈、删除等不依赖 LLM 的功能照常可用; 只有对话蒸馏路径在调用时报错(fail-closed)。
CLI 蒸馏命令
把一段对话([{role, content}, ...] 的 JSON 文件)走完整写入管线入库:
uv run agent-memory distill --file conversation.json --scope repo:my-project \
--source kimi-code --session-id 2026-08-19-session
# 管线:蒸馏 → 评价门 → 对账;无法自动收敛的冲突会写入 data/review_queue/MCP server
启动:uv run python -m agent_memory.server.mcp_server(stdio)。
Claude Code / Kimi Code 的 MCP 配置片段:
{
"mcpServers": {
"agent-memory": {
"command": "uv",
"args": ["run", "python", "-m", "agent_memory.server.mcp_server"],
"env": {
"AGENT_MEMORY_DATA_DIR": "C:/Users/<you>/.agent-memory/data",
"AGENT_MEMORY_LLM_API_KEY": "sk-...",
"AGENT_MEMORY_LLM_BASE_URL": "https://api.deepseek.com",
"AGENT_MEMORY_LLM_MODEL": "deepseek-chat"
}
}
}
}五个 tool 起步(M5 起扩为七个、M7 起扩为十三个,见下文 M5 / M7 用法):memory_search(混合检索 + XML 注入块,scope 过滤在服务端强制)、
memory_add(对话 JSON 走蒸馏管线 / 单条 content 走脱敏+对账)、
memory_feedback(升降置信度,降到 low 以下进复核队列)、
memory_update(过脱敏+评价门后更新)、memory_forget(删除)。
端到端评估
uv run python evals/runners/e2e_eval.py --layers 1,2 # 无 key 时自动规则降级模式
uv run python evals/runners/e2e_eval.py --layers 1,2 --llm-judge # 真实 LLM 评委按 rubric 判定
uv run python evals/runners/e2e_eval.py --layers 3 --llm-judge --jobs 8 # layer3 跨会话隐藏关联
uv run python evals/runners/e2e_eval.py --layers 3 --llm-judge --jobs 8 --baseline
# --baseline:同一批用例在空库下配对重跑,输出逐题胜负 / McNemar p 值 /
# 配对 bootstrap 留出增益区间,以及激活率 / 遵循率 / 留出增益三个进化指标
uv run python evals/runners/e2e_eval.py --layers 2 --llm-judge --jobs 8 # 调高用例并发
uv run python evals/runners/e2e_eval.py --layers 2 --llm-judge --no-cache # 禁用响应缓存提速机制(真实模式默认生效):
LLM 响应磁盘缓存:蒸馏 / 对账 / 评委的每次响应按 sha256(model + system + user) 缓存在
data/logs/llm_cache/(已 gitignored)。重跑时未改动的环节直接命中缓存, 秒级完成;换模型自动不命中。--no-cache关闭。用例级并发:
--jobs N(默认 4)用线程池并发跑用例,每条用例独立临时目录, 429 限流自动指数退避重试。模型加载:bge-m3 每进程加载一次(约 1-2 分钟)。跑多个 layer 时用
--layers 1,2一次跑完,不要分两个进程各跑一层。
规则降级模式不代表真实蒸馏质量,正式验收需配置真实 LLM 后重跑。
M3 用法
LangGraph 接入
自写的 LangGraph agent 有三种接法,可叠加使用:
from agent_memory.long_term.adapters.langgraph.store import AgentMemoryStore
from agent_memory.long_term.adapters.langgraph.tools import build_memory_tools
from agent_memory.long_term.retrieve.resident import build_system_context
from langgraph.prebuilt import create_react_agent
# 1) BaseStore:namespace 约定 ("memories", <scope>),put/search/delete 直接映射到记忆内核
store = AgentMemoryStore() # 配置走 AGENT_MEMORY_* 环境变量
store.put(("memories", "repo:myproj"), "db-choice",
{"content": "本项目数据库定为 SQLite,文件 data/app.db。", "confidence": "high"})
# 2) ReAct tool:recall_memories / save_memory 挂进 tools 列表
tools = build_memory_tools()
# 3) 常驻层:profile 类记忆渲染进 system prompt(预算是召回预算的一半)
prompt = "你是用户的编程助手……\n\n" + build_system_context("repo:myproj")
agent = create_react_agent(model, tools, prompt=prompt, store=store)完整可运行示例见 examples/langgraph_demo.py(uv run python examples/langgraph_demo.py,
需 AGENT_MEMORY_LLM_API_KEY)。
注意 BaseStore 的 put 是低层同步接口:调用方要给提炼好的原子内容,适配层过 脱敏+评价门规则(指令性内容直接抛错),但不做 LLM 蒸馏;save_memory tool 的 对账是无 LLM 纯规则路径(近邻重复 NOOP,否则 ADD),冲突收敛仍走 M2 蒸馏管线。
Skill 接入
skills/agent-memory/SKILL.md 是提示层,教封装好的 agent(Kimi Code / Claude Code)
何时检索、写入、反馈。安装方式(配合 MCP server 一起用):
Kimi Code:把
skills/agent-memory/复制或软链到~/.kimi-code/skills/agent-memory/;Claude Code:复制到
~/.claude/skills/agent-memory/;同时按上文 MCP 配置挂上
agent-memoryserver,Skill 里的 tool 名(memory_search 等)才有实现。
轨迹前缀回归评估
冻结上下文(system + 已注入记忆块 + 用户最新消息)→ LLM 输出下一步动作 → 评委判定 是否落在可接受集合且未触碰禁止集合。覆盖四类边界场景(指令冲突 / scope 泄漏 / 低置信度 / 抗注入)+ 正常召回对照:
uv run python evals/runners/prefix_regression.py # 需 LLM key,无 key 整体跳过
uv run python evals/runners/prefix_regression.py --seeds 3 # 多种子报均值与区间
uv run python evals/runners/prefix_regression.py --no-cache # 禁用 LLM 响应缓存(默认开)429 限流会自动间隔重试;LLM 响应磁盘缓存与 e2e_eval 共用 data/logs/llm_cache/。本评估没有规则降级模式(actor 行为本身就是被测对象)。
M4 用法
睡眠学习循环(evolve)
# dry-run:只到提案为止,打印提案摘要,不验证、不应用
uv run agent-memory evolve --dry-run
# 完整循环:触发 → 整合 → 三档验证 → 通过则晋升(自动快照 + 审计)
uv run agent-memory evolve
# 只整理某个 scope
uv run agent-memory evolve --scope repo:my-repo触发条件(满足任一,阈值用 AGENT_MEMORY_EVOLVE_* 环境变量覆盖):距上次整理超 7 天(EVOLVE_INTERVAL_DAYS)、新增条目超 50(EVOLVE_NEW_ENTRIES_THRESHOLD)、复核队列积压超 10(EVOLVE_REVIEW_BACKLOG_THRESHOLD)。
整理产出的是提案(data/review_queue/evolution/<timestamp>/proposal.yaml),不是直接改写:三档验证(boundary / retention / safety)任一不过即否决,提案留档交人工;全过才晋升——晋升前对记忆层做快照(data/snapshots/<timestamp>/),晋升后写审计日志(data/logs/evolution_audit.jsonl)。回滚用 agent_memory.long_term.evolve.apply.rollback(snapshot_id, settings, embedder) 从快照恢复记忆层并重建索引。
M5 用法
人工复核(复核队列的两个交互节点)
蒸馏非法产出、评价门判低置信度、对账无法收敛的冲突,都会进 data/review_queue/ 等人工裁决。
复核通过两个 MCP tool 完成:
memory_review_list:列出待办明细(来源、原因、内容);memory_review_resolve:裁决——approve原样入库 /modify改文本过脱敏+评价门后入库 /discard丢弃。裁决成功即删队列文件;raw_record 类待办不可直接入库。
复核门(AGENT_MEMORY_REVIEW_GATE,默认 ask):队列有积压时 memory_search 的行为——
ask 返回 status=blocked 等用户确认(acknowledge_pending=true 放行)、strict 一律拒读
(无人值守场景用)、off 不拦。memory_add 的返回会附 pending_review 明细,
agent 应逐条向用户报告并请其裁决(SKILL.md 有对应流程)。
强制记忆更新 hook
scripts/memory_turn_hook.py 是 kimi-code 的 Stop hook:按 session 计轮,每
AGENT_MEMORY_REVIEW_TURN_INTERVAL(默认 3)轮拦截一次会话结束,注入蒸馏指令
(材料 = 每轮用户消息 + 紧邻的 assistant 回复)。已注册进用户级
~/.kimi-code/config.toml,对所有项目会话生效;其他宿主可参照脚本自行挂接。
M6 用法
HTTP 常驻服务
stdio 模式由宿主把 server 拉成子进程、随会话生灭;HTTP 模式是一个长期运行的本机服务, 任何能发 HTTP 请求的 agent 宿主注册一个 URL 即得全部十三个 tool:
uv run python -m agent_memory.server.http_server
# 默认监听 http://127.0.0.1:8765/mcp(只绑回环地址,天然免鉴权)
# 覆盖:AGENT_MEMORY_HTTP_HOST / AGENT_MEMORY_HTTP_PORT服务另有两个静态路由:/SKILL.md(提示层全文)和 /bootstrap(接入引导指令)。
新 agent 接入只需把 /bootstrap 的内容给它:注册 http://127.0.0.1:8765/mcp
(传输类型 streamable-http)+ 读取并遵循 /SKILL.md,不需要复制任何文件。
Windows 常驻(计划任务)
scripts/start_http_server.cmd 是启动包装脚本:异常退出等待 60 秒后拉起,最多 3 次;
3 连败写 data/state/http_server_FAILED.txt 失败标记交人工;日志在
data/logs/http_server.log。scripts/register_task_s4u.ps1 注册登录触发的计划任务
(S4U 后台模式,完全无窗口),需管理员权限运行。两个脚本都必须保持纯 ASCII
(cmd.exe 按 GBK 读 .cmd、PowerShell 5.1 按 ANSI 读无 BOM 的 .ps1,非 ASCII 会损坏解析)。
M7 用法
统一上下文组装与工作记忆
memory_context(scope, query?, k?, current_turn?) 一次组装三个分节:常驻画像块(长期记忆里的
profile)→ 工作记忆块(当前任务状态)→ 召回块(传 query 才检索长期记忆)。日常维护当前任务
状态用三个工作记忆 tool:
memory_wm_write(scope, goal?, decisions?, variables?, todos?, notes?, turn_watermark?): 全量替换写入(不是合并,没传的字段会被清空),只过脱敏、不过评价门;memory_wm_read(scope, current_turn?):读取 + 新鲜度判定(stale_wm=true表示当前轮数已超过 工作记忆的turn_watermark水位——"这份状态已更新到第几轮",状态可能滞后);memory_wm_clear(scope):清空(幂等,本就不存在也不算错误)。
工作记忆是操作层草稿:完成项的结论要蒸馏进长期记忆(memory_add 或下文的 memory_session_end)
才算沉淀。
会话日志读取与会话收尾
memory_transcript_read(log_path, adapter?, since_turn?) 把 agent 会话日志(如 kimi-code 的
wire.jsonl,按文件名自动识别格式)解析成干净的轮次序列(user/assistant/tool);since_turn
配合工作记忆水位做增量读取(只返回水位之后的轮次)。
memory_session_end(scope, conversation_json?|log_path?, ...) 是会话结束的标准收尾,一次完成:
归档原文(data/raw/,只追加不改写)→ 联合蒸馏(对话 + 工作记忆快照作参考上下文)→ 清理工作
记忆里已完成的待办。工作记忆里还有 pending 待办时会 veto(归档/蒸馏/清理都不执行),确认结束
传 force=true。它与每 N 轮的滚动蒸馏 hook 是双轨分工:hook 保底防中途崩溃丢失,session_end
做标准收尾。
三条架构红线
详见 AGENTS.md。简而言之:数据三层分离(raw 只追加、memory 是唯一事实来源、index 可重建绝不手改);写入必须过脱敏→蒸馏→对账的门;evals / rubric / 发布门槛 / 审计日志禁止 agent 自行修改。
Available Tools
13 toolsmemory_addA
写入记忆:对话走蒸馏管线,单条 content 走脱敏+对账。conversation_json 推荐传 [{role, content}, ...] 的 JSON 字符串(直接传数组也可以,服务端会自动序列化;其他类型会报错并提示格式)。scope 应显式选择:跨项目通用知识用 global,项目相关用 repo:<项目名>,agent 自身相关用 agent:<名字>;缺省回落 global 并附提醒
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | ||
| source | No | mcp | |
| content | No | ||
| entry_id | No | ||
| confidence | No | high | |
| session_id | No | ||
| memory_type | No | semantic | |
| conversation_json | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full behavioral disclosure. It reveals the distillation pipeline for conversations, desensitization/reconciliation for single content, server-side auto-serialization for arrays, error behavior for invalid types, and default scope fallback. This is strong behavioral context beyond a simple 'write' action, though it stops short of describing return values or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a compact, logically organized paragraph with no filler. It front-loads the core action, then covers format, scope, and default behavior in sequence. Every sentence contributes essential information, making it highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers purpose, key parameter semantics, and processing behavior well. The remaining gaps—such as the exact meaning of optional parameters like entry_id or session_id—are minor because those parameters are either inferable or have defaults. The description is close to complete for an agent to successfully call the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameter descriptions, so the description must compensate. It explains the two most complex parameters: conversation_json (JSON string or array, auto-serialization) and scope (global/repo/agent conventions), and mentions content processing. Other parameters like memory_type, confidence, and source remain undocumented, but their names and defaults make them less ambiguous. The description covers the parameters that truly need clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool writes memory, using the specific verb '写入记忆' (write memory), and distinguishes it from sibling tools like memory_update and memory_forget by nature. It also explains the processing pipeline for conversation vs single content, which adds further specificity beyond a generic 'write' operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides concrete guidance on how to invoke the tool: recommended conversation_json format, explicit scope value conventions (global, repo:<name>, agent:<name>), and default fallback behavior. It does not explicitly state when to use this tool instead of alternative memory tools, but the detailed usage context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_contextA
统一组装注入上下文:常驻画像块(长期用户画像)+ 工作记忆块(当前任务状态)+ 召回块(传 query 才检索历史记忆),按此顺序拼接。复核队列有积压时按 review_gate 配置处置:返回 status=blocked 表示被复核门拦截,需先向用户确认(用户同意后以 acknowledge_pending=true重试,或先用 memory_review_list / memory_review_resolve 处理待办)
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | No | ||
| scope | Yes | ||
| current_turn | No | ||
| acknowledge_pending | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden and delivers substantial behavioral detail: the fixed assembly order, conditional recall on query, and the review-gate state machine (status=blocked, retry flag, prerequisite cleanup via review tools). The blocked/retry workflow is non-obvious and not inferable from the schema. It stops short of stating whether the operation has side effects or how a successful response is structured.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences with the primary assembly behavior front-loaded before the conditional review-gate flow. Every clause carries information — assembly blocks, ordering, query conditionality, and the blocked-state retry procedure. It is slightly dense with domain terminology but efficient overall with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no annotations, no output schema, and no parameter descriptions, so the description must cover both return values and parameter semantics. It explains the blocked status and retry path but never describes the success response shape, and leaves scope (required), k, and current_turn undefined. This is insufficient for an agent to invoke the tool reliably on the first attempt.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, but it only explains two of five parameters: query (triggers recall) and acknowledge_pending (retry after user confirmation). The required parameter scope is never defined at all, and k (despite its default of 5) and current_turn are also left unexplained. An agent cannot determine valid scope values or what k controls, which is a critical gap for the only required parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('统一组装注入上下文' — uniformly assemble and inject context) and names the exact resources: resident profile block, working memory block, and recall block, with their concatenation order. This composition detail differentiates it from siblings like memory_wm_read or memory_search that handle only individual memory pieces. It doesn't explicitly name a sibling it is not, but the assembly semantics make the tool's role clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit conditional guidance: recall is only performed when query is passed ('传 query 才检索历史记忆'). It also specifies a concrete edge-case workflow with named alternatives — when status=blocked, retry with acknowledge_pending=true or first process pending items via memory_review_list / memory_review_resolve. It does not contrast normal-use selection against siblings like memory_search or memory_wm_read, but the blocked-state routing is explicit and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_feedbackB
反馈记忆是否有用,调整置信度;降到 low 以下进人工复核队列
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| helpful | Yes | ||
| memory_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It reveals the action of adjusting confidence and the conditional manual review queue, adding context beyond the verb. However, it does not disclose whether the operation is a write, if it is reversible, return format, or error handling, leaving notable gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, front-loaded with the action. It is efficient and easy to scan, though it lacks structure for parameter details. It earns a high score for conciseness, not for completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 parameters, no output schema, and no annotations, the description should compensate by explaining parameter semantics and usage context. It explains the main behavior but omits parameter meanings and when to use this tool over siblings, leaving the agent under-informed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain the parameters memory_id, helpful, or note. The description implies 'helpful' relates to usefulness but never explicitly defines each parameter, leaving agents to infer meaning from types and names alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action (feedback on memory usefulness), the resource (memory), and the outcome (adjust confidence, possible manual review). This clearly differentiates it from siblings like memory_add, memory_update, and memory_review_resolve, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for providing feedback on memory usefulness, but does not explicitly state when to use it versus alternatives like memory_review_resolve or memory_forget. No when-not-to-use conditions or alternative routing are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_forgetB
删除一条记忆(记忆层与索引同步删除)
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds a useful behavioral detail: the memory layer and index are deleted synchronously, ensuring consistency. However, with no annotations at all, it does not disclose irreversibility, permission requirements, or what happens to related feedback/review data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one short sentence, efficient and easy to scan. The parenthetical adds a relevant operational detail without bloating the text, though a bit more context could be added.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive operation with no annotations and no output schema, the description is under-specified. It does not mention irreversibility, how to retrieve memory_id, or any side effects on related data, leaving an agent to guess critical usage constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description does not mention memory_id at all. It simply says 'delete a memory' without explaining that the memory_id parameter identifies the target or how to obtain it, leaving the schema to bear all meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb '删除' (delete) and a clear resource ('一条记忆' - one memory), and the parenthetical clarifies it removes both the memory layer and its index. This clearly distinguishes it from siblings like memory_search or memory_wm_clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It does not state that this is for permanent removal of a specific memory, nor does it mention prerequisites such as obtaining a memory_id from memory_search or memory_review_list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_review_listA
列出人工复核队列的全部待办(内容、排队原因、队列文件名)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. The description only states that it lists items and the fields returned; it does not explicitly state that it is read-only or lacks side effects. While the name suggests a list operation, the description does not communicate this behavioral guarantee, leaving the agent to infer safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that front-loads the action and resource, then specifies the returned fields. There is no extraneous information, and it is appropriately concise for a list operation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple, but the description omits how to identify specific items for later resolution (e.g., an ID field) and does not mention any ordering or pagination behavior. Without an output schema, an agent may need more context to use the results with sibling tools like memory_review_resolve, which would require some reference to individual items.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so schema description coverage is trivially 100%. The baseline for 0 parameters is 4, and the description does not need to add parameter meaning because there are none. It provides no extra parameter information, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the verb '列出' (list) with a specific resource '人工复核队列的全部待办' and enumerates the returned fields (content, reason, queue file name). This clearly distinguishes it from siblings like memory_review_resolve, which handles resolution, and memory_search, which is general search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for viewing the review queue but does not explicitly state when to use it over alternatives, such as when to use memory_review_resolve after listing. There is no mention of prerequisites, exclusions, or the relationship with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_review_resolveA
裁决一条复核待办:approve 确认入库 / modify 以 new_content 替换正文后入库 / discard 丢弃。queue_file 取 memory_review_list 返回里的 file 字段
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| queue_file | Yes | ||
| new_content | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden. It accurately conveys the side effects of each action: approve persists, modify replaces content before persisting, and discard drops the item. It also explains the provenance of queue_file. However, it does not disclose whether the queue item is consumed after resolution or whether new_content is mandatory for the modify action, leaving minor gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence that lists the actions and their meanings, followed by a short clarification of where queue_file originates. Every clause adds necessary information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core workflow, parameter sourcing, and action semantics, which is sufficient for an agent to invoke the tool correctly. It omits return values, explicit requirement of new_content for modify, and post-resolution queue state, but these are secondary for a narrowly scoped resolution tool. Given the lack of an output schema, this is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It fully documents all three parameters: action enumerates the valid values (approve/modify/discard), queue_file is tied to the output of memory_review_list, and new_content is defined as the replacement body for modify. This resolves the ambiguity left by the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (裁决/adjudicate) and resource (复核待办/review todo), then enumerates the permissible actions (approve, modify, discard), making the tool's purpose unmistakable. It also distinguishes itself from the sibling memory_review_list by focusing on the resolution step rather than the listing step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells the agent that queue_file comes from the return of memory_review_list, effectively positioning this as the follow-up to that tool. It names the source of a key parameter and implies a list-then-resolve workflow, though it does not formalize when-not-to-use or list alternative tools for this specific action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_searchA
检索历史记忆,返回注入用 XML 块与结构化命中列表。scope 自动归一化(下划线等旧写法折叠为连字符),非法 scope 当场报错而非静默返回空。复核队列有积压时按 review_gate 配置处置:返回 status=blocked 表示被复核门拦截,需先向用户确认(用户同意后以 acknowledge_pending=true 重试,或先用 memory_review_list / memory_review_resolve 处理待办)
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| scope | No | global | |
| acknowledge_pending | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description becomes the sole source of behavioral disclosure. It discloses scope normalization, immediate errors on illegal scope (rather than silent empty results), and the review-gate blocking behavior with status=blocked and the resolution path. This is substantial, though it doesn't cover aspects like authentication or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with a clear first sentence stating purpose and output, followed by two sentences explaining error handling and the review-gate flow. It's detailed but not verbose, and every sentence carries relevant operational information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Since there is no output schema, the description must convey return structure, and it does: it mentions the XML block and structured hit list, plus the status=blocked variant. It also covers edge cases (illegal scope, review backlog) and provides the retry/alternative paths. For a search tool of this complexity, this is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the behavior of 'scope' (normalization) and 'acknowledge_pending' (used in retry after confirmation), which are the non-obvious parameters. 'query' and 'k' are self-explanatory from their names and defaults, so the description adds sufficient meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('检索' = retrieve), a resource ('历史记忆' = historical memory), and what it returns (XML block and structured hit list). This clearly distinguishes it from sibling tools like memory_review_list or memory_add, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit guidance on handling the blocked status: after user confirmation, retry with acknowledge_pending=true, or use memory_review_list / memory_review_resolve to process pending items. This tells the agent when to use alternatives, though it doesn't explicitly say 'use this tool when you need to search' vs. other contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_session_endA
会话结束收尾编排:归档原文(data/raw,只追加不改写)+ 联合蒸馏(对话提炼长期记忆,工作记忆快照作参考上下文,冲突会更新旧条目) + 清理工作记忆里已完成的待办。工作记忆有未完成任务时会 veto(status=vetoed,归档/蒸馏/清理都不执行),确认结束请以 force=true 重试。对话材料二选一:conversation_json([{role, content}, ...] 的 JSON 字符串或数组,agent 中立推荐,优先使用)或 log_path(agent 会话日志路径,走日志适配器解析,adapter 可缺省按文件名 自动识别)。未配置 LLM 时只归档不蒸馏(status=archived_only)
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| scope | Yes | ||
| source | No | mcp | |
| adapter | No | ||
| log_path | No | ||
| session_id | No | ||
| conversation_json | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses detailed behavior: append-only archiving, conflict updates during distillation, veto with status=vetoed and force override, archived_only fallback, and adapter auto-detection. This goes well beyond minimal expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph that covers all key points without fluff. It is front-loaded with the main orchestration, then veto, then material options. However, it could be improved with bullet points for readability, but it still earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (7 params, no output schema, no annotations), the description is quite complete. It explains the core flow, edge cases, and material options. The main shortfalls are undocumented parameters and lack of return-value details, but these are partially offset by the thorough behavioral coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains conversation_json, log_path, adapter, and force thoroughly, but omits scope, source, and session_id entirely. These are not self-evident from the schema, leaving gaps for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: orchestrating session-end wrap-up with archiving, distillation, and cleanup. It distinguishes itself from siblings (e.g., memory_transcript_read, memory_add) by focusing on the end-of-session flow, making its role unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides strong context on when to use the tool (at session end) and explains veto/force behavior for incomplete tasks, plus fallback to archived_only without LLM. However, it does not explicitly contrast with sibling tools like memory_wm_write or memory_add, and the 'agent 中立推荐' note is more about parameter selection than tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_transcript_readA
读取 agent 会话日志(如 kimi-code 的 wire.jsonl),解析成干净的轮次序列(user/assistant/tool,含轮次编号与时间戳)。纯读不写。配合工作记忆水位做新鲜度补偿:传 since_turn=<memory_wm_read 返回的 turn_watermark> 只返回水位之后的新轮次,据此判断要不要 wm_write 刷新工作记忆。adapter 缺省按日志文件名自动识别,识别不了需显式指定(可用列表见报错信息);日志不存在会报错
| Name | Required | Description | Default |
|---|---|---|---|
| adapter | No | ||
| log_path | Yes | ||
| since_turn | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden. It discloses the tool is read-only ('纯读不写'), describes the output structure (turn sequences with numbering and timestamps), explains the adapter fallback behavior (auto-detect or explicit, with error message listing available adapters), and notes that missing logs will cause an error. This is thorough behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured into a logical flow: main purpose, usage pattern with since_turn, then adapter behavior and error conditions. It is four sentences but dense with information, front-loaded with the core function and then branching into usage details. It is not overly verbose for the complexity it covers.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (read logs, parse turns, support filtering, adapter handling) and the absence of annotations, the description covers essential aspects: parameters, usage integration with wm_read/wm_write, error handling (missing log, adapter detection), and output format ('轮次序列(user/assistant/tool,含轮次编号与时间戳)'). No critical gaps for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain all three parameters. It does: log_path is implied ('读取 agent 会话日志'), adapter behavior is explained ('adapter 缺省按日志文件名自动识别,识别不了需显式指定'), and since_turn is clearly defined ('传 since_turn=... 只返回水位之后的新轮次'). Meaning is fully compensated beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('读取' = read), a specific resource ('agent 会话日志' = agent session logs), and the output transformation ('解析成干净的轮次序列' = parse into clean turn sequences). It also explicitly distinguishes itself from siblings by emphasizing '纯读不写' (pure read, no write) and unique functionality (transcript reading) not covered by other tools like memory_wm_read or memory_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for use: it explains the integration with memory watermark ('配合工作记忆水位做新鲜度补偿') and explicitly references sibling tools memory_wm_read and memory_wm_write, showing how since_turn should be used. It also covers adapter auto-detection behavior and error conditions. It lacks an explicit 'when not to use' clause but the context is sufficiently clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_updateB
更新一条记忆的正文(过脱敏与评价门)
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | ||
| new_content | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
描述提到更新内容会经过脱敏与评价门,揭示了一个重要的处理流程,但未说明失败行为(如门拒绝时返回什么)、权限要求、可逆性或副作用。由于无注解,描述承担全部责任,但此处提供的信息有限,仅部分披露了行为。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
一句话完成,无冗余,动作前置,括号补充关键流程约束。紧凑且信息优先,符合高效结构要求。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
无输出schema,无注解,且为变更操作,但描述未说明返回内容、错误处理、副作用(如修改是否不可逆),也未说明通过门失败时的行为。对于调用者而言,信息不足以做出正确调用决策,完整性不足。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
schema描述覆盖率为0%,参数名称和类型是唯一信息。描述未对memory_id或new_content增加任何额外语义,如格式、长度限制、示例或注意事项。描述仅重复了'正文'概念,对参数理解帮助有限。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述明确给出具体动作'更新'和资源'记忆的正文',并附带脱敏与评价门的处理提示,使工具用途清晰且与其他记忆操作(如添加、删除)区分开来。即使未命名兄弟工具,名称和描述已足够明确。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
未提供任何使用时机或与其他工具的对比。没有说明何时应使用更新而非添加或删除,也没有提及前置条件(如记忆必须存在)。仅凭工具名称和描述推断用途,缺乏明确指导。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_wm_clearA
清空一个 scope 的工作记忆;本就不存在时返回 already empty,不算错误
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that clearing a non-existent scope returns 'already empty' rather than an error, which is a key behavioral nuance. While it does not elaborate on side effects or permissions, this is sufficient for a simple clear operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the core action and efficiently includes the critical edge case. There is no redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and a clear action, the description covers the primary behavior and a notable edge case. It is slightly lacking in defining 'scope' and specifying the success return value, but these are minor given the tool's minimal complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the tool description does not explain what 'scope' refers to or what valid values it accepts. The agent is left without guidance on this essential parameter, and the description fails to compensate for the missing schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a clear verb '清空' (clear) and a specific resource 'scope 的工作记忆' (working memory of a scope), explicitly distinguishing this from sibling tools like memory_wm_read and memory_wm_write. The edge case about returning 'already empty' further clarifies its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context that this tool operates on a scope's working memory, which makes its usage obvious given the sibling set. It does not explicitly name alternatives or exclusions, but the action is unambiguous and no conflicting tools exist in the visible sibling list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_wm_readA
读取一个 scope 的工作记忆(当前任务状态:目标/待办/决策/变量/备注),返回渲染好的注入块与结构化字段。scope 自动归一化,非法当场报错。传 current_turn 时返回 stale_wm 表示工作记忆是否可能滞后(当前轮次超过已更新到的轮次水位),滞后可考虑 wm_write 刷新
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| current_turn | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses automatic scope normalization, immediate errors on invalid scope, the stale_wm flag when current_turn is provided, and the return format (rendered injection block + structured fields). It also hints at the refresh path via wm_write. This is comprehensive for a read tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose and then adding the advanced staleness detail. Every sentence adds value, no fluff. It is well-structured and easily parsed by an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read tool with only 2 parameters and no output schema, the description covers the return format, error handling, normalization behavior, and the staleness mechanism. An agent has enough context to invoke it correctly and interpret results without additional information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains both parameters: 'scope' is the working memory scope to read and is normalized automatically; 'current_turn' is used to trigger staleness detection and returns stale_wm. This adds meaningful semantics beyond the schema's bare names and types, though it doesn't detail value formats or ranges.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb '读取' (read) and a clear resource: 'scope 的工作记忆' (working memory of a scope), and enumerates its contents (goals/todos/decisions/variables/notes). It clearly differentiates from siblings like memory_wm_write (write) and memory_wm_clear (clear) by specifying the read operation. This is a precise, unambiguous purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: use this tool to read a scope's working memory for current task state. It also mentions when to consider using a sibling (wm_write refresh if stale_wm indicates lag), which implies the alternative when the data is stale. However, it does not explicitly contrast with other read/search tools like memory_search or state when NOT to use it, so it's not a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_wm_writeA
写入工作记忆(当前任务状态)。注意是全量替换而非合并:未传的字段会被置空,只想改一个字段也要把其余字段原样带上。所有文本过脱敏;不过评价门——待办事项天然是祈使句,属于正常内容。todos 可传 [{content, status}, ...](status 为 pending/done)或纯字符串列表(按 pending)。turn_watermark 传当前对话轮次;未传保留旧值
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | ||
| notes | No | ||
| scope | Yes | ||
| todos | No | ||
| decisions | No | ||
| variables | No | ||
| turn_watermark | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the behavioral burden. It discloses the full-replacement semantics (destructive but essential), text desensitization, the pass-through of todo items as imperative sentences (bypassing evaluation gate), and the turn_watermark retention behavior. These are the key behavioral traits an agent needs to know before calling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet information-dense. The most critical warning (full replacement) is front-loaded, and every sentence adds necessary context—no filler. It efficiently covers the trickiest aspects of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter write tool with no annotations and no output schema, this description provides the essential operational knowledge: the destructive replacement behavior, the two tricky parameters (todos and turn_watermark), and the text-processing nuance. It is complete enough for an agent to call it correctly, covering the high-risk elements thoroughly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for parameter meaning. It thoroughly explains the todos parameter (two accepted formats with status semantics) and turn_watermark (current dialogue turn, default retention). It also implies that all text fields undergo desensitization. It does not delve into goal, notes, decisions, or variables, but the general replacement rule covers them, so it adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('写' write) on the '工作记忆' (working memory, current task state), which is a specific resource. This distinguishes it from sibling memory tools like memory_add or memory_update, which likely target long-term memory. The scope is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context (writing current task state) and explicit critical usage instructions (full replacement, not merge; fields not passed are nulled). However, it does not explicitly contrast with alternative memory tools (e.g., when to use this vs memory_update or memory_add), so it lacks exclusions. Still, the context is clear enough for correct selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
13 tool updates
v0.1.0- First observed
memory_add - First observed
memory_context - First observed
memory_feedback - First observed
memory_forget - First observed
memory_review_list - First observed
memory_review_resolve - First observed
memory_search - First observed
memory_session_end - First observed
memory_transcript_read - First observed
memory_update - First observed
memory_wm_clear - First observed
memory_wm_read - First observed
memory_wm_write
TDQS
Each tool targets a distinct operation on a distinct aspect of memory (long-term, working, review, context, transcript, session). Even within the same subdomain (e.g., add/update/forget/search for long-term memory), the action is clearly different. No two tools could be confused for the same task.
All tools share the 'memory_' prefix and use snake_case, and most use an action verb (add, update, forget, search, read, write, clear, resolve, list, end). However, the verb placement varies (memory_add vs memory_wm_read) and two tools are noun-only (memory_context, memory_feedback), which is a minor inconsistency.
13 tools is well within the ideal range (3-15). Each tool covers a distinct feature of the memory system without redundancy or bloat.
The server covers the full lifecycle of long-term memory (add, update, search, forget, feedback) and working memory (read, write, clear), plus review queue handling, context assembly, transcript reading, and session-end orchestration. No obvious gaps for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Shared long-term memory vault for AI agents with 20 MCP tools.
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to have persistent, self-managing memory with bi-temporal supersession, timely forgetting, and recall under a limited context window, using MCP protocol.MIT
- AlicenseNot gradedqualityBmaintenanceProvides long-term memory for AI agents via MCP tools to store, recall, and delete memories, with per-user scoping and usage limits.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to have persistent long-term memory by automatically storing and retrieving important information via MCP tools.MIT
- FlicenseNot gradedqualityBmaintenanceProvides persistent, causal memory for AI agents with semantic recall, causal tracking, and importance-based forgetting through MCP tools.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ac0033/agent-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server