memory_write
Store a new fact as a persistent, searchable memory with semantic embedding. Closely matching conflicting entries are detected and superseded automatically, keeping recall accurate.
Instructions
Store a new memory and, by default, embed it for semantic search. For a new fact; to replace a specific memory whose id you know use memory_supersede, and to edit one in place memory_update. An embedded write is checked against existing memories of the same type from the same agent: if it closely matches one (cosine > 0.92 by default) but says something different, the old one is superseded automatically. type='auto' lets the LLM choose the type.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"content": "<content>"
},
"name": "memory_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Memory type. One of: auto, belief, chat_log, code, config, conversation, decision, event_extraction, fact, fact_enriched, home, home_automation, infrastructure, knowledge, linux_only, local_device, log, macos_only, message, migration-log, network_config, note, observation, plan, preference, procedure, reference, scratchpad, security, session_note, session_summary, snippet, summary, synthesis, task, to_do, user_fact, windows_only. | |
| embed | No | Embed for semantic search. | |
| scope | No | Isolation scope. | agent |
| store | No | Named store for this call only: main, or a [stores.<name>] in m3_config.toml. | |
| title | No | Short title. | |
| source | No | Provenance tag. | agent |
| content | Yes | Memory body (max 50000 chars). | |
| timeout | No | Per-call timeout in seconds; <=0 disables. | |
| user_id | No | Data subject id. | |
| variant | No | Pipeline identifier for A/B variant tracking. | |
| agent_id | No | Owning agent id. Injected by the orchestrator. | |
| database | No | SQLite file for this call only (legacy; prefer store). SQLite backend only. | |
| metadata | No | JSON-encoded metadata object. | {} |
| model_id | No | Originating model id. | |
| valid_to | No | ISO-8601 validity end. | |
| embed_text | No | Override text used for embedding; falls back to content when empty. | |
| importance | No | 0.0-1.0 relevance. | |
| refresh_on | No | ISO-8601 timestamp when this memory should be flagged for review (lifecycle / planned obsolescence). | |
| valid_from | No | ISO-8601 validity start. | |
| change_agent | No | Agent causing the write (audit). | |
| auto_classify | No | Let the LLM pick the type (forced true if type='auto'). | |
| refresh_reason | No | Why this memory needs refreshing (e.g., 'quarterly policy review'). | |
| conversation_id | No | Groups this memory with a conversation / team session. Same ID space as conversation_start. |