memos-memory-guide
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemOS Local Memory — Agent Guide
MemOS Local Memory — Agent指南
This skill describes how to use the MemOS memory tools so you can reliably search and use the user's long-term conversation history, share knowledge across agents, and discover public skills.
本技能介绍了如何使用MemOS内存工具,让你能够可靠地搜索和调用用户的长期对话历史、在Agent之间共享知识,以及发现公共技能。
How memory is provided each turn
每轮对话的内存提供方式
- Automatic recall (hook): At the start of each turn, the system runs a memory search using the user's current message and injects relevant past memories into your context. You do not need to call any tool for that.
- When that is not enough: If the user's message is very long, vague, or the automatic search returns no memories, you should generate your own short, focused query and call yourself.
memory_search - Memory isolation: Each agent can only see its own memories and memories marked as . Other agents' private memories are invisible to you.
public
- 自动召回(hook):在每轮对话开始时,系统会根据用户当前消息运行内存搜索,并将相关的过往内存注入到你的上下文当中。你无需调用任何工具即可获取这些内容。
- 当自动召回不足以满足需求时:如果用户的消息过长、表述模糊,或者自动搜索未返回任何内存结果,你应当自行生成简短、聚焦的查询语句并主动调用。
memory_search - 内存隔离机制:每个Agent只能查看自身的内存以及标记为的公共内存。其他Agent的私有内存对你不可见。
public
Tools — what they do and when to call
工具说明——功能与调用时机
memory_search
memory_search
- What it does: Searches the user's stored conversation memory by a natural-language query. Returns a list of relevant excerpts with and optionally
chunkId. Only returns memories belonging to the current agent or marked as public.task_id - When to call:
- The automatic recall did not run or returned nothing.
- The user's query is long or unclear — generate a short query yourself and call .
memory_search(query="...") - You need to search with a different angle (e.g. filter by ).
role='user'
- Parameters: (required), optional
query,minScore.role
- 功能:通过自然语言查询搜索用户存储的对话内存,返回包含(可选包含
chunkId)的相关片段列表。仅返回当前Agent的内存或公共内存。task_id - 调用时机:
- 自动召回未运行或未返回任何结果时。
- 用户的查询过长或表述模糊时——自行生成简短查询语句并调用。
memory_search(query="...") - 你需要从不同角度进行搜索时(例如,通过进行筛选)。
role='user'
- 参数:(必填),可选参数
query、minScore。role
memory_write_public
memory_write_public
- What it does: Writes a piece of information to public memory. Public memory is visible to all agents — any agent doing can find it.
memory_search - When to call: In multi-agent or collaborative scenarios, when you have persistent information useful to everyone (e.g. shared decisions, conventions, configurations, workflows). Do not write session-only or purely private content.
- Parameters: (required),
content(optional).summary
- 功能:将一段信息写入公共内存。公共内存对所有Agent可见——任何Agent调用都可以找到这些内容。
memory_search - 调用时机:在多Agent协作场景中,当你拥有对所有Agent都有用的持久化信息时(例如,共享决策、约定配置、工作流程等)。请勿写入仅会话有效或纯私有的内容。
- 参数:(必填),
content(可选)。summary
task_summary
task_summary
- What it does: Returns the full task summary for a given : title, status, and the complete narrative summary.
task_id - When to call: A hit included a
memory_searchand you need the full story of that task.task_id - Parameters: (from a search hit).
taskId
- 功能:根据给定的返回完整的任务摘要:标题、状态以及完整的叙述性摘要。
task_id - 调用时机:当的结果中包含
memory_search,且你需要获取该任务的完整背景信息时。task_id - 参数:(来自搜索结果)。
taskId
skill_get
skill_get
- What it does: Returns the content of a learned skill (experience guide) by or by
skillId.taskId - When to call: A search hit has a and the task has a "how to do this again" guide. Use this to follow the same approach or reuse steps.
task_id - Parameters: (direct) or
skillId(lookup).taskId
- 功能:通过或
skillId返回已学习的技能(经验指南)内容。taskId - 调用时机:当搜索结果中包含,且该任务有“如何重复执行此任务”的指南时。使用该工具可以遵循相同的方法或复用步骤。
task_id - 参数:(直接指定)或
skillId(通过任务查找)。taskId
skill_search
skill_search
- What it does: Searches available skills (capabilities/guides) by natural language. Can search your own skills, other agents' public skills, or both — controlled by the parameter.
scope - When to call: The current task requires a capability or guide you don't have. Use to find one first; after finding it, use
skill_searchto read it, thenskill_getto load it for future turns. Setskill_installtoscopeto only see others' public skills,publicfor only your own, or leave as defaultselffor both.mix - Parameters: (required, natural language description of the need),
query(optional, defaultscope: self + public;mix: own only;self: public only).public
- 功能:通过自然语言搜索可用的技能(能力/指南)。可以搜索自身技能、其他Agent的公共技能,或两者都搜索——由参数控制。
scope - 调用时机:当前任务需要你不具备的能力或指南时。先使用找到相关技能;找到后,使用
skill_search读取内容,再使用skill_get将其加载到工作区以便后续使用。将skill_install设置为scope仅查看其他Agent的公共技能,public仅查看自身技能,默认self则同时查看两者。mix - 参数:(必填,对需求的自然语言描述),
query(可选,默认scope:自身+公共;mix:仅自身;self:仅公共)。public
skill_install
skill_install
- What it does: Installs a skill (by ) into the workspace for future sessions.
skillId - When to call: After when the skill is useful for ongoing use.
skill_get - Parameters: .
skillId
- 功能:将指定的技能安装到工作区,以便后续会话使用。
skillId - 调用时机:在使用获取技能内容后,若该技能对后续工作有用时。
skill_get - 参数:。
skillId
skill_publish
skill_publish
- What it does: Makes a skill public so other agents can discover and install it via .
skill_search - When to call: You have a useful skill that other agents could benefit from, and you want to share it.
- Parameters: .
skillId
- 功能:将技能设置为公共可见,以便其他Agent可以通过发现并安装它。
skill_search - 调用时机:当你拥有对其他Agent有帮助的实用技能,并希望共享时。
- 参数:。
skillId
skill_unpublish
skill_unpublish
- What it does: Makes a skill private again. Other agents will no longer discover it.
- When to call: You want to stop sharing a previously published skill.
- Parameters: .
skillId
- 功能:将技能重新设置为私有。其他Agent将无法再发现该技能。
- 调用时机:当你希望停止共享之前发布的技能时。
- 参数:。
skillId
memory_timeline
memory_timeline
- What it does: Expands context around a single memory chunk: returns the surrounding conversation messages.
- When to call: A hit is relevant but you need the surrounding dialogue.
memory_search - Parameters: (from a search hit), optional
chunkId(default 2).window
- 功能:扩展单个内存片段的上下文:返回该片段前后的对话消息。
- 调用时机:当的结果相关,但你需要查看该片段周围的完整对话时。
memory_search - 参数:(来自搜索结果),可选参数
chunkId(默认值为2)。window
memory_viewer
memory_viewer
- What it does: Returns the URL of the MemOS Memory Viewer web dashboard.
- When to call: The user asks how to view their memories or open the memory dashboard.
- Parameters: None.
- 功能:返回MemOS Memory Viewer网页仪表盘的URL。
- 调用时机:当用户询问如何查看或管理他们的内存时。
- 参数:无。
Quick decision flow
快速决策流程
-
No memories in context or auto-recall reported nothing → Callwith a self-generated short query.
memory_search -
Search returned hits withand you need full context → Call
task_id.task_summary(taskId) -
Task has an experience guide you want to follow → Callor
skill_get(taskId=...). Optionallyskill_get(skillId=...)for future use.skill_install(skillId) -
You need the exact surrounding conversation of a hit → Call.
memory_timeline(chunkId=...) -
You need a capability/guide that you don't have → Callto discover available skills.
skill_search(query="...", scope="mix") -
You have shared knowledge useful to all agents → Callto persist it in public memory.
memory_write_public(content="...") -
You want to share a useful skill with other agents → Call.
skill_publish(skillId=...) -
User asks where to see or manage their memories → Calland share the URL.
memory_viewer()
-
上下文无内存内容或自动召回未返回任何结果 → 调用,传入自行生成的简短查询语句。
memory_search -
搜索结果包含,且你需要完整上下文 → 调用
task_id。task_summary(taskId) -
任务有可遵循的经验指南 → 调用或
skill_get(taskId=...)。若该技能后续有用,可选择调用skill_get(skillId=...)。skill_install(skillId) -
你需要获取搜索结果片段的完整周边对话 → 调用。
memory_timeline(chunkId=...) -
当前任务需要你不具备的能力/指南 → 调用发现可用技能。
skill_search(query="...", scope="mix") -
你拥有对所有Agent都有用的共享知识 → 调用将其持久化到公共内存中。
memory_write_public(content="...") -
你希望与其他Agent共享实用技能 → 调用。
skill_publish(skillId=...) -
用户询问如何查看或管理他们的内存 → 调用并分享返回的URL。
memory_viewer()
Writing good search queries
撰写优质搜索查询的技巧
- Prefer short, focused queries (a few words or one clear question).
- Use concrete terms: names, topics, tools, or decisions.
- If the user's message is long, derive one or two sub-queries rather than pasting the whole message.
- Use when you specifically want to find what the user said.
role='user'
- 优先使用简短、聚焦的查询语句(几个词或一个清晰的问题)。
- 使用具体术语:名称、主题、工具或决策内容。
- 如果用户的消息过长,提炼出一两个子查询,而非粘贴整条消息。
- 当你专门需要查找用户的发言时,使用参数。",
role='user'