manufacturing-graphrag
Plataforma de Inteligencia de Trazabilidad de Fabricación
Plataforma de IA agéntica impulsada por GraphRAG para la trazabilidad de fabricación utilizando Neo4j, Amazon Bedrock y MCP.
Arquitectura
┌─────────────────────────────────────────────────────────────────────┐
│ INGESTION & ENRICHMENT LAYER │
│ Connectors → Chunking → Embeddings → Entity Extraction → │
│ Entity Resolution → Graph Construction │
└──────────────────────────┬──────────────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────────────┐
│ KNOWLEDGE GRAPH (Neo4j) │
│ Product → Requirement → Component → TestCase → TestRun → │
│ Defect → ChangeRequest │
└──────────────────────────┬──────────────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────────────┐
│ RETRIEVAL LAYER │
│ VectorRetriever │ GraphRAGRetriever │ NL2CypherRetriever │ Hybrid │
└──────────────────────────┬──────────────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────────────┐
│ AGENT LAYER │
│ LangGraph Agent (plan→retrieve→reason→validate→respond) │
│ Strands Agent (tool-calling with 5 specialized graph tools) │
└──────────────────────────┬──────────────────────────────────────────┘
│
┌──────────────────────────▼──────────────────────────────────────────┐
│ INTERFACE LAYER │
│ FastAPI REST │ MCP Server (Claude Desktop / Cursor compatible) │
└─────────────────────────────────────────────────────────────────────┘Related MCP server: RAG MCP Server
Inicio Rápido
1. Requisitos previos
Neo4j 5.x (con el plugin APOC)
Python 3.11+
Credenciales de AWS con acceso a Bedrock (Claude 3.5 Sonnet + Titan Embed v2)
2. Configuración
cd manufacturing-graphrag
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txt
python -m spacy download en_core_web_sm
copy .env.example .env # Edit with your credentials3. Iniciar Neo4j (Docker)
docker-compose up neo4j -d4. Poblar el grafo de conocimiento
set PYTHONPATH=src
python scripts/seed_data.py5. Iniciar la plataforma
# API server
python main.py api
# MCP server (for Claude Desktop)
python main.py mcp
# Both
python main.py all6. Ingerir documentos
python scripts/ingest.py path/to/spec.pdf path/to/requirements.csvEndpoints de API
Método | Endpoint | Descripción |
GET |
| Comprobación de salud |
GET |
| Conteos de nodos por etiqueta |
POST |
| Subir e ingerir un documento |
POST |
| Ingerir un registro de API estructurado |
POST |
| Consulta híbrida GraphRAG |
POST |
| Agente de razonamiento LangGraph |
POST |
| Agente de llamada a herramientas Strands |
GET |
| Cadena completa de trazabilidad de defectos |
GET |
| Resumen de trazabilidad de producto |
Consultas de ejemplo
# Hybrid GraphRAG query
curl -X POST http://localhost:8000/query \
-H "Content-Type: application/json" \
-d '{"question": "What components are affected by the thermal runaway defect?"}'
# LangGraph agent — multi-step reasoning
curl -X POST http://localhost:8000/agent/langgraph \
-d '{"question": "Trace the full impact chain of DEF-001 and identify all change requests needed"}'
# Strands agent — tool-calling
curl -X POST http://localhost:8000/agent/strands \
-d '{"question": "Which critical defects are blocking the EV BMS release?"}'
# Defect traceability
curl http://localhost:8000/traceability/defect/DEF-002Integración MCP (Claude Desktop)
Copia el contenido de config/claude_desktop_mcp.json en tu claude_desktop_config.json de Claude Desktop.
Herramientas MCP disponibles:
ask_manufacturing_ai— Q&A híbrido de GraphRAGsemantic_search— búsqueda de similitud vectorialgraph_trace— recuperación por recorrido de grafonatural_language_to_cypher— NL2Cypherget_defect_chain— trazabilidad completa de defectosget_requirement_traceability— cobertura de requisitosproduct_health_dashboard— métricas de producto
Esquema del grafo de conocimiento
(Product)-[:HAS_REQUIREMENT]->(Requirement)
(Component)-[:IMPLEMENTS]->(Requirement)
(TestCase)-[:VALIDATES]->(Requirement)
(TestRun)-[:INSTANCE_OF]->(TestCase)
(TestRun)-[:FOUND_IN]->(Defect)
(Defect)-[:AFFECTS]->(Component)
(Defect)-[:TRIGGERS_CHANGE]->(ChangeRequest)
(ChangeRequest)-[:MODIFIES]->(Component)
(Document)-[:CONTAINS_CHUNK]->(Chunk)
(Chunk)-[:MENTIONS]->(any entity)Ejecución de pruebas
set PYTHONPATH=src
pytest tests/ -vThis server cannot be deployed
Maintenance
Related MCP Connectors
Answer questions using your semantic layer and company knowledge graph.
Knowledge graph ingestion, entity search, ontology analysis, and CoSync scoring.
Shared semantic graph for AI reviews, classification and structured memory across AI assistants.
AI knowledge graph for architecture, portfolio, and digital strategy management.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables storage and retrieval of knowledge in a graph database format, allowing users to create, update, search, and delete entities and relationships in a Neo4j-powered knowledge graph through natural language.5-
- AlicenseCqualityDmaintenanceCombines a knowledge graph with RAG (Retrieval-Augmented Generation) capabilities for semantic code indexing and search. Enables creating entity relationships, managing observations, and performing semantic searches across indexed codebases.13MIT
- FlicenseNot gradedqualityCmaintenanceTransforms code repositories and development documentation into a queryable Neo4j knowledge graph, enabling AI assistants to perform intelligent code analysis, dependency mapping, impact assessment, and automated documentation generation across 15+ programming languages.7-
- FlicenseNot gradedqualityDmaintenanceMCP server for manufacturing defect investigation using knowledge graphs and graph analytics. Enables LLM agents to retrieve context, find similar cases, and generate investigation reports from manufacturing data.-