Spaces:
No application file
No application file
File size: 2,506 Bytes
86cbe3c 28e46ad 9930ba9 28e46ad 9930ba9 28e46ad 9930ba9 28e46ad 9930ba9 28e46ad 9930ba9 28e46ad 86cbe3c 28e46ad f831e98 28e46ad a0eb181 28e46ad a0eb181 28e46ad f831e98 28e46ad f831e98 28e46ad | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | .PHONY: up down logs seed seed-db ingest clean health test demo
# Start all services
up:
docker-compose up -d
@echo "Waiting for services to be healthy..."
@sleep 10
@make health
# Stop all services
down:
docker-compose down
# View logs
logs:
docker-compose logs -f
# Seed initial data
seed:
docker-compose exec mcp python /app/ops/scripts/seed.py
# Seed the SQLite databases from scratch
seed-db:
python ops/scripts/generate_sample_databases.py
# Ingest SQLite database schemas into Neo4j
ingest:
docker-compose run --rm mcp python /app/ops/scripts/ingest.py
# Clean everything (including volumes)
clean:
docker-compose down -v
docker system prune -f
@if [ -d "neo4j/data" ]; then rm -rf neo4j/data; fi
# Health check all services
health:
@echo "Checking service health..."
@docker-compose exec neo4j cypher-shell -u neo4j -p password "MATCH (n) RETURN count(n) LIMIT 1" > /dev/null 2>&1 && echo "β
Neo4j: Healthy" || echo "β Neo4j: Unhealthy"
@curl -s http://localhost:8000/health > /dev/null && echo "β
MCP Server: Healthy" || echo "β MCP Server: Unhealthy"
@curl -s http://localhost:8501 > /dev/null && echo "β
Streamlit: Healthy" || echo "β Streamlit: Unhealthy"
@docker-compose ps agent | grep -q "Up" && echo "β
Agent: Running" || echo "β Agent: Not running"
# Run integration test
test: health
@echo "Running integration test..."
@make seed
@sleep 5
@echo "Check http://localhost:8501 and Neo4j Browser at http://localhost:7474"
# Demo workflow
demo:
@echo "Starting demo workflow..."
@make clean
@make up
@make seed
@echo ""
@echo "π Demo Ready!"
@echo "1. Open http://localhost:8501 in your browser (Main Chat Interface)"
@echo "2. Ask a question like: 'Show me all customers who have placed orders'"
@echo "3. Watch the agent process through the workflow"
@echo "4. Check Neo4j Browser at http://localhost:7474 (neo4j/password)"
@echo ""
@echo "During 5-minute pauses, you can edit instructions in Neo4j Browser:"
@echo "MATCH (i:Instruction {status: 'pending'}) SET i.parameters = '{\"question\": \"new question\"}'"
# Build all services
build:
docker-compose build
# Restart specific service
restart-agent:
docker-compose restart agent
restart-mcp:
docker-compose restart mcp
restart-streamlit:
docker-compose restart streamlit
# Debug commands
debug-agent:
docker-compose logs agent
debug-mcp:
docker-compose logs mcp
debug-streamlit:
docker-compose logs streamlit
# Quick status check
status:
docker-compose ps |