Sandbox
@NevaMind-AI/memU

Personal memory CLI for Claude Code and other agents

memU stores useful session knowledge as shared memory and retrieves it when a later task needs it. It works through host adapters that read agent session logs, patch the host’s instruction file, and run scheduled bridging jobs to turn past work into reusable memory or skills.

14,402 stars1.1k forksPythonUpdated 7d ago
Who it's for

Builders who want their agent to remember past work across sessions, devices, and tools.

What it delivers

You can stop re-explaining project context and reuse learned workflows in later agent sessions.

What it does

Cross-agent memory storage

Stores memory in a shared backend so one agent’s sessions can be retrieved by another.

Automatic session bridging

Reads new session history and turns it into self-contained jobs for the agent to process into memory.

Skill extraction

Converts useful agent history into Markdown skills that can be reused later.

Host adapters

Provides binaries like `memu-codex`, `memu-claude-code`, `memu-cursor`, and `memu-openclaw` for specific agent environments.

Manual retrieval

Lets you run `retrieve` from the host adapter to fetch relevant memory on demand.

Backend support

Works with local SQLite, Postgres, or MemU Cloud through `MEMU_MEMORY_MODE` and related config.

How to get it

  1. 1Once installed, your agent retrieves relevant memory automatically before answering. To…
    memu-codex retrieve "What should I remember about this project?"
    # or: memu-claude-code / memu-cursor / memu-openclaw / memu-hermes / memu-workbuddy / memu-cola / memu-pi / memu-agent
  2. 2Install or invoke the CLI directly
    pip install memu-cli         # library + memu + memu-codex CLIs
    npx memu-cli --help          # CLI via npm launcher (engine: PyPI package memu-cli)
    uvx --from memu-cli memu     # CLI via uv, no install

README

memU Banner

memU

Personal memory, stored as Wiki

Across Sessions. Across Agents. Across Devices.

PyPI version License: Apache 2.0 Python 3.11+ Discord Twitter

NevaMind-AI%2FmemU | Trendshift


memU is a lightweight, agent-driven memory system that gives users a shared LLM wiki across sessions, agents, and devices. It automatically distills your own reusable skills from your agent history. Its core memory logic is only 500 lines — compact enough to inspect, understand, and adapt.

Quick start

memU works with Codex, Claude Code, Cursor, OpenClaw, Hermes, WorkBuddy, Cola, pi, and more. See Host adapters.

Cross-device · Free · Unlimited · View online

Get your API key from memu.so, then send this message to your agent:

Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is memu_•••••••••(get Api Key from memu.so).

Agent support

This matrix lists the currently tested memU integrations by operating system.

  • Memorize — capture useful session knowledge through a scheduled background task and turn it into reusable memory.
  • Retrieve — bring relevant memory into a future task.
  • ⚠️ — supported with an important limitation; see the user note.

macOS

AgentModeMemorizeRetrieveUser note
ChatGPTChatGPT(Work mode), codex and VS Code extension
ChatGPTChatChat mode is not currently supported. Please use Work mode.
Claude CodeDesktop and CLIIf the selected model declines the setup steps, retry with Opus or another model. Sonnet 5 can occasionally do this.
ClaudeChat and Cowork
Cursor
OpenClawRetrieve support has not yet been verified.
Hermes Agent
WorkBuddy

Windows

AgentModeMemorizeRetrieveUser note
ChatGPTChatGPT(Work mode), codex and VS Code extension
ChatGPTChatChat mode is not currently supported. Please use Work mode.
Claude CodeDesktop and CLIIf the selected model declines the setup steps, retry with Opus or another model. Sonnet 5 can occasionally do this.
ClaudeChat and Cowork
Cursor
OpenClaw
Hermes Agent⚠️Use a memU version with Windows HERMES_HOME support; older versions may retrieve from the wrong files.
WorkBuddyWith Hy3, retrieval may fail. Retry with another model if this happens.

Linux

AgentModeMemorizeRetrieveUser note
CodexVS Code extension
Claude CodeCLI
OpenClaw4.23 / 7.1

Support status reflects the current release and may change as host integrations evolve.

How it works

memU memory system architecture

Automatic skill extraction

Once the scheduled bridging task is installed, memU can turn useful agent history into reusable Markdown skills automatically.

How memU turns agent history into reusable skills

  1. Capture new sessions. The host adapter reads new session history, including messages and tool calls.
  2. Prepare self-evolve jobs. prepare slices each session into a self-contained job with the paths and context the agent needs.
  3. Let the agent decide. The agent reads related existing skills, then chooses to do nothing, patch an existing skill, or create a new one.
  4. Write readable skill Markdown. Each skill has a name, description, and reusable workflow, including useful branches, edge cases, and pitfalls.
  5. Commit and index. commit submits changed skill files through commit_results; memU embeds the skill name and description and stores it under the skill track.
  6. Retrieve it later. On a similar future task, memU returns the relevant skill so any connected agent can use the learned workflow.

The judgment and synthesis stay inside the agent. MemoryService makes no LLM or chat calls; it stores, embeds, and retrieves the skill Markdown the agent prepared.

Self-hosted

Private · Single-device · Embedding key required

To run memU locally with your own storage and embedding provider, send this message to your agent:

Read https://raw.githubusercontent.com/NevaMind-AI/MemU/main/SKILL.md and follow it to install memU.

Uninstall

To uninstall memU, send this message to your agent:

Read https://memu.pro/SKILL.md and follow its instructions to uninstall memU.

By default, uninstalling removes the host integration and tooling while keeping your memory store and ~/.memu/config.env, so a later reinstall can resume where you left off. Memory is erased only when you explicitly ask for it.

Host adapters: memory for desktop coding agents

memU runs as a sidecar to a desktop agent, one binary per host. Each binds two seams:

  • record — a scheduled bridging task slices new session logs into self-contained job files; the agent itself distills them into memory/skill Markdown; commit submits whatever the agent left on disk back through commit_results.
  • inject — a standing instruction in the host's instruction file tells the agent to run <binary> retrieve (→ progressive_retrieve) before answering.
HostBinarySession log it minesInstruction file it patches
Codexmemu-codex~/.codex/sessions/**/*.jsonl~/.codex/AGENTS.md
Claude Codememu-claude-code~/.claude/projects/<project>/<session>.jsonl~/.claude/CLAUDE.md
Cursor (Agent/CLI)memu-cursor~/.cursor/projects/<project>/agent-transcripts/**.jsonl./AGENTS.md (per project)
OpenClawmemu-openclaw~/.openclaw/agents/<agentId>/agent/openclaw-agent.sqlite (SQLite, read-only) + legacy <agentId>/sessions/*.jsonl~/.openclaw/workspace/AGENTS.md
Hermes Agentmemu-hermes~/.hermes/state.db (SQLite, read-only)~/.hermes/SOUL.md
WorkBuddymemu-workbuddy~/.workbuddy/projects/<project>/<session>.jsonl~/.workbuddy/SOUL.md
Colamemu-cola~/.cola/sessions/<scope>/<session>.jsonl~/.cola/memory-bank/MEMORY.md
pimemu-pi~/.pi/agent/sessions/<encoded-cwd>/<session>.jsonl~/.pi/agent/AGENTS.md
any other agentmemu-agentfound by memu-agent detect (JSONL dialect sniffed)found by detect (AGENTS.md / CLAUDE.md / SOUL.md / …)

For agents without a dedicated binary, memu-agent detect probes the machine and reports per agent whether memorization works (a recognizable session log exists) and whether retrieval works (an instruction file exists to patch) — then the same verbs run against what it found.

All hosts share one configured memory backend via ~/.memu/config.env — local or MemU Cloud. What one host's sessions taught memU, another host retrieves.

Installation is the one-message setup in Quick start or Self-hosted. SKILL.md is the routing skill it hands your agent: install the package, identify which host you are (falling back to memu-agent detect for anything without a dedicated adapter), print that host's packaged install guide (<binary> docs install), and follow it — configure the memory backend, register the scheduled bridging task, patch the instruction file, each step behind a verify gate — then report which seams (memorization / retrieval) are now active.

Afterwards <binary> doctor proves the whole loop resolves: config, selected mode, and a live retrieval.

Adding another host means implementing one TranscriptSource (where its session logs live, how its records are shaped) plus a HostSpec-sized CLI — the pipeline, verbs, and instruction text are shared.

Developer integration

Applications that already own their conversation history can use memu memorize to prepare self-evolve jobs from 1–10 completed sessions for one external agent and commit the resulting memory, skill, and resource changes. See Developer integration for the canonical input contract and the complete prepare → agent → commit workflow.

CLI

With memU Cloud, sign in at memu.so to view your memory files. With a local installation, memory lives in the shared store configured by MEMU_DB in ~/.memu/config.env — typically ~/.memu/memu.sqlite3 for local SQLite, or a Postgres DSN.

Once installed, your agent retrieves relevant memory automatically before answering. To retrieve manually, run the adapter for your host:

memu-codex retrieve "What should I remember about this project?"
# or: memu-claude-code / memu-cursor / memu-openclaw / memu-hermes / memu-workbuddy / memu-cola / memu-pi / memu-agent

Install or invoke the CLI directly:

pip install memu-cli         # library + memu + memu-codex CLIs
npx memu-cli --help          # CLI via npm launcher (engine: PyPI package memu-cli)
uvx --from memu-cli memu     # CLI via uv, no install

Configuration

Values resolve in order: process env → ~/.memu/config.env → default. memU supports Local and Cloud memory backends, selected by MEMU_MEMORY_MODE; an unset mode remains Local for backward compatibility.

For Local / self-hosted installations, every CLI flag has a matching variable:

SettingEnv varDefault
StoreMEMU_DB./data/memu.sqlite3 (CLI); required for host adapters
Embedding providerMEMU_EMBED_PROVIDERopenai (also: jina, voyage, doubao, openrouter); legacy MEMU_LLM_PROVIDER still read
API keyMEMU_API_KEYthe provider's env var, e.g. OPENAI_API_KEY
Embedding modelMEMU_EMBED_MODELthe provider's default
Base URLMEMU_BASE_URLthe provider's default

Run <binary> doctor to display the resolved mode and verify the same retrieval path the host uses.

Storage backends

ProviderDSNVector searchUse for
inmemorybrute-force cosinetests, throwaway sessions
sqlitesqlite:///path.sqlite3brute-force cosinelocal/default, single writer
postgrespostgresql://...pgvectorconcurrent access, large stores (pip install "memu-cli[postgres]")
service = MemoryService(
    database_config={"metadata_store": {"provider": "postgres", "dsn": "postgresql://..."}},
    embedding_profiles={"default": {"provider": "jina"}},
)

License

Apache-2.0

Partnership Community: LINUX DO

Files in the repo

Repository payload22 top-level entries
  • .github
  • assets
  • docs
  • npm
  • scripts
  • src
  • tests
  • .gitignore
  • .pre-commit-config.yaml
  • .python-version
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • INSTALL-LATEST.md
  • LICENSE.txt
  • Makefile
  • MANIFEST.in
  • pyproject.toml
  • README.md
  • setup.cfg
  • SKILL.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k