lil memory

Your AI memory as a folder of Markdown files. Works with any model. No account, no cloud, no company in the middle.

lil memory is a small local MCP server. Every AI client you connect (Claude Desktop, Claude Code, Codex, ChatGPT and others) reads and writes the same memories. The memories are plain files in a folder you own, so you can read and edit them in Obsidian or any text editor.

[ Home | Connect | Reference | Source ]

Why lil memory

Most people now use more than one AI: Claude in the morning, a coding agent in the afternoon, ChatGPT on the go. Each one keeps its own memory, on its own company's servers, and none of them knows what the others learned. lil memory is one memory that all of them share, and it lives with you.

How it compares

Where your memory livesShared across AIsEdit by handWhat you need
Built-in memory (ChatGPT, Claude, Gemini)The provider's serversNo. Each keeps its own; imports are one-time copies that drift apartIn that app's settingsNothing
Hosted memory servicesThe service's cloudYes, through their API or MCPIn their dashboardAn account and an API key
Self-hosted memory stacks, such as OpenMemoryDatabases on your machineYes, through MCPIn a web UIDocker, Postgres, a vector database and an LLM API key
The reference MCP memory serverOne JSON Lines file on your machineYes, through MCPPossible, but it is a graph stored as JSONNode.js
Basic MemoryMarkdown files on your machineYes, through MCPYes, in Obsidian or any editorA Python program (AGPL), with optional cloud sync
lil memoryMarkdown files on your machineYes, through MCPYes, in Obsidian or any editorOne small Python program (MIT)

lil memory and Basic Memory

Basic Memory is the closest relative: Markdown files, Obsidian, MCP. But it is a full knowledge-management platform, with semantic search, schemas, projects, workspaces and a paid cloud. lil memory is only the memory, and you can feel the difference:

lil memoryBasic Memory
Installed size28 MB383 MB
Packages installed31167
Direct dependencies242
Lines of codeabout 1,250about 89,000
Server ready to use0.4 s3.2 to 4.6 s
Save a memory4 ms95 ms
Search3 ms22 ms
Tools the AI has to read on every request6 (about 1,200 tokens)21 (about 11,000 tokens)
LicenseMITAGPL

Measured on 2026-10-09 on one MacBook at the same moment: Basic Memory 0.23.2 with default settings and lil memory 0.1, each installed in a clean Python 3.12 environment and driven over MCP the way an AI client does, with 200 notes each. Times are medians. Exact numbers vary by machine; the ratios are the point.

When something else fits better

Quickstart

You need uv. Then:

  1. Create the vault at ~/lil-memory:
    uvx lil-memory init
  2. Connect a client (claude-desktop, claude-code or codex; for others see Connect your AI):
    uvx lil-memory install claude-desktop
  3. Restart the client and talk to it:
    • "Remember that I prefer British spelling."
    • "Load my context for acme-site."

Run lil-memory open to explore and edit your memories in Obsidian. The first time, Obsidian asks you to pick the vault folder once ("Open folder as vault"); after that the command goes straight there. Without Obsidian, it opens the folder in your file manager. Run lil-memory doctor if something does not work.

Usage

Most of the time you do nothing. lil memory tells every connected AI to treat it as its own memory, and to use it constantly and silently:

The AI decides when to save; lil memory never reads your conversations itself. Most clients follow these instructions. If yours does not, add this line to its instruction file, such as CLAUDE.md or AGENTS.md:

Use the lil-memory tools on your own: recall my preferences and the current project when a task
starts, and remember preferences, corrections and decisions as soon as I state them.

You can also ask directly, in plain words:

Edits you make in Obsidian show up in searches within about 2 seconds. To keep the vault somewhere else, pass --vault PATH or set $LIL_MEMORY_VAULT.


lil memory is MIT licensed.