Skip to main content
Glama
ac0033

agent-memory

by ac0033

memory_session_end

End a session by archiving raw logs, distilling long-term memories, and clearing completed to-dos, with veto if work remains; use force to override.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
scopeYes
sourceNomcp
adapterNo
log_pathNo
session_idNo
conversation_jsonNo
Behavior5/5

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.

Conciseness4/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

Install Server

Other Tools

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/ac0033/agent-memory'

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