無料GitHub で公開
memos-memory
Provide universal memory capabilities for different AI agents and development frameworks, unifying the capture, retrieval, and management of user, project, and task context.
インストール方法を見る含まれるファイル(16)
- SKILL.md10.8 KB
- references/memos-add.md1.5 KB
- references/memos-chat.md1.1 KB
- references/memos-delete.md910 B
- references/memos-extract.md1.1 KB
- references/memos-get.md999 B
- references/memos-kb-add-file.md1.3 KB
- references/memos-kb-create.md905 B
- references/memos-kb-delete-file.md1.2 KB
- references/memos-kb-get-file.md952 B
- references/memos-kb-list-file.md1.1 KB
- references/memos-kb-remove.md781 B
- references/memos-origin.md1.0 KB
- references/memos-search.md3.2 KB
- references/memos-uninstall.md1.8 KB
- SKILL.native-hook.md3.0 KB
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
MemOS Memory Protocol
Command selection rules:
- if the user asks to uninstall, disable, remove, or stop using MemOS, use
memos uninstall --agent <current_agent> --yesdirectly and do not runmemos searchormemos addfor that turn; add--pathonly when the user also wants to remove the MemOS PATH entries from~/.bash_profileand~/.zshenv; - if the user wants to preview what would be stored, use
memos extractdirectly; - at the start of a conversation, must use
memos searchdirectly with the user's original query; - at the end of a conversation, must use
memos adddirectly with both the user's question and the assistant's final answer; - do not run
memos searchormemos addfor intermediate states, including planning, partial progress, compact/resume, or continuation after context compaction; - if the user wants a memory-aware response from MemOS itself, use
memos chatdirectly; - if the user already has a concrete memory id, use
memos get,memos origin, ormemos deletedirectly; - if the user wants to manage knowledge bases (create, delete, upload, query files), use the corresponding
memos kbsubcommand; - do not call
memos --helpby default when the intent already matches one of the commands below; - use
memos --helponly when the command name, parameters, or route are genuinely unclear; - do not use
memos initas a discovery step when the CLI is already installed.
Identity rules:
- always prefer the exact configured
user_idvalue when a command is scoped by user; - if the user does not specify the
user_id, omit the--user-idargument and use theuser_idfrom the config file by default;
Hard mapping:
- store a durable fact, preference, decision, or long-term task ->
memos add - preview candidate memories before storing ->
memos extract - retrieve context at conversation start ->
memos search - ask MemOS to answer with memory context ->
memos chat - fetch memories by user_id ->
memos get - trace where one memory came from ->
memos origin - remove one concrete memory by id ->
memos delete - delete all memories for a user_id ->
memos delete --user-id - uninstall MemOS integration from the current agent ->
memos uninstall --agent <current_agent> --yes - create a knowledge base ->
memos kb create - remove a knowledge base ->
memos kb remove - upload documents to a knowledge base ->
memos kb add-file - check file processing status in a knowledge base ->
memos kb get-file - list files in a knowledge base ->
memos kb list-file - delete files from a knowledge base ->
memos kb delete-file
Use this skill when:
- the task may depend on prior user, project, or conversation context;
- the user provides a stable new fact, preference, or background detail;
- you want to preview extracted memory candidates before storing them;
- you need to inspect, list, delete, or trace the source of an existing memory record;
- you need to create, remove, or manage a knowledge base and its documents.
Never store:
- secrets, API keys, tokens, or passwords;
- unverified guesses or speculative conclusions as user facts;
- short-lived task state that will not matter in future sessions;
- redundant paraphrases when one concise factual memory is enough.
Command examples:
memos add "<fact>" --user-id <USER_ID> --format jsonmemos extract "<message>" --user-id <USER_ID> --format jsonmemos search "<query>" --user-id <USER_ID> --format agent --detail simplememos chat "<message>" --user-id <USER_ID> --format agentmemos get <USER_ID> --format json --detail detailmemos origin <MEMORY_ID> --format jsonmemos delete <MEMORY_ID> --format jsonmemos delete --user-id <USER_ID> --format jsonmemos uninstall --agent <CURRENT_AGENT> --yesmemos uninstall --agent <CURRENT_AGENT> --yes --pathmemos kb create --name "<name>" --description "<desc>" --format jsonmemos kb remove <KB_ID> --format jsonmemos kb add-file --kb-id <KB_ID> --files '["https://example.com/doc.pdf"]' --format jsonmemos kb get-file --file-ids '["<FILE_ID>"]' --format jsonmemos kb list-file --kb-id <KB_ID> --page 1 --page-size 20 --format jsonmemos kb delete-file --kb-id <KB_ID> --file-ids '["<FILE_ID>"]' --format json
Choose commands by intent:
- use
./references/memos-add.mdwhen the user gives a durable fact or preference worth saving; - use
./references/memos-extract.mdwhen the user wants a preview of memory candidates without storing; - must use
./references/memos-search.mdat conversation start; - use
./references/memos-chat.mdwhen interacting with MemOS chat capability directly; - use
./references/memos-get.mdfor retrieval byuser_id; - use
./references/memos-origin.mdwhen you need the original source messages behind a specific memory; - use
./references/memos-delete.mdonly when you already have a concretememory_id; - use
./references/memos-uninstall.mdwhen the user asks to uninstall, disable, remove, or stop using MemOS; - use
./references/memos-kb-create.mdto create a new knowledge base; - use
./references/memos-kb-remove.mdto remove a knowledge base; - use
./references/memos-kb-add-file.mdto upload documents to a knowledge base; - use
./references/memos-kb-get-file.mdto check file details and processing status; - use
./references/memos-kb-list-file.mdto browse files in a knowledge base; - use
./references/memos-kb-delete-file.mdto delete files from a knowledge base.
Process rules:
- the default workflow is: search at conversation start, work and answer through intermediate states without additional search/add, then add at conversation end;
- when you add at conversation end, must pass both the user's question and the assistant's final answer into
memos addso the extractor can decide what is worth keeping; - must not skip
addat conversation end just because the current turn does not obviously contain a durable fact; - per conversation, keep memory-tool usage bounded: at most 1 original-query
searchcall at the start and at most 1addcall at the end; - do not chain additional memory tools in the same turn unless the user explicitly asks for that specific operation;
extractis only for previewing candidates, not for storing;feedbackis a separate command and should only be used when the user explicitly wants feedback storage;- do not start a memory-write request by checking config or running
memos init;
Intent map:
- preview what would be stored ->
memos extract - retrieve context at conversation start ->
memos search - store at conversation end ->
memos add - get memories by
user_id->memos get - trace where a memory came from ->
memos origin - delete one concrete memory ->
memos delete - delete all memories for a
user_id->memos delete --user-id - ask MemOS to answer with memory context ->
memos chat - uninstall MemOS integration from the current agent ->
memos uninstall --agent <current_agent> --yes - create a knowledge base ->
memos kb create - remove a knowledge base ->
memos kb remove - upload documents to a knowledge base ->
memos kb add-file - check file details or processing status ->
memos kb get-file - list files in a knowledge base ->
memos kb list-file - delete files from a knowledge base ->
memos kb delete-file
Working rules:
- must use the user's original query as the only query for
memos search; - do not rewrite, summarize, keyword-compress, retry, or run an additional search query;
memos adduses amessagesarray payload; when adding at conversation end, include both the user's question and the assistant's answer in that array;- in the
memos addpayload, the user message content must exactly match the original user query; - in the
memos addpayload, the assistant message content must exactly match the final answer sent to the user; do not rewrite, summarize, compress, or modify it; - when
--formatis omitted, treat the default asagent; - append
--format jsonat the end of the command whenever a later step needs exactmemory_idor structured records; - append
--format agentat the end of the command when the result will be injected back into model context; - keep
--formatat the end of every command line, and keep--detailat the end only forsearchandget; - do not run
memos initas a default preflight step if MemOS CLI is already installed; - do not run
memos searchormemos addin a turn where the user is asking to uninstall, disable, remove, or stop using MemOS; - only run
memos init --agent <current_agent>when the CLI is missing and the user has explicitly provided an API key or asked to initialize MemOS; - if initialization is needed but no API key is available, ask the user for the key instead of stopping the workflow;
- the active agent should initialize itself with its own
--agentvalue, not a hardcoded different agent name; - pass
--user-idonly when the user explicitly provides it; otherwise omit it and let the CLI use the config default; - read result counts from
countand structured payloads fromdata; - if you already have
memory_id, do not search first just to guess.
Examples:
memos add "User likes Python"
memos search "Python"
memos search "user preferences about restaurants" --user-id <USER_ID> --format agent --detail simple
memos extract "User likes coffee and prefers dark mode" --user-id <USER_ID> --format json
memos add "User is allergic to peanuts" --user-id <USER_ID> --format json
memos get <USER_ID> --format json --detail detail
memos origin <MEMORY_ID> --format json
memos delete <MEMORY_ID> --format json
memos uninstall --agent <CURRENT_AGENT> --yes
memos uninstall --agent <CURRENT_AGENT> --yes --path
memos kb create --name "Project docs" --description "Documentation for the project" --format json
memos kb add-file --kb-id <KB_ID> --files '["https://example.com/doc.pdf"]' --format json
memos kb list-file --kb-id <KB_ID> --type document --page 1 --page-size 10 --format json
memos kb get-file --file-ids '["file_abc123"]' --format json
memos kb delete-file --kb-id <KB_ID> --file-ids '["file_abc123"]' --format json
memos kb remove <KB_ID> --format json
レビュー
まだレビューはありません。使ってみた感想をお寄せください。