memorg vs mem0: an external memory layer for stateful LLM conversations
memorg is an external memory layer for LLMs with pluggable SQLite/Postgres storage and vector search. Sessions, conversations, and semantic recall — usable as a library or via the bundled CLI.
$ pip install memorg memorg is a Rust-backed drop-in for
mem0. Same API, faster hot paths.
Install: pip install memorg.
Pluggable storage: SQLite (default) or Postgres.
memorg vs mem0: the facts
Pluggable storage: SQLite (default) or Postgres.
Defaults to a hosted managed service; self-host requires extra config.
USearch vector search built in (no external vector DB).
Often requires a separate vector DB.
CLI + library; no required cloud account.
Cloud-first; CLI exists but is a wrapper around the API.
Keyed memory: `(user_id, agent_id, session_id)`.
Similar keying model.
MIT licensed.
Apache 2.0.
When to use memorg
- You want a self-hosted memory layer without a vendor lock-in.
- You want SQLite/Postgres as the only dependency.
When NOT to use memorg
- You want the mem0 managed cloud offering.
Frequently asked questions
Does memorg work with any LLM?
Yes — memorg is storage and recall; the LLM is your choice. The example uses an OpenAI-compatible client but you can plug in any embedding model.
How does memorg handle memory provenance?
Each memory entry is stored with the source (turn id, user, agent). Provenance tracking is on the roadmap.