MemU – An open-source AI memory framework for AI-based emotional companionship

AI Tools updated 2d ago dongdong
14 0

What is MemU?

MemU is an open-source AI memory framework designed for AI-based emotional companionship. MemU can remember every conversation between the user and AI, extract key points, and build a knowledge graph to help the AI truly understand the user. Its memory evolves autonomously, continuously optimizing with use. MemU supports quick integration — with just a few lines of code, AI can gain persistent memory. Compared to other frameworks, MemU achieves up to 92% accuracy, reduces costs by 90%, and enables retrieval speeds as fast as 50 milliseconds. In scenarios such as emotional companionship and education, MemU can serve as a thoughtful and intelligent partner for users.

MemU – An open-source AI memory framework for AI-based emotional companionship


Main Features of MemU

  • Memory Storage and Management: MemU stores conversations as “self-growing” folders, enabling persistent memory that autonomously evolves over time, ensuring information is retained and continuously optimized.

  • Memory Extraction and Retrieval: MemU provides high accuracy (95% for single-hop, 88% for multi-hop) and fast retrieval (50 ms), supporting semantic, hybrid, and contextual retrieval strategies for efficient information access.

  • Memory Understanding and Evolution: Automatically extracts key points from conversations, builds knowledge graphs, and generates new insights offline by analyzing memory, continuously improving its knowledge base.

  • Personalized Experience: Builds personalized profiles based on user conversations and behaviors, offering deep emotional companionship, remembering stories and preferences, and thoughtfully supporting user needs.

  • Integration and Expansion: Easily integrated with just a few lines of code, compatible with major platforms such as OpenAI and Anthropic, and supports enterprise-level customization and intelligent analytics tools.


Project Links


How to Use MemU

  1. Create an Account and Obtain an API Key

    • Visit the official website: https://memu.pro/

    • Register for a free account.

    • After logging in, go to the API Key page to generate your personal API key.

  2. Install the MemU Library
    In your coding environment, install the Python library with the following command:

    pip install memu-py
  3. Integrate MemU into Your Code
    Example code snippet:

    import os
    from memu import MemUClient

    # Initialize MemU client
    memu_client = MemUClient(
    base_url="https://api.memu.so",
    api_key=os.getenv("MEMU_API_KEY") # Get API key from environment variable
    )

    # Sample conversation
    conversation_text = """
    User: Hi MemU!
    Assistant: Hello! How can I help you today?
    User: I’ve been learning programming recently. Can you give me some advice?
    Assistant: Of course! Programming is a great skill. You can start with Python—it’s very beginner-friendly.
    """

    # Pass conversation to MemU for memory storage
    memu_client.memorize_conversation(
    conversation=conversation_text,
    user_id="user001", # User ID
    user_name="User", # User name
    agent_id="assistant001", # AI assistant ID
    agent_name="Assistant" # AI assistant name
    )

    print("Conversation successfully recorded in MemU!")

  4. View and Manage Memories
    After integration, you can view and manage all AI-recorded conversations and memories on the MemU management page.


Application Scenarios for MemU

  • AI Emotional Companionship: Records users’ emotional journeys and preferences, providing thoughtful support and becoming a companion who understands you better than a partner or family member.

  • AI Education: Delivers personalized learning plans and tutoring, helping students learn more efficiently.

  • AI Therapy: Assists in recording patient histories and treatment progress, supporting doctors and therapists with more accurate diagnosis and therapy.

  • AI Robotics: Enables robots to remember user interactions and environmental information, offering smarter and more personalized services.

  • Intelligent Customer Service: Records customer history and preferences, enabling coherent multi-turn conversations and delivering more efficient, personalized support.

© Copyright Notice

Related Posts

No comments yet...

none
No comments yet...