Store a memory
zenbrain_storeSave a memory to long-term storage so it survives the conversation. Content is routed automatically to a procedure, episode, core memory, or fact, and the stored memory id is returned.
Instructions
Write something into long-term memory so it survives this conversation. Routing is automatic by default, first match wins: steps, or wording such as "How to", "Steps:" or "workflow:", make a procedure; an emotional weight above 0.5 (detected, or set via emotionalWeight) an episode; a confidence above 0.9 a pinned core memory; anything else a semantic fact. Set type only when you want to override that. Every call adds a new memory, except that storing the same core memory again updates it; the content is also kept in working memory (the most recent seven) while the server runs, so once seven are held each store replaces the oldest copy there. Long-term memory is never changed by a store. Returns the id of the stored memory. If it may already be stored, check with zenbrain_recall first: storing it again adds a duplicate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Routing hint. 'auto' (default) decides from the content. | |
| steps | No | Ordered steps of a procedure. Optional: without them the steps are taken from the content (numbered or bulleted lines, otherwise every line). | |
| tools | No | Tools a procedure uses. | |
| source | No | Where this came from, e.g. 'user', 'ai', 'import'. Kept with facts and episodes. | |
| content | Yes | The memory to store, in plain language. | |
| context | No | Context domain, e.g. 'work', 'personal', 'learning'. Kept with episodes only. | |
| outcome | No | What the procedure achieves. | |
| confidence | No | How certain this is (0–1), kept with facts. Above 0.9 routes to core memory unless an earlier routing rule matched. | |
| emotionalWeight | No | Emotional significance (0–1). Detected from the content when omitted. Above 0.5 routes to episodic memory unless steps or procedural wording matched first. With type 'fact' it is not stored, but lengthens the fact's first review interval (×(1 + weight)). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Identifier of the stored memory. |