Cognee can use Memgraph as a graph store backend through this community-maintained adapter.
Installation
This adapter is a separate package from core Cognee. Before installing, complete the Cognee installation and ensure your environment is configured with LLM and embedding providers. After that, install the adapter package:Requirements
- Python 3.10 to 3.13
- Memgraph database instance
- neo4j driver (for Bolt protocol support)
Configuration
Run a local Memgraph instance:Important Notes
Adapter Registration
Adapter Registration
Import and call
register() from the adapter package before using Memgraph with Cognee. This registers the adapter with Cognee’s graph provider system.Troubleshooting
Troubleshooting
- Connection Errors: Ensure Memgraph is running and accessible at the specified Bolt URL (default port 7687)
- Driver: The adapter uses the neo4j driver for Bolt protocol support; ensure it is installed with Cognee or the community package
- Authentication: Use the same credentials you configured for your Memgraph instance
Features
- Full support for Memgraph’s property graph model
- Optimized queries for graph operations
- Async/await support and transaction support
- Graph completion search and Chain of Thought (COT) reasoning
- Direct graph data access via
get_graph_engine()and HTML visualization withcognee.visualize_graph()