Learn how to use the Memory System in ChatBotKit to enable AI agents to store, retrieve, and leverage contextual information for personalized conversations.

The Memory System in ChatBotKit enables AI agents to store, retrieve, and leverage important information about contacts and conversations. This powerful feature allows your bots to maintain context across multiple interactions, creating more personalized and coherent conversations that improve over time.

Understanding Memories

Memories are contextual information that AI agents can store about contacts, preferences, previous interactions, and important details. Unlike traditional stateless conversations, the Memory System allows your AI to build a comprehensive understanding of each contact, remembering their preferences, history, and context across all future interactions.

Key Benefits:

  • Persistent Context: Conversations maintain context across multiple sessions
  • Personalized Interactions: AI agents adapt responses based on stored contact information
  • Reduced Repetition: No need to re-ask for previously provided information
  • Improved Accuracy: Responses are informed by historical context and preferences

Creating and Managing Memories

1. Manual Memory Creation:

To create a memory manually:

  • Navigate to the 'Memories' section from the dashboard
  • Click on the 'Create Memory' button
  • Fill in the memory details:
    • Name: A descriptive title for the memory
    • Description: Additional context about the memory
    • Text: The actual content of the memory
    • Contact: Associate the memory with a specific contact (optional)
    • Bot: Link the memory to a particular bot (optional)
    • Meta: Custom metadata in JSON format (optional, in advanced options)

Once created, the memory becomes available for AI agents to reference during conversations with the associated contact or when using the specified bot.

2. Automatic Memory Creation:

AI agents can automatically create, update, delete, search, and list memories during conversations using the built-in memory abilities. When an agent learns new information about a contact, it can store this knowledge for future reference without manual intervention. You enable this by attaching the appropriate memory abilities to your bot.

Memory Scopes and Associations

Each memory can be scoped to a specific context. This determines which conversations and contacts can access it.

Contact-Specific Memories:

These memories are tied to individual contacts and contain personal information, preferences, and interaction history. When a contact engages with any of your bots, relevant memories are automatically accessible to provide personalized responses.

Examples of contact memories:

  • Communication preferences (email vs. phone)
  • Product interests and past purchases
  • Support history and resolved issues
  • Personal details and conversation context

Bot-Specific Memories:

Bot memories are associated with particular AI agents and help them maintain specialized knowledge relevant to their role. These memories enable bots to become more effective in their specific domains over time.

Examples of bot memories:

  • Common issue resolutions for customer service bots
  • Successful conversation patterns for sales bots
  • Domain-specific knowledge and expertise
  • Frequently asked questions and responses

Account-Level Memories:

Memories without a contact or bot association are available at the account level. These can be accessed by any agent in your account and are useful for storing general knowledge that applies across all your bots and contacts.

Memory Search and Retrieval

The Memory System includes search capabilities that allow AI agents to quickly find relevant information during conversations. When a contact mentions previous interactions or asks about past discussions, agents can search their memories to provide informed responses.

Search Features:

  • Real-time Search: Instant access to relevant memories during conversations
  • Contextual Matching: Intelligent matching based on conversation context
  • Ranked Results: Most relevant memories appear first in search results
  • Scope-Aware: Agents search within the appropriate scope - contact memories when talking to a specific contact, bot memories for bot-specific knowledge, or account-level memories for general information

Memory Expiration

Memories support an optional expiration setting. When you set an expiration, the memory will no longer be available to agents after that date and time. This is useful for time-sensitive information such as promotional offers, temporary preferences, or context that becomes outdated.

To set an expiration when creating or editing a memory, specify when the memory should expire. The system will automatically exclude expired memories from search results and agent access.

Getting Started with Memories

  1. Access the Memories Dashboard: Navigate to the Memories section in your ChatBotKit dashboard
  2. Create Your First Memory: Start with a simple contact-specific memory to see how the system works
  3. Enable Memory Abilities: Configure your bots to use memory abilities for autonomous memory management
  4. Test and Iterate: Engage in conversations to see how memories enhance the AI experience
  5. Scale Gradually: As you become comfortable with the system, expand to more complex memory strategies

The Memory System transforms your AI agents from stateless responders into intelligent assistants that learn, remember, and adapt. By leveraging memories effectively, you can create conversational experiences that become more valuable and personalized with every interaction.