Memory Tools
Memory tools let agents store facts that persist across conversations.
remember_user_fact
Section titled “remember_user_fact”Stores a fact about the user. User facts are shared across all agents, so any agent can access information stored this way.
remember_user_fact( fact: "Prefers dark mode and monospace fonts")Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
fact | string | yes | A short, atomic fact about the user |
overrides | boolean | no | Set to true if this fact contradicts or supersedes a previously stored fact (default: false) |
remember_agent_fact
Section titled “remember_agent_fact”Stores a fact private to this agent. Other agents cannot see these facts.
remember_agent_fact( fact: "Last research topic was renewable energy markets")Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
fact | string | yes | A short, atomic fact for this agent to remember |
overrides | boolean | no | Set to true if this fact contradicts or supersedes a previously stored fact (default: false) |
update_identity
Section titled “update_identity”Updates the agent’s own identity attributes. These are key-value pairs that persist and affect how the agent presents itself.
update_identity( attributes: { "name": "Research Bot", "style": "thorough and detail-oriented" })Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
attributes | object | yes | Key-value pairs of identity attributes to set. Use an empty string value to remove an attribute |
Best practices
Section titled “Best practices”- Check before storing: read existing memory first to avoid duplicates
- Be specific: store concise, actionable facts rather than vague impressions
- Update, don’t duplicate: use
overrides: truewhen information changes - Keep it lean: for large data, save to a workspace file and reference it in memory
- Scope correctly: user facts for personal preferences, agent facts for task-specific context
Automatic compaction
Section titled “Automatic compaction”Stored facts are periodically compacted by the platform’s insight compaction process. This merges duplicates, removes stale information, and keeps the memory set manageable. See Insights for details.