Persistent semantic memory for AI agents — works in any Lua 5.1+ environment

$ luarocks install luamemo

luamemo is a persistent semantic memory store for AI agents
and conversational apps. It works in any Lua 5.1+ runtime:
plain Lua, LuaJIT, Lapis / OpenResty, CLI scripts, background
workers — no framework dependency.

Features:
* Hybrid vector + full-text retrieval over PostgreSQL.
* Two backends: pgvector (recommended) or pure brute-force REAL[]
(zero extension dependency).
* Pluggable embedders: Ollama, OpenAI, Voyage, Cohere, DeepSeek,
Anthropic, generic HTTP, TEI (Hugging Face text-embeddings-
inference), and a built-in pure-Lua "hash" embedder with no
external dependencies.
* Pluggable rerankers (Ollama, OpenAI, cross-encoder via TEI).
* Background summarizer + decay/importance scoring.
* Knowledge-graph adjunct (lm_kg_facts) for currently-valid
facts with temporal validity.
* Encrypted secrets management (lm_secrets): AES-256-CBC storage
for API keys/tokens with execute_with_secret — substitutes
{secret} server-side without ever returning the raw value.
* MCP server bundled (mcp/server.lua) so models can read/write
memory and execute secrets directly through Model Context Protocol.
* `memo init` wizard: probes host (GPU, Docker, Ollama, RAM),
asks two questions, and prints a setup({}) snippet for the
best-fit embedder.
* `memo doctor`: corpus health report with truncation counts,
p95 row size, and backend scale warnings.

Benchmarks (R@10, LongMemEval n=500):
* hash embedder: 81.5%
* nomic-embed-text: 83.0%
* bge-m3 via TEI (GPU): 97.8%

Versions

0.2.0-18 hours ago0 downloads

Dependencies

lapis >= 1.8.0
lua >= 5.1
lua-cjson >= 2.1.0
lua-openssl >= 0.8.0
LuaSocket >= 3.0
pgmoon >= 1.13

Manifests