add_memory
Store a fact, rule, or user preference into the agent's long-term memory. Accepts plain text or raw conversation to infer structured facts, organized by memory type and optional user or agent IDs.
Instructions
Store a memory. Prefer infer=false with a self-contained third-person fact.
memory_type: decision | convention | anti_pattern | user_preference | task_learning | environmental | identity | rule | project
infer=true lets mem0 extract facts from raw conversation; skip for explicit facts.
Never store secrets. Skip small talk, tool dumps, and one-shot commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| infer | No | ||
| user_id | No | ||
| agent_id | No | ||
| memory_type | No | ||
| metadata_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |