NevaMind-AI/memU

Personal memory across agents

What is memU?

memU (pronounced mem‑you) is a lightweight, agent‑driven personal memory system. It lets you keep a shared, searchable wiki of your own LLM‑generated knowledge that persists across:

  • different chat sessions,
  • multiple AI agents (ChatGPT, Claude Code, Cursor, OpenClaw, Hermes, WorkBuddy, etc.),
  • and even different devices.

The core of memU is only ~500 lines of Python, making the memory logic easy to read, audit, and extend.


Why use it?

  • Never lose useful context again – memU automatically captures the useful parts of each agent interaction and stores them as reusable Markdown “skills”.
  • Cross‑agent reuse – a skill learned while working with one agent (e.g., Claude Code) can be retrieved by another (e.g., Cursor) without any extra work.
  • Self‑hosting option – you can keep everything private on your own machine or use the hosted memU Cloud service.
  • Zero‑LLM overhead in the memory layer – memU only stores, embeds, and retrieves the Markdown you (or the agent) produce; it never makes its own LLM calls.

How does it work?

  1. Host adapters – a small binary (e.g., memu-codex, memu-claude-code) knows where a given agent writes its session logs and which instruction file the agent reads.
  2. Memorize – a scheduled background task reads new session logs, slices them into self‑contained jobs, and hands them to the agent.
  3. Skill extraction – the agent decides whether to create a new skill, patch an existing one, or do nothing. The result is a clean Markdown file describing a reusable workflow.
  4. Commit – memU writes the skill file back to the shared store, embeds the skill name/description, and indexes it.
  5. Retrieve – before the agent answers a new query, memU injects a retrieve call that returns the most relevant skill(s) based on vector similarity.

All embedding and vector‑search work is handled by a configurable backend (in‑memory, SQLite, or Postgres with pgvector). The only LLM involvement is the agent that writes the skill markdown.


Quick start / Installation

# Install the CLI (includes the core library and all host adapters)
pip install memu-cli          # Python package
# or via npm/uv shortcuts
npx memu-cli --help
uvx --from memu-cli memu
  1. Get an API key from the memU Cloud site https://memu.so (or set up your own embedding provider for self‑hosted mode).
  2. Send a one‑line message to your agent (ChatGPT, Claude Code, etc.):
    Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is memu_•••••••••
    
    The skill file guides the agent through detecting the host, installing the appropriate binary, configuring ~/.memu/config.env, and scheduling the bridging task.
  3. Verify with <binary> doctor – it reports the resolved configuration and a successful retrieval test.

Using memU

  • Automatic retrieval – once installed, the host adapter injects a retrieve step before every agent response, so you get relevant skills without extra commands.
  • Manual retrieval – you can ask for a skill directly:
    memu-codex retrieve "What should I remember about this project?"
    # replace the binary with the one matching your agent
    
  • Developer integration – use memu memorize in your own applications to turn arbitrary conversation logs into memU‑compatible skill markdown. See docs/developer.md for the required JSONL format.

Ecosystem & Compatibility

OS Agent Memorize Retrieve
macOS ChatGPT (Work mode), Claude Code, Cursor, OpenClaw, Hermes, WorkBuddy ✅ ✅
Windows Same as macOS (with a few model‑specific notes) ✅ ✅
Linux Codex (VS Code), Claude Code, OpenClaw ✅/❌ ✅

Supported adapters include:

  • memu-codex
  • memu-claude-code
  • memu-cursor
  • memu-openclaw
  • memu-hermes
  • memu-workbuddy
  • memu-cola
  • memu-pi
  • generic memu-agent for any other JSONL‑based agent.

Adding a new host only requires implementing a TranscriptSource (where the logs live) and a small CLI wrapper – the core pipeline is shared.


Configuration

All settings are read from environment variables, falling back to ~/.memu/config.env:

  • MEMU_DB – path/DSN of the vector store (SQLite default).
  • MEMU_EMBED_PROVIDER – openai, jina, voyage, doubao, openrouter.
  • MEMU_API_KEY – provider‑specific key.
  • MEMU_EMBED_MODEL – model name (defaults per provider).
  • MEMU_MEMORY_MODE – local (default) or cloud.

Run <binary> doctor to see the resolved configuration and test a retrieval.


License

Apache‑2.0 (permissive, commercial‑friendly).


TL;DR

memU gives you a personal, agent‑agnostic wiki that automatically learns from your LLM sessions and makes that knowledge instantly available to any supported AI coding assistant, all with a tiny, inspectable codebase.

Related

  • Project
  • Project
  • Project
  • Project
  • Project