-
Notifications
You must be signed in to change notification settings - Fork 531
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Issue Description
Remove the NetworkX graph database adapter and its associated dependencies from Cognee to streamline the codebase, reduce dependency overhead, and focus on production-ready graph database providers. NetworkX is primarily used for in-memory graph analysis and is not suitable for production graph storage, making it unnecessary for Cognee's core functionality.
Motivation
Why Remove NetworkX?
1. Production Readiness
- NetworkX is an in-memory graph analysis library, not a persistent graph database
- Lacks scalability for large knowledge graphs
- Not suitable for production workloads with multiple users or large datasets
Current NetworkX Usage Analysis
Direct Dependencies:
# pyproject.toml
"networkx>=3.4.2,<4" # Main dependency to remove
Code Integration Points:
- Graph database adapter implementation
- Visualization components
- Test suites and examples
- Configuration enums and factory methods
Technical Implementation Plan
Step 1: Dependency Removal
1.1 Remove Package Dependencies
1.2 Update Optional Dependencies
Step 2: Adapter Removal
2.1 Delete NetworkX Adapter Implementation
2.2 Remove NetworkX Imports
File: cognee/infrastructure/databases/graph/get_graph_engine.py
Step 3: Configuration and Data Model Updates
3.1 Update Data Models
3.2 Update Graph Engine Factory
3.3 Update Configuration Documentation
Update docstrings and configuration files that reference NetworkX as a supported provider.
Step 4: Visualization Refactoring
4.1 Remove parts of the logic where networkX is used for visualization or limit it so it is optional
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed