Skip to main content
Build an AI system that combines CrewAI’s agent-based architecture with Mem0’s memory capabilities. This integration enables persistent memory across agent interactions and personalized task execution based on user history.

Overview

In this guide, we’ll create a CrewAI agent that:
  1. Uses CrewAI to manage AI agents and tasks
  2. Leverages Mem0 to store and retrieve conversation history
  3. Creates personalized experiences based on stored user preferences

Setup and Configuration

Install necessary libraries:
Import required modules and set up configurations:
Remember to get your API keys from Mem0 Platform, OpenAI and Serper Dev for search capabilities.

Store User Preferences

Set up initial conversation and preferences storage:

Create CrewAI Agent

Define an agent with memory capabilities:

Define Tasks

Create tasks for your agent:

Set Up Crew

Configure the crew with memory integration:

Main Execution Function

Implement the main function to run the travel planning system:

Key Features

  1. Persistent Memory: Uses Mem0 to maintain user preferences and conversation history
  2. Agent-Based Architecture: Leverages CrewAI’s agent system for task execution
  3. Search Integration: Includes SerperDev tool for real-world information retrieval
  4. Personalization: Utilizes stored preferences for tailored recommendations

Benefits

  1. Persistent Context & Memory: Maintains user preferences and interaction history across sessions
  2. Flexible & Scalable Design: Easily extendable with new agents, tasks, and capabilities

Conclusion

By combining CrewAI with Mem0, you can create sophisticated AI systems that maintain context and provide personalized experiences while leveraging the power of autonomous agents.

AutoGen Integration

Build multi-agent systems with AutoGen and Mem0

LangGraph Integration

Create stateful agent workflows with memory
Enjoying Mem0? Star us on GitHub — it takes two seconds and helps more developers discover open-source memory.