Skip to main content
Memgraph is an in-memory graph database that uses the Bolt protocol. It provides fast graph operations and is suitable for knowledge graph storage and relationship reasoning.
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:
Configure in Python:
Or via environment variables:

Important Notes

Import and call register() from the adapter package before using Memgraph with Cognee. This registers the adapter with Cognee’s graph provider system.
  1. Connection Errors: Ensure Memgraph is running and accessible at the specified Bolt URL (default port 7687)
  2. Driver: The adapter uses the neo4j driver for Bolt protocol support; ensure it is installed with Cognee or the community package
  3. 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 with cognee.visualize_graph()

Resources

Adapter Source

GitHub repository

README & Example

Full usage example and configuration

Memgraph Docs

Memgraph database documentation

Graph Stores

Official graph providers

Community Overview

All community integrations

Setup Overview

Configuration guide