SuperAPI AI Directory

MemU - An Open-Source AI Memory Framework for AI Emotional Companionship

Author: AI小集 · Original source: AI工具集

What is MemU

MemU is an open-source AI memory framework for AI emotional companionship. MemU can remember every conversation between the user and the AI, extract key points, and build a knowledge graph, enabling the AI to truly understand the user. MemU's memory evolves autonomously, continuously optimizing with use. MemU supports rapid integration—just a few lines of code give the AI persistent memory. Compared with other frameworks, MemU achieves up to 92% accuracy, reduces costs by 90%, and delivers retrieval speeds as fast as 50 milliseconds. In emotional companionship, education, and other scenarios, MemU can become the user's thoughtful intelligent companion.

memU

Main Features of MemU

  • Memory Storage and Management: MemU stores conversations as "self-growing" folders, persisting memory and evolving autonomously over time, ensuring information retention and continuous optimization.
  • Memory Extraction and Retrieval: MemU provides high accuracy (95% single-hop, 88% multi-hop) and fast retrieval (50 milliseconds), supporting semantic, hybrid, and contextual retrieval strategies to efficiently extract information.
  • Memory Understanding and Evolution: Automatically extracts key points from conversations, builds a knowledge graph, and can analyze memories offline to generate new insights, continuously optimizing the knowledge base.
  • Personalized Experience: Builds personalized profiles based on user conversations and behavior, providing deep emotional companionship, remembering stories and preferences, and thoughtfully supporting user needs.
  • Integration and Extension: Integrates through simple code, is compatible with mainstream platforms such as OpenAI and Anthropic, and supports enterprise-level customized development and intelligent analysis tools.

MemU Project Address

  • Project Website:https://memu.pro/
  • GitHub Repository:https://github.com/NevaMind-AI/memU

How to Use MemU

  • Create an Account and Get an API Key
    • Visit the Official Website: Go to the MemU official website https://memu.pro/。
    • Register an Account: Register a free account on the official website.
    • Get an API Key: After logging in to your account, visit the API key page to generate your dedicated API key.
  • Install the MemU Library: In your code environment, use the following command to install the MemU Python library:
pip install memu-py
  • Integrate MemU into Your Code: The following is a simple code example showing how to integrate MemU into a project:
import os
from memu import MemUClient

# 初始化 MemU 客户端
memu_client = MemUClient(
    base_url="https://api.memu.so",
    api_key=os.getenv("MEMU_API_KEY")  # 从环境变量中获取 API 密钥
)

# 准备对话内容
conversation_text = """
User: 你好,MemU!
Assistant: 你好!有什么可以帮你的吗?
User: 我最近在学习编程,你能给我一些建议吗?
Assistant: 当然可以!编程是一个很棒的技能。你可以从 Python 开始,它非常适合初学者。
"""

# 将对话内容传入 MemU,让其开始记忆
memu_client.memorize_conversation(
    conversation=conversation_text,
    user_id="user001",  # 用户 ID
    user_name="User",  # 用户名称
    agent_id="assistant001",  # AI 助手 ID
    agent_name="Assistant"  # AI 助手名称
)

print("对话已成功记录到 MemU!")
  • View and Manage Memories: After integration is complete, on the MemU management page view and manage all conversations and memories remembered by the AI.

MemU Application Scenarios

  • AI Emotional Companionship: MemU can record the user's emotional journey and preferences, providing thoughtful emotional support, making the AI a companion more caring than a lover and more understanding than family.
  • AI Education: Provides personalized learning plans and tutoring for educational applications, helping students learn more efficiently.
  • AI Therapy: In medical and psychological treatment, helps record patients' medical history and treatment progress, assisting doctors and therapists in making more accurate diagnoses and treatments.
  • AI Robots: MemU enables AI robots to remember interactions with users and environmental information, providing smarter, more personalized services and interactive experiences.
  • Intelligent Customer Service: With MemU, intelligent customer service systems can record customers' historical issues and preferences, enabling more coherent multi-turn conversations and providing more efficient and personalized customer service.