Memory
The Memory system allows you to store and retrieve contextual information associated with identities. This enables assistants to maintain context across conversations and provide personalized experiences.Get Memory
GET /memory/from/:identity_id
Retrieves all memory entries associated with a specific identity.
Identity unique identifier
Response
Success message
Array of memory entries
How Memory Works
The Memory system is automatically integrated with conversations:- Automatic Storage - Important information from conversations is automatically stored
- Context Retrieval - Memory is retrieved when starting new conversations
- Personalization - Assistants use memory to provide personalized responses
- Cross-Channel - Memory persists across all channels (WhatsApp, web, etc.)
Memory Access in Conversations
When an identity sends a message, the system automatically:- Retrieves relevant memory entries
- Includes them in the conversation context
- Updates memory based on new information
Memory Keys
Memory entries use keys to organize information. Common patterns:preferences.*- User preferences (e.g.,preferences.language,preferences.timezone)profile.*- Profile information (e.g.,profile.name,profile.email)history.*- Historical data (e.g.,history.last_order,history.purchases)custom.*- Custom application data
Examples
Get Memory
Response Example
Memory in Prompts
You can reference memory in assistant instructions using template syntax:Best Practices
- Use Descriptive Keys - Use clear, hierarchical keys (e.g.,
profile.emailnotemail) - Store Structured Data - Use objects for complex data
- Keep It Relevant - Only store information that improves conversations
- Respect Privacy - Don’t store sensitive data without consent
