store_memory
Store new facts, preferences, instructions, failures, or strategies about the user. Each memory includes importance, category, and optional context for automatic pruning using biological forgetting curves.
Instructions
Store a new memory about the user. Use when you learn a new fact, preference, instruction, past failure, or successful strategy. Does not conflict with any memory returned by recall_memory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The fact, preference, failure, or strategy to remember. | |
| importance | No | You MUST decide this. How important is this memory? (0.0–1.0) 0.9–1.0 — core identity, permanent preferences (e.g. 'Sachit uses Python') 0.7–0.8 — strong preferences, recurring patterns 0.5 — regular facts, project decisions 0.2–0.3 — transient context, one-off notes from this session | |
| category | No | Memory category — controls decay rate: 'fact' — user preferences, identity, stable knowledge (default, ~24 day survival) 'assumption' — inferred beliefs, uncertain context (~19 days) 'failure' — what went wrong in a past task, environment-specific errors (~11 days, decays fast) 'strategy' — what worked well in a past task, approach patterns (~38 days, decays slow) Use 'failure' when storing e.g. 'OAuth failed for client X due to wrong redirect URI'. Use 'strategy' when storing e.g. 'Using pagination fixed the timeout on large DB queries'. | |
| user_id | No | User identifier (default: 'root'). | |
| api_key | No | Agent API key (starts with 'ym_'). Required for agent-scoped memory. If omitted, stored as 'user' with shared visibility. | |
| visibility | No | Who can recall this memory: 'shared' (any agent, default) or 'private' (only this agent). | |
| context_paths | No | File or directory paths this memory is associated with (e.g. ['src/services/', 'pyproject.toml']). Used for spatial relevance boosting during retrieval. |