Skip to main content

license PyPI version Codecov Forum Discord

mem0-falkordb

Try Free

FalkorDB graph store plugin for Mem0. Adds FalkorDB as a graph memory backend without modifying any Mem0 source code.

Installation

pip install mem0-falkordb

You also need Mem0 installed separately:

pip install mem0ai

Quick Start

from mem0_falkordb import register
register()

from mem0 import Memory

config = {
    "graph_store": {
        "provider": "falkordb",
        "config": {
            "host": "localhost",
            "port": 6379,
            "database": "mem0",
        },
    },
    # Add your LLM and embedder config as usual
    "llm": {
        "provider": "openai",
        "config": {"model": "gpt-4o-mini"},
    },
}

m = Memory.from_config(config)
m.add("I love pizza", user_id="alice")
results = m.search("what does alice like?", user_id="alice")
image

Demo

See the demo/ directory for a comprehensive multi-user demonstration showcasing:

  • Graph-structured memory — relationships between entities, not just flat facts
  • Per-user graph isolation — each user gets their own FalkorDB graph
  • Context-aware retrieval — semantic search with vector embeddings
  • Memory evolution — updates and conflict resolution
  • Visual inspection — see the actual graph structure
docker run --rm -p 6379:6379 falkordb/falkordb:latest
cd demo
uv sync
export OPENAI_API_KEY='your-key-here'
uv run python demo.py

See demo/README.md for complete instructions.

Configuration

Parameter Type Default Description
host str localhost FalkorDB server host
port int 6379 FalkorDB server port
database str mem0 Graph name prefix (each user gets {database}_{user_id})
username str None Authentication username (optional)
password str None Authentication password (optional)
base_label bool True Use __Entity__ base label

Per-User Graph Isolation

Each user automatically gets their own isolated FalkorDB graph (e.g. mem0_alice, mem0_bob). This leverages FalkorDB's native multi-graph support and provides:

  • Natural data isolation — no user_id filtering needed in Cypher queries
  • Simpler, faster queries — no WHERE clauses on user_id
  • Easy cleanup — delete_all simply drops the user's graph

Running FalkorDB

Using Docker:

docker run --rm -p 6379:6379 falkordb/falkordb

How It Works

This plugin uses Python's runtime patching to register FalkorDB into Mem0's existing factory system:

  1. GraphStoreFactory.provider_to_class gets a new "falkordb" entry
  2. GraphStoreConfig is patched to accept FalkorDBConfig
  3. A MemoryGraph class translates Mem0's graph operations to FalkorDB-compatible Cypher

Key Cypher Translations

Neo4j FalkorDB
elementId(n) id(n)
vector.similarity.cosine() db.idx.vector.queryNodes() procedure
db.create.setNodeVectorProperty() SET n.embedding = vecf32($vec)
CALL { ... UNION ... } subqueries Separate outgoing + incoming queries

Development

git clone <repo>
cd mem0-falkordb
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

Metadata

Release files for mem0-falkordb 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mem0-falkordb 0.4.1
File Size Uploaded Provenance
mem0_falkordb-0.4.1.tar.gz 181.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mem0-falkordb 0.4.1
File Interpreter ABI Platform
mem0_falkordb-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 194.1 kB

Release files / mem0_falkordb-0.4.1.tar.gz

Download URL mem0_falkordb-0.4.1.tar.gz
Size 181.4 kB
Tags Source
SHA-256 checksum
How to use checksums
90e57292e377d98914695504ed3d472ce51c6217b7e62a712f1d59332a71c6df
BLAKE2b-256 checksum
How to use checksums
6acb7b564503f75fc36ba0c3f9d01720810f7070fc4c48832aed26b1c1dff800
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Release files / mem0_falkordb-0.4.1-py3-none-any.whl

Download URL mem0_falkordb-0.4.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ffff6e4efb46274d5c4dbce0612b3cfba20c1e59f04c10e7a6a70c716c9808e
BLAKE2b-256 checksum
How to use checksums
c80c49d232d669fa94696f93abc9f668628918652dac3bf8def5057132d2ebeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Security for mem0-falkordb 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mem0_falkordb-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page