memory_add
Save facts, preferences, decisions, and notes to persistent local memory. Call proactively to retain project conventions and user context across sessions.
Instructions
Save a fact, preference, decision, or note to persistent local memory. Call this PROACTIVELY whenever the user shares something worth remembering across sessions — project conventions, tool choices, personal preferences, decisions made, error fixes and their causes. Worth saving: decisions and their reasons, preferences, conventions, gotchas, approaches tried and abandoned. Not worth saving: one-off task details or anything re-derivable from the code. Do not wait to be asked. For facts you infer yourself rather than the user stating, propose them first and save only on approval. Keep each memory to one self-contained statement; attach aliases when the parameter is available. If a note tells you the user's own wording was already stored verbatim this turn, that statement is already saved: do not retry it in a rewording — save only what that text does not contain, or use memory_supersede on the given id. Default scope is the current project; use the personal scope for facts about the user that apply across all projects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional tags for filtering. | |
| type | No | Category of memory. Default: fact. | |
| scope | No | Memory scope. `project` = tied to this repo. `personal` = global across all your projects. `user` is a deprecated alias of `personal`. Default: project. | |
| source | No | Where this memory came from. Default: tool. Pass 'inference' for agent-proposed captures (V2-DESIGN §3.5). | |
| aliases | No | Optional: alternate phrasings of this fact — synonyms, another way a question might be worded, equivalents in the user's other language (e.g. 节假日 for 'public holidays'). They are indexed with the memory so differently-worded questions still match. Only used when the install has capture aliases enabled (init default). Send at most 4; extras and blanks are dropped silently, never an error. | |
| content | Yes | The fact to remember. One idea per memory. |