add_memory
Store user preferences, personal context, project patterns, and decisions to long-term memory for future reference.
Instructions
Save important information to long-term memory.
When to Use
User stated preferences ('User prefers dark mode')
Personal context ('User is learning Rust', 'User works on payments team')
Project patterns ('API endpoint at /api/v2', 'Uses PostgreSQL for this project')
Agreed decisions ('Team decided to use Docker for deployment')
Constraints ('Budget is tight', 'Deadline is end of month')
Lessons learned ('Don't use library X, it caused issues')
Post-Response Storage Pattern (IMPORTANT)
After responding to user, EVALUATE whether new facts should be stored:
Did user share personal context? → Store it
Did we make a technical decision? → Store it
Did user express a preference? → Store it
Did user correct previous information? → Update existing memory
Deduplication
Search before adding if the info seems routine. Prefer UPDATING existing memories when finding conflicting info. Store each distinct piece as a separate memory with clear, searchable text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Memory content - write clear, searchable statement (e.g., 'User prefers dark mode theme'). | |
| user_id | No | User identifier (optional, uses default if not set). | |
| agent_id | No | Session/run identifier for grouping related memories. | |
| metadata | No | Additional metadata (runId supported). |