Skip to main content
Glama
ac0033

agent-memory

by ac0033

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AGENT_MEMORY_DATA_DIRNoDirectory where the server stores runtime data (raw, memory, working, etc.)
AGENT_MEMORY_HTTP_HOSTNoHost for the HTTP server. Default is 127.0.0.1.127.0.0.1
AGENT_MEMORY_HTTP_PORTNoPort for the HTTP server. Default is 8765.8765
AGENT_MEMORY_LLM_MODELNoModel name for the LLM. Default is deepseek-chat.deepseek-chat
AGENT_MEMORY_LLM_API_KEYNoAPI key for the LLM used for distillation and reconciliation. Required for dialogue distillation; other features work without it.
AGENT_MEMORY_REVIEW_GATENoControls the review gate behavior when there are pending review items: 'off' (no block), 'ask' (default, block and ask for confirmation), 'strict' (always refuse reads).ask
AGENT_MEMORY_LLM_BASE_URLNoBase URL for the OpenAI-compatible LLM endpoint. Default is https://api.deepseek.com.https://api.deepseek.com

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
memory_searchA

检索历史记忆,返回注入用 XML 块与结构化命中列表。scope 自动归一化(下划线等旧写法折叠为连字符),非法 scope 当场报错而非静默返回空。复核队列有积压时按 review_gate 配置处置:返回 status=blocked 表示被复核门拦截,需先向用户确认(用户同意后以 acknowledge_pending=true 重试,或先用 memory_review_list / memory_review_resolve 处理待办)

memory_addA

写入记忆:对话走蒸馏管线,单条 content 走脱敏+对账。conversation_json 推荐传 [{role, content}, ...] 的 JSON 字符串(直接传数组也可以,服务端会自动序列化;其他类型会报错并提示格式)。scope 应显式选择:跨项目通用知识用 global,项目相关用 repo:<项目名>,agent 自身相关用 agent:<名字>;缺省回落 global 并附提醒

memory_feedbackB

反馈记忆是否有用,调整置信度;降到 low 以下进人工复核队列

memory_updateB

更新一条记忆的正文(过脱敏与评价门)

memory_forgetB

删除一条记忆(记忆层与索引同步删除)

memory_review_listA

列出人工复核队列的全部待办(内容、排队原因、队列文件名)

memory_review_resolveA

裁决一条复核待办:approve 确认入库 / modify 以 new_content 替换正文后入库 / discard 丢弃。queue_file 取 memory_review_list 返回里的 file 字段

memory_wm_readA

读取一个 scope 的工作记忆(当前任务状态:目标/待办/决策/变量/备注),返回渲染好的注入块与结构化字段。scope 自动归一化,非法当场报错。传 current_turn 时返回 stale_wm 表示工作记忆是否可能滞后(当前轮次超过已更新到的轮次水位),滞后可考虑 wm_write 刷新

memory_wm_writeA

写入工作记忆(当前任务状态)。注意是全量替换而非合并:未传的字段会被置空,只想改一个字段也要把其余字段原样带上。所有文本过脱敏;不过评价门——待办事项天然是祈使句,属于正常内容。todos 可传 [{content, status}, ...](status 为 pending/done)或纯字符串列表(按 pending)。turn_watermark 传当前对话轮次;未传保留旧值

memory_wm_clearA

清空一个 scope 的工作记忆;本就不存在时返回 already empty,不算错误

memory_contextA

统一组装注入上下文:常驻画像块(长期用户画像)+ 工作记忆块(当前任务状态)+ 召回块(传 query 才检索历史记忆),按此顺序拼接。复核队列有积压时按 review_gate 配置处置:返回 status=blocked 表示被复核门拦截,需先向用户确认(用户同意后以 acknowledge_pending=true重试,或先用 memory_review_list / memory_review_resolve 处理待办)

memory_transcript_readA

读取 agent 会话日志(如 kimi-code 的 wire.jsonl),解析成干净的轮次序列(user/assistant/tool,含轮次编号与时间戳)。纯读不写。配合工作记忆水位做新鲜度补偿:传 since_turn=<memory_wm_read 返回的 turn_watermark> 只返回水位之后的新轮次,据此判断要不要 wm_write 刷新工作记忆。adapter 缺省按日志文件名自动识别,识别不了需显式指定(可用列表见报错信息);日志不存在会报错

memory_session_endA

会话结束收尾编排:归档原文(data/raw,只追加不改写)+ 联合蒸馏(对话提炼长期记忆,工作记忆快照作参考上下文,冲突会更新旧条目) + 清理工作记忆里已完成的待办。工作记忆有未完成任务时会 veto(status=vetoed,归档/蒸馏/清理都不执行),确认结束请以 force=true 重试。对话材料二选一:conversation_json([{role, content}, ...] 的 JSON 字符串或数组,agent 中立推荐,优先使用)或 log_path(agent 会话日志路径,走日志适配器解析,adapter 可缺省按文件名 自动识别)。未配置 LLM 时只归档不蒸馏(status=archived_only)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 13 tools

Disambiguation5/5

Each tool maps to a distinct resource and action: long-term memory CRUD, working memory read/write/clear, review queue list/resolve, unified context assembly, transcript reading, and session-end orchestration. Even memory_context is clearly an orchestration layer over memory_search and memory_wm_read, not a competing implementation. The only mild overlap is transcript_read versus session_end log parsing, but one is read-only and the other is a write pipeline.

Naming Consistency4/5

All tools share the memory_ prefix and snake_case, but the pattern varies slightly: base operations use verb-only suffixes like memory_search and memory_add, while subarea operations use noun_verb suffixes like memory_wm_read and memory_review_resolve. memory_context and memory_feedback are noun-oriented rather than strict verb_noun. Overall the convention is still predictable and readable.

Tool Count5/5

13 tools is well-scoped for a memory server covering long-term memory, working memory, review queue, context assembly, transcript access, and session-end orchestration. Each tool has a distinct lifecycle purpose, and none feels redundant or missing as a surface-level feature.

Completeness5/5

The surface covers full CRUD for long-term memories, working-memory read/write/clear, review workflow, context assembly, and session-end archival/distillation. The review-gate blocked/acknowledge and session-end veto/force flows prevent dead ends. The only arguable gap is dedicated profile management, but profiles are exposed through memory_context and updatable via memory_add/memory_update.

Maintenance

ActivityMaintained
ResponsivenessNo issues