memory_save
Persist user preferences, decisions, facts, goals, and other long-term memories for retrieval across sessions. Classify memories by type, namespace, and importance.
Instructions
Persist a long-term memory for the current user.
When to use:
The user states a preference, decision, fact, plan, or goal that should outlive this chat.
You learn a stable property of the user, their project, or their tooling.
The user explicitly says "remember", "记住", "save this".
When NOT to use:
Ephemeral chat turns ("ok", "thanks").
Sensitive secrets (API keys, passwords) — refuse and warn the user.
Information you can re-derive from the codebase on demand.
Returns: { id, created_at, schema_version, embedding_status } — use memory_get for the full record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| type | No | "preference" = user likes/dislikes, "decision" = chosen approach, "fact" = stable truth, "event" = time-bounded happening, "goal" = intent, "insight" = derived learning, "relationship" = link between entities. | fact |
| content | Yes | The memory text to persist. Be concrete and self-contained — future-you should understand it without surrounding chat. | |
| entities | No | Named entities mentioned (people, products, repos). Helps later retrieval. | |
| metadata | No | ||
| namespace | No | Logical bucket (e.g. project name). Use "default" unless the user has multiple isolated contexts. | default |
| importance | No | 0..1 priority hint. Defaults to 0.5 server-side. | |
| occurred_at | No | ISO-8601 timestamp when the memory factually happened. Defaults to server now(). |