LuaRocks.org had a security incident in September 2026. Read the incident report.

luamemo

Memory layer for AI agents

$ luarocks install luamemo

luamemo gives AI coding agents a memory that lives on your machine. The
agent writes decisions, facts and plans as it works and finds them again
in later sessions, through the Model Context Protocol: Claude Code,
VS Code (Copilot agent mode), Cursor, Claude Desktop and other MCP
clients use it — every client with the same entry, `memo mcp`. The
`memo` CLI sets it up (`memo calibrate` probes the machine, picks and
configures an embedder, writes the client entries) and keeps the
decisions that belong to people: settings, backups, which devices join a
team's memory and which knowledge the team shares.

No database server, no Docker, no account: each project's memory is one
SQLite file in ~/.local/share/luamemo. Runs on LuaJIT; it reaches two
system libraries, libsqlite3 and libsodium, through the FFI, and the
`memo` command needs bash and jq (Linux, macOS, Windows through WSL).
https endpoints (OpenAI, Voyage, Cohere ...) also need luasec.

* MCP server (`memo mcp`, 27 tools; MCP 2026-07-28 and earlier
revisions): write, search (with the knowledge-graph facts the query
is about), the session brief, recent, update, delete (bulk deletes
behind a preview + confirmation token), session promotion,
maintenance, feedback, the learned reranker, the codebase map, the
secrets vault — and its usage rules, sent to every client.
* Hybrid search, exact at every size: every vector in scope is scored,
plus FTS5 full-text ranking, blended and weighted by importance, age
and tier; multi-scope search, time and metadata filters, rerankers.
* Embedders: an in-process GGUF model (EmbeddingGemma via llama.cpp,
no service; `memo gguf install` downloads a prebuilt runtime for
Linux x86_64 and macOS arm64, other machines build it), Ollama,
TEI, OpenAI / Voyage / Cohere / DeepSeek / Anthropic / any
OpenAI-compatible endpoint, any HTTP API through the generic
adapter, and a pure-Lua hash embedder.
* Codebase index (`memo index`): files, symbols, dependencies and
commit diffs, so an agent finds where code lives before grepping.
* Claude Code integration (`memo agent install`, done by `memo
calibrate` unless you pass --no-agent): hooks that open each
session with the project's brief, learn from what you say
(corrections and praise adjust the memories they concern;
standing rules like "always ..." are kept as decisions), keep
file-based memory out of the project and,
optionally, save the conversation before a compaction; Claude's
existing memory notes are moved into luamemo.
* Learns from use (opt-in, MEMO_FEEDBACK_ENABLED: the usage log keeps
what was asked): corrections, praise and retrieval misses train a
per-scope reranker, promoted only when it beats the current one on
held-out data.
* Keeps itself tidy (on by default, a silent background `memo
maintain`): near-duplicates are folded into summaries, archived,
reviewed after a grace period and then deleted; every deletion is
logged. `memo config set MEMO_MAINTENANCE_BACKGROUND false` and
`MEMO_AUTO_DIGEST_ENABLED false` turn it off.
* Secrets vault (libsodium): agents use keys via secret_execute
without ever seeing them.
* Team memory on your LAN / VPN: an org central, admin-reviewed
knowledge, devices paired with a key and a spoken code.
* `memo doctor`, `memo config` (every setting checked before it is
written), `memo backup`, `memo export` / `memo import`, `memo
usage` (how memory is really used), `memo eval` (retrieval
benchmarks, from an install).

Versions

0.5.3-13 days ago4 downloads
0.5.2-17 days ago1 download
0.5.1-126 days ago3 downloads
0.5.0-126 days ago1 download
0.4.1-1119 days ago8 downloads
0.4.0-1121 days ago3 downloads
0.3.6-1161 days ago3 downloads
0.3.5-1168 days ago(revision: 2)5 downloads
0.3.4-1171 days ago5 downloads
0.3.3-1171 days ago3 downloads
0.3.2-1173 days ago2 downloads
0.3.1-1181 days ago4 downloads
0.3.0-1184 days ago1 download
0.2.9-1185 days ago1 download
0.2.8-1185 days ago1 download
0.2.6-1187 days ago4 downloads
0.2.5-2188 days ago2 downloads
0.2.5-1188 days ago2 downloads
0.2.3-1190 days ago3 downloads
0.2.2-1190 days ago3 downloads
0.2.1-1190 days ago3 downloads
0.2.0-1190 days ago(revision: 2)3 downloads

Dependencies

lua ~> 5.1
LuaSocket >= 3.0

Manifests