save_memory
Persist user preferences, facts, episodes, or skills as memories for future conversations, with automatic embedding and near-duplicate detection that merges or skips redundant saves.
Instructions
Save a new memory. Memories are persistent user preferences, facts, episodes, or skills that should be recalled in future conversations. Embeddings are generated automatically for semantic search. Delta-write is on by default: near-duplicate saves are skipped and similar existing memories absorb the new content instead of a new row being created (status in the response: saved | merged | skipped). Pass force_insert=true to bypass. Writes persist immediately; requires agent auth when the agent has a registered key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags for categorization | |
| type | No | Memory type: preference, fact, episode, entity, or skill | fact |
| layer | No | Memory layer: L0 (raw), L1 (atom), L2 (scenario), L3 (persona). Auto-assigned if omitted. | |
| api_key | No | API key for agent authentication (required if agent has a registered key) | |
| content | Yes | The content of the memory to save | |
| agent_id | No | ID of the agent saving this memory | unknown |
| priority | No | Priority level: MUST, REFERENCE, or BACKGROUND | REFERENCE |
| namespace | No | Namespace for the memory (default: global) | global |
| agent_type | No | Type of the agent (e.g., coding-assistant) | general-assistant |
| confidence | No | Confidence score (0.0 to 1.0) | |
| visibility | No | Sharing scope: "scoped" (default, namespace rules) or "shared" (team pool). | |
| instruction | No | Optional instruction format for the memory | |
| skill_steps | No | Skill execution steps (only for type=skill) | |
| force_insert | No | Force insert, skipping delta-write dedup/merge. By default a save is checked against similar memories in the same namespace: near-duplicates are skipped, similar memories absorb the new content's residual (docs/DESIGN.md §17.1). | |
| skill_trigger | No | Skill trigger pattern (only for type=skill) | |
| skill_verification | No | Skill verification criteria (only for type=skill) |