memory_add
Stores a memory for later retrieval and reports duplicate or vectorization failure, enabling agents to persist facts, preferences, episodes, or notes with optional scope and TTL.
Instructions
Store a memory for later retrieval. Returns duplicate=true when identical content already exists (no new record), and embedding_failed=true when the memory was saved but vectorization failed (keyword search still works).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | optional kind: fact, preference, episode, or note; defaults to note | |
| scope | No | optional scope, for example project:opc; defaults to 'default' | |
| content | Yes | the memory text to store | |
| ttl_hours | No | optional time-to-live in hours; 0 means the memory never expires |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the id of the stored (or already existing) memory | |
| dry_run | Yes | true when redaction ran in dry-run mode and the content was stored unchanged | |
| embedded | Yes | true when a vector was written for this memory | |
| redacted | Yes | true when the content hit redaction rules before being stored | |
| duplicate | Yes | true when identical content already exists in the same tenant/scope; no new record was written | |
| redactions | Yes | names of the redaction rules that matched; never contains the original text | |
| embedding_error | No | the vectorization error, present only when embedding_failed is true | |
| embedding_failed | Yes | true when the memory was saved but vectorization failed; keyword search still works |