Phase 5: Add Neo4j graph database integration

- Add neo4j_manager.py with full graph operations support
- Data sync: projects, entities, relations to Neo4j
- Graph queries: shortest path, all paths, neighbors, common neighbors
- Graph algorithms: centrality analysis, community detection
- Add 11 new API endpoints for graph operations
- Update docker-compose.yml with Neo4j service
- Update requirements.txt with neo4j driver
This commit is contained in:
OpenClaw Bot
2026-02-20 12:04:41 +08:00
parent 44c07b9984
commit 403e1cde28
6 changed files with 1328 additions and 4 deletions

View File

@@ -8,6 +8,30 @@ services:
environment:
- DEEPGRAM_API_KEY=${DEEPGRAM_API_KEY}
- KIMI_API_KEY=${KIMI_API_KEY}
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-insightflow}
volumes:
- ./data:/app/data
restart: unless-stopped
depends_on:
- neo4j
neo4j:
image: neo4j:5.15-community
ports:
- "7474:7474" # HTTP
- "7687:7687" # Bolt
environment:
- NEO4J_AUTH=neo4j/${NEO4J_PASSWORD:-insightflow}
- NEO4J_PLUGINS=["apoc", "gds"]
- NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
- NEO4J_dbms_security_procedures_allowlist=apoc.*,gds.*
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
restart: unless-stopped
volumes:
neo4j_data:
neo4j_logs: