$ luarocks install lapis-memory lapis-memory is a persistent semantic memory store for AI agents
and conversational apps running on Lapis / OpenResty.
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, 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.
* MCP server bundled (mcp/server.lua) so models can read/write
memory directly through Model Context Protocol.
Benchmarks (R@10):
* LoCoMo: 82.5% (hash) / 86.6% (Ollama bge-m3).
* Salesforce ConvoMem: hash R@1 81.6% / MRR 0.885;
Ollama R@1 88.3% / MRR 0.921.