explaingit

nevamind-ai/memu

13,615PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A Python library that gives AI agents persistent long-term memory, storing facts and preferences in a linked graph and injecting only the relevant pieces into each new request so context stays small as knowledge accumulates.

Mindmap

mindmap
  root((memU))
    What It Does
      Persistent agent memory
      Reduces context size
      Proactive behavior
    Memory Structure
      File-system style
      Categories as folders
      Linked memory graph
    Integrations
      MCP protocol
      Claude compatible
      Python library
    Use Cases
      Always-on agents
      Preference tracking
      Document querying
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build an AI assistant that remembers user preferences and past conversations across multiple sessions without keeping the full history in every API request.

USE CASE 2

Create a proactive agent that monitors ongoing interactions, extracts insights, and takes steps before the user asks by feeding forward-looking context to the main agent.

USE CASE 3

Integrate persistent memory into Claude or any other MCP-compatible AI tool using the built-in Model Context Protocol adapter.

USE CASE 4

Load documents into the memory store and query relevant facts from them later, rather than embedding the raw text in every prompt.

Tech stack

PythonMCP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.13 or newer, which may need a runtime upgrade before installation.

Apache 2.0, use freely in personal or commercial projects, attribution required when redistributing.

In plain English

memU is a Python library that gives AI agents a persistent memory layer, designed for agents that run around the clock rather than just answering one question and stopping. The core problem it addresses is that language models do not remember anything between sessions by default, and keeping a long conversation history in every request gets expensive. memU stores what the agent has learned about you, then injects only the relevant pieces into each new request, so the context stays small even as knowledge accumulates over time. The memory is organized like a file system, with categories acting as folders and individual facts or preferences stored as files inside them. Related memories link to each other, forming a connected graph that the agent can navigate. Conversations and documents can be loaded into this structure and then queried later, rather than keeping the raw text around forever. A key design goal is proactive behavior. Rather than waiting to be asked, the agent is meant to observe interactions, infer what you are likely to need next, and take steps before you ask. The README describes a setup where a secondary memU process monitors what the main agent is doing, continuously extracts insights, and feeds forward-looking context back so the main agent can act ahead of time. The library integrates with the Model Context Protocol (MCP), which lets it plug into Claude and other MCP-compatible AI tools. It is available as a Python package called memu-py and requires Python 3.13 or newer. A companion application called memUBot, built on top of this library, is also open-sourced separately. The project is licensed under Apache 2.0 and is maintained by NevaMind AI. A Discord community is available for questions and discussion.

Copy-paste prompts

Prompt 1
Show me how to set up memu-py with Python 3.13 to give an AI agent persistent memory that stores user preferences as categorized facts and retrieves only the relevant ones per request.
Prompt 2
How do I configure a secondary memU process to monitor my main agent, extract insights from its interactions, and inject forward-looking context back proactively?
Prompt 3
Write a Python script using memu-py to load a document into the memory store and then query relevant facts from it in a later session.
Prompt 4
How do I connect memU to Claude Desktop using the Model Context Protocol (MCP) adapter so Claude can access the memory graph?
Prompt 5
What is the difference between storing a memory as a category file versus linking it to another memory node in memU's graph structure?
Open on GitHub → Explain another repo

← nevamind-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.