FalkorDB graph store plugin for Mem0
Project description
mem0-falkordb
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")
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_allsimply 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:
GraphStoreFactory.provider_to_classgets a new"falkordb"entryGraphStoreConfigis patched to acceptFalkorDBConfig- A
MemoryGraphclass 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
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mem0_falkordb-0.2.0.tar.gz.
File metadata
- Download URL: mem0_falkordb-0.2.0.tar.gz
- Upload date:
- Size: 127.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cca7ecb6d18e49bf0d35b5b03bcd0ea9be8e2f5c09e3fd90233268aa2d9b3c3
|
|
| MD5 |
9db50c385f3e4bf4580bfdb84afdaf8a
|
|
| BLAKE2b-256 |
864bf9e87024822dfaa09af825d7208b77356bc9321d0b8c456c6b538d611aa4
|
Provenance
The following attestation bundles were made for mem0_falkordb-0.2.0.tar.gz:
Publisher:
publish.yml on FalkorDB/mem0-falkordb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mem0_falkordb-0.2.0.tar.gz -
Subject digest:
9cca7ecb6d18e49bf0d35b5b03bcd0ea9be8e2f5c09e3fd90233268aa2d9b3c3 - Sigstore transparency entry: 964567464
- Sigstore integration time:
-
Permalink:
FalkorDB/mem0-falkordb@837e78d8953bd68dcd0c8f7c050bad0306a31b15 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/FalkorDB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@837e78d8953bd68dcd0c8f7c050bad0306a31b15 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mem0_falkordb-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mem0_falkordb-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d957270a21ae9d7b0597c30c1b3afae4d22e19e085d069d6544968f2c946d7
|
|
| MD5 |
cec20e8c0797173a7e81861e4d897a6f
|
|
| BLAKE2b-256 |
4ada9e52465646ef0f5a65fb58348f55a940905a181198d31fb650e72935fbe7
|
Provenance
The following attestation bundles were made for mem0_falkordb-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on FalkorDB/mem0-falkordb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mem0_falkordb-0.2.0-py3-none-any.whl -
Subject digest:
e2d957270a21ae9d7b0597c30c1b3afae4d22e19e085d069d6544968f2c946d7 - Sigstore transparency entry: 964567540
- Sigstore integration time:
-
Permalink:
FalkorDB/mem0-falkordb@837e78d8953bd68dcd0c8f7c050bad0306a31b15 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/FalkorDB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@837e78d8953bd68dcd0c8f7c050bad0306a31b15 -
Trigger Event:
release
-
Statement type: