Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Mem0 - The Memory Layer for Personalized AI

mem0ai%2Fmem0 | Trendshift Launch YC: Mem0 - Open Source Memory Layer for AI Apps

Learn more · Join Discord · Demo

Mem0 Discord Mem0 PyPI - Downloads GitHub commit activity Package version Npm package Y Combinator S24

Introduction

Mem0 (pronounced as "mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. Mem0 remembers user preferences, adapts to individual needs, and continuously improves over time, making it ideal for customer support chatbots, AI assistants, and autonomous systems.

Features & Use Cases

Core Capabilities:

  • Multi-Level Memory: User, Session, and AI Agent memory retention with adaptive personalization
  • Developer-Friendly: Simple API integration, cross-platform consistency, and hassle-free managed service

Applications:

  • AI Assistants: Seamless conversations with context and personalization
  • Learning & Support: Tailored content recommendations and context-aware customer assistance
  • Healthcare & Companions: Patient history tracking and deeper relationship building
  • Productivity & Gaming: Streamlined workflows and adaptive environments based on user behavior

Get Started

Get started quickly with Mem0 Platform - our fully managed solution that provides automatic updates, advanced analytics, enterprise security, and dedicated support. Create a free account to begin.

For complete control, you can self-host Mem0 using our open-source package. See the Quickstart guide below to set up your own instance.

Quickstart Guide

Install the Mem0 package via pip:

pip install mem0ai

Install the Mem0 package via npm:

npm install mem0ai

Basic Usage

Mem0 requires an LLM to function, with gpt-4o-mini from OpenAI as the default. However, it supports a variety of LLMs; for details, refer to our Supported LLMs documentation.

First step is to instantiate the memory:

from openai import OpenAI
from mem0 import Memory

openai_client = OpenAI()
memory = Memory()

def chat_with_memories(message: str, user_id: str = "default_user") -> str:
    # Retrieve relevant memories
    relevant_memories = memory.search(query=message, user_id=user_id, limit=3)
    memories_str = "\n".join(f"- {entry['memory']}" for entry in relevant_memories["results"])
    
    # Generate Assistant response
    system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
    messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
    response = openai_client.chat.completions.create(model="gpt-4o-mini", messages=messages)
    assistant_response = response.choices[0].message.content

    # Create new memories from the conversation
    messages.append({"role": "assistant", "content": assistant_response})
    memory.add(messages, user_id=user_id)

    return assistant_response

def main():
    print("Chat with AI (type 'exit' to quit)")
    while True:
        user_input = input("You: ").strip()
        if user_input.lower() == 'exit':
            print("Goodbye!")
            break
        print(f"AI: {chat_with_memories(user_input)}")

if __name__ == "__main__":
    main()

See the example for Node.js.

For more advanced usage and API documentation, visit our documentation.

[!TIP] For a hassle-free experience, try our hosted platform with automatic updates and enterprise features.

Demos

  • Mem0 - ChatGPT with Memory: A personalized AI chat app powered by Mem0 that remembers your preferences, facts, and memories.

Mem0 - ChatGPT with Memory

Try live demo



  • AI Companion: Experience personalized conversations with an AI that remembers your preferences and past interactions

AI Companion Demo



  • Enhance your AI interactions by storing memories across ChatGPT, Perplexity, and Claude using our browser extension. Get chrome extension.

Chrome Extension Demo



  • Customer support bot using Langgraph and Mem0. Get the complete code from here

Langgraph: Customer Bot



  • Use Mem0 with CrewAI to get personalized results. Full example here

CrewAI Demo

Documentation

For detailed usage instructions and API reference, visit our documentation. You'll find:

  • Complete API reference
  • Integration guides
  • Advanced configuration options
  • Best practices and examples
  • More details about:

Support

Join our community for support and discussions. If you have any questions, feel free to reach out to us using one of the following methods:

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Metadata

Release files for mem0ai-plus 0.1.81b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mem0ai-plus 0.1.81b1
File Size Uploaded
mem0ai_plus-0.1.81b1.tar.gz 83.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mem0ai-plus 0.1.81b1
File Interpreter ABI Platform
mem0ai_plus-0.1.81b1-py3-none-any.whl Python 3 none any Details

Total release size: 211.0 kB

Release files / mem0ai_plus-0.1.81b1.tar.gz

Download URL mem0ai_plus-0.1.81b1.tar.gz
Size 83.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee93cef3f164d7885e692f7a9768a9a5443e9d36d6315da43211a7bf3ed51fd
BLAKE2b-256 checksum
How to use checksums
99a3e339d4b3ba616e4e92b509575e2a89692d35728f83e86fba04d853e95ea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / mem0ai_plus-0.1.81b1-py3-none-any.whl

Download URL mem0ai_plus-0.1.81b1-py3-none-any.whl
Size 128.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d9efec7431fbd8c3993e254790dae3f87b0eef502068655cb53134e1cc5d318
BLAKE2b-256 checksum
How to use checksums
fb375b33553946acadce47c4ca98ecbbf3c37c980ba8e74e4a28962185483fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.81b1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page