{"id":45013008,"url":"https://github.com/falkordb/mem0-falkordb","last_synced_at":"2026-02-25T21:00:53.934Z","repository":{"id":339274570,"uuid":"1161225910","full_name":"FalkorDB/mem0-falkordb","owner":"FalkorDB","description":"FalkorDB graph store plugin for Mem0","archived":false,"fork":false,"pushed_at":"2026-02-23T09:31:56.000Z","size":384,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T00:41:53.820Z","etag":null,"topics":["agentic-memory","falkordb","long-term-memory","mem0"],"latest_commit_sha":null,"homepage":"https://www.falkordb.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FalkorDB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-18T21:49:10.000Z","updated_at":"2026-02-23T17:01:56.000Z","dependencies_parsed_at":"2026-02-22T18:00:35.738Z","dependency_job_id":null,"html_url":"https://github.com/FalkorDB/mem0-falkordb","commit_stats":null,"previous_names":["falkordb/mem0-falkordb"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/FalkorDB/mem0-falkordb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FalkorDB%2Fmem0-falkordb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FalkorDB%2Fmem0-falkordb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FalkorDB%2Fmem0-falkordb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FalkorDB%2Fmem0-falkordb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FalkorDB","download_url":"https://codeload.github.com/FalkorDB/mem0-falkordb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FalkorDB%2Fmem0-falkordb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29797889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T19:56:48.334Z","status":"ssl_error","status_checked_at":"2026-02-24T19:55:43.372Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-memory","falkordb","long-term-memory","mem0"],"created_at":"2026-02-19T00:14:25.338Z","updated_at":"2026-02-24T20:01:42.771Z","avatar_url":"https://github.com/FalkorDB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](https://img.shields.io/github/license/falkordb/mem0-falkordb.svg)](https://github.com/falkordb/mem0-falkordb)\n[![PyPI version](https://badge.fury.io/py/mem0-falkordb.svg)](https://badge.fury.io/py/mem0-falkordb)\n[![Codecov](https://codecov.io/gh/falkordb/mem0-falkordb/branch/main/graph/badge.svg)](https://codecov.io/gh/falkordb/mem0-falkordb)\n[![Forum](https://img.shields.io/badge/Forum-falkordb-blue)](https://github.com/orgs/FalkorDB/discussions)\n[![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.gg/ErBEqN9E)\n\n# mem0-falkordb\n\n[![Try Free](https://img.shields.io/badge/Try%20Free-FalkorDB%20Cloud-FF8101?labelColor=FDE900\u0026style=for-the-badge\u0026link=https://app.falkordb.cloud)](https://app.falkordb.cloud)\n\nFalkorDB graph store plugin for [Mem0](https://github.com/mem0ai/mem0). Adds FalkorDB as a graph memory backend **without modifying any Mem0 source code**.\n\n## Installation\n\n```bash\npip install mem0-falkordb\n```\n\nYou also need Mem0 installed separately:\n\n```bash\npip install mem0ai\n```\n\n## Quick Start\n\n```python\nfrom mem0_falkordb import register\nregister()\n\nfrom mem0 import Memory\n\nconfig = {\n    \"graph_store\": {\n        \"provider\": \"falkordb\",\n        \"config\": {\n            \"host\": \"localhost\",\n            \"port\": 6379,\n            \"database\": \"mem0\",\n        },\n    },\n    # Add your LLM and embedder config as usual\n    \"llm\": {\n        \"provider\": \"openai\",\n        \"config\": {\"model\": \"gpt-4o-mini\"},\n    },\n}\n\nm = Memory.from_config(config)\nm.add(\"I love pizza\", user_id=\"alice\")\nresults = m.search(\"what does alice like?\", user_id=\"alice\")\n```\n\n\u003cimg width=\"1827\" height=\"936\" alt=\"image\" src=\"https://github.com/user-attachments/assets/857c1112-0688-4025-ace0-ac63f195a48a\" /\u003e\n\n## Demo\n\nSee the [`demo/`](demo/) directory for a comprehensive multi-user demonstration showcasing:\n- **Graph-structured memory** — relationships between entities, not just flat facts\n- **Per-user graph isolation** — each user gets their own FalkorDB graph\n- **Context-aware retrieval** — semantic search with vector embeddings\n- **Memory evolution** — updates and conflict resolution\n- **Visual inspection** — see the actual graph structure\n\n```bash\ndocker run --rm -p 6379:6379 falkordb/falkordb:latest\ncd demo\nuv sync\nexport OPENAI_API_KEY='your-key-here'\nuv run python demo.py\n```\n\nSee [demo/README.md](demo/README.md) for complete instructions.\n\n## Configuration\n\n| Parameter    | Type   | Default     | Description                                |\n|-------------|--------|-------------|--------------------------------------------|\n| `host`      | str    | `localhost` | FalkorDB server host                       |\n| `port`      | int    | `6379`      | FalkorDB server port                       |\n| `database`  | str    | `mem0`      | Graph name prefix (each user gets `{database}_{user_id}`) |\n| `username`  | str    | `None`      | Authentication username (optional)         |\n| `password`  | str    | `None`      | Authentication password (optional)         |\n| `base_label`| bool   | `True`      | Use `__Entity__` base label                |\n\n### Per-User Graph Isolation\n\nEach user automatically gets their own isolated FalkorDB graph (e.g. `mem0_alice`, `mem0_bob`). This leverages FalkorDB's native multi-graph support and provides:\n\n- **Natural data isolation** — no user_id filtering needed in Cypher queries\n- **Simpler, faster queries** — no WHERE clauses on user_id\n- **Easy cleanup** — `delete_all` simply drops the user's graph\n\n## Running FalkorDB\n\nUsing Docker:\n\n```bash\ndocker run --rm -p 6379:6379 falkordb/falkordb\n```\n\n## How It Works\n\nThis plugin uses Python's runtime patching to register FalkorDB into Mem0's existing factory system:\n\n1. `GraphStoreFactory.provider_to_class` gets a new `\"falkordb\"` entry\n2. `GraphStoreConfig` is patched to accept `FalkorDBConfig`\n3. A `MemoryGraph` class translates Mem0's graph operations to FalkorDB-compatible Cypher\n\n### Key Cypher Translations\n\n| Neo4j                                    | FalkorDB                                          |\n|------------------------------------------|---------------------------------------------------|\n| `elementId(n)`                           | `id(n)`                                           |\n| `vector.similarity.cosine()`             | `db.idx.vector.queryNodes()` procedure            |\n| `db.create.setNodeVectorProperty()`      | `SET n.embedding = vecf32($vec)`                  |\n| `CALL { ... UNION ... }` subqueries      | Separate outgoing + incoming queries              |\n\n## Development\n\n```bash\ngit clone \u003crepo\u003e\ncd mem0-falkordb\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -e \".[dev]\"\npytest\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalkordb%2Fmem0-falkordb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalkordb%2Fmem0-falkordb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalkordb%2Fmem0-falkordb/lists"}