Skip to content

NevaMind-AI/memU-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memU-server: Local Backend Service for AI Memory System

memU-server is the backend management service for MemU, responsible for providing API endpoints, data storage, and management capabilities, as well as deep integration with the core memU framework. It powers the frontend memU-ui with reliable data support, ensuring efficient reading, writing, and maintenance of Agent memories. memU-server can be deployed locally or in private environments and supports quick startup and configuration via Docker, enabling developers to manage the AI memory system in a secure environment.


⭐ Star Us on GitHub

Star memU-server to get notified about new releases and join our growing community of AI developers building intelligent agents with persistent memory capabilities. 💬 Join our Discord community: https://discord.gg/memu


🚀 Get Started

Run from source

  1. Ensure you have Python 3.14+ and uv installed.
  2. Clone the repository and enter it:
    git clone https://github.com/NevaMind-AI/memU-server.git
    cd memU-server
  3. Set your OpenAI API key in the environment:
    export OPENAI_API_KEY=your_api_key_here
  4. Install dependencies and start the FastAPI dev server:
    uv sync
    uv run fastapi dev
    The server runs on http://127.0.0.1:8000.

Run with Docker

  1. Export your OpenAI API key so Docker can read it:
    export OPENAI_API_KEY=your_api_key_here
  2. Pull the latest image:
    docker pull nevamindai/memu-server:latest
  3. Start the container (optionally mount a host directory to persist ./data):
    docker run --rm -p 8000:8000 \
      -e OPENAI_API_KEY=$OPENAI_API_KEY \
      nevamindai/memu-server:latest
    Access the API at http://127.0.0.1:8000.

API Endpoints

  • POST /memorize: persist a conversation-style payload for later retrieval. Example body shape:
    {
      "content": [
        {"role": "user", "content": {"text": "..."}, "created_at": "YYYY-MM-DD HH:MM:SS"},
        {"role": "assistant", "content": {"text": "..."}, "created_at": "YYYY-MM-DD HH:MM:SS"}
      ]
    }
  • POST /retrieve: query stored memories with a text prompt:
    {"query": "your question about the conversation"}
  • To smoke-test locally, set MEMU_API_URL (defaults to http://127.0.0.1:12345), POST a conversation to /memorize, then call /retrieve with a text query.

🔑 Key Features

Quick Deployment

  • Docker image provided
  • Launch backend service and database with a single command
  • Provides API endpoints compatible with memU-ui, ensuring stable and reliable data services

Comprehensive Memory Management

(Some features planned for future releases)

  • Memory Data Management
    • Support creating, reading, and deleting Memory Submissions
    • Memorize results support create, read, update, and delete (CRUD) operations
    • Retrieve records support querying and tracking
    • Tracks LLM token usage for transparent and controllable costs
  • User and Permission Management
    • User login and registration system
    • Role-based access control: Developer / Admin / Regular User
    • Backend manages access scope and permissions for secure operations

🧩 Why MemU?

Most memory systems in current LLM pipelines rely heavily on explicit modeling, requiring manual definition and annotation of memory categories. This limits AI’s ability to truly understand memory and makes it difficult to support diverse usage scenarios.

MemU offers a flexible and robust alternative, inspired by hierarchical storage architecture in computer systems. It progressively transforms heterogeneous input data into queryable and interpretable textual memory.

Its core architecture consists of three layers: Resource Layer → Memory Item Layer → MemoryCategory Layer.

Three-Layer Architecture Diagram
  • Resource Layer: Multimodal raw data warehouse
  • Memory Item Layer: Discrete extracted memory units
  • MemoryCategory Layer: Aggregated textual memory units

Key Features:

  • Full Traceability: Track from raw data → items → documents and back
  • Memory Lifecycle: Memorization → Retrieval → Self-evolution
  • Two Retrieval Methods:
    • RAG-based: Fast embedding vector search
    • LLM-based: Direct file reading with deep semantic understanding
  • Self-Evolving: Adapts memory structure based on usage patterns
process

📄 License

By contributing to memU-server, you agree that your contributions will be licensed under the AGPL-3.0 License.


🌍 Community

For more information please contact [email protected]

  • GitHub Issues: Report bugs, request features, and track development. Submit an issue
  • Discord: Get real-time support, chat with the community, and stay updated. Join us
  • X (Twitter): Follow for updates, AI insights, and key announcements. Follow us

About

backend wrapper for memU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published