| #!/bin/bash |
|
|
| echo "π Graph-Driven Agent Demo" |
| echo "=========================" |
| echo "" |
|
|
| |
| GREEN='\033[0;32m' |
| BLUE='\033[0;34m' |
| YELLOW='\033[1;33m' |
| NC='\033[0m' |
|
|
| echo -e "${BLUE}Step 1: Starting services...${NC}" |
| docker-compose up -d |
| sleep 10 |
|
|
| echo -e "${BLUE}Step 2: Checking health...${NC}" |
| echo "Checking Neo4j..." |
| 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" |
|
|
| echo "Checking PostgreSQL..." |
| docker-compose exec postgres pg_isready -U postgres > /dev/null 2>&1 && echo "β
PostgreSQL: Healthy" || echo "β PostgreSQL: Unhealthy" |
|
|
| echo "Checking MCP Server..." |
| curl -s http://localhost:8000/health > /dev/null && echo "β
MCP Server: Healthy" || echo "β MCP Server: Unhealthy" |
|
|
| echo "Checking Frontend..." |
| curl -s http://localhost:3000 > /dev/null && echo "β
Frontend: Healthy" || echo "β Frontend: Unhealthy" |
|
|
| echo "Checking Agent..." |
| docker-compose ps agent | grep -q "Up" && echo "β
Agent: Running" || echo "β Agent: Not running" |
|
|
| echo -e "${BLUE}Step 3: Seeding demo workflow...${NC}" |
| docker-compose exec mcp python /app/ops/scripts/seed.py |
|
|
| echo -e "${GREEN}β
Demo environment ready!${NC}" |
| echo "" |
| echo "π Demo Script:" |
| echo "---------------" |
| echo "1. Open http://localhost:3000 in your browser" |
| echo "" |
| echo "2. In the chat, type: 'Show me customers who have ordered more than \$100'" |
| echo "" |
| echo "3. You'll see:" |
| echo " - 'Workflow created!' message" |
| echo " - Graph visualization showing workflow nodes" |
| echo " - Status showing 'Agent thinking...'" |
| echo "" |
| echo "4. The agent will:" |
| echo " - Pause for 5 minutes (or configured duration)" |
| echo " - Discover PostgreSQL schema" |
| echo " - Generate SQL query" |
| echo " - Execute and return results" |
| echo "" |
| echo "5. During the pause, you can:" |
| echo " - Open Neo4j Browser: http://localhost:7474" |
| echo " - Login: neo4j/password" |
| echo " - Run: MATCH (i:Instruction {status: 'pending'}) RETURN i" |
| echo " - Edit parameters to change the query" |
| echo "" |
| echo "6. After execution completes:" |
| echo " - Results appear in a table" |
| echo " - Generated SQL is shown" |
| echo " - Graph shows all nodes as green (complete)" |
| echo "" |
| echo -e "${YELLOW}Optional: Edit instruction during pause${NC}" |
| echo "docker-compose exec neo4j cypher-shell -u neo4j -p password \\" |
| echo " \"MATCH (i:Instruction {type: 'generate_sql', status: 'pending'}) \\" |
| echo " SET i.parameters = '{\\\"question\\\": \\\"Count all orders\\\"}'\"" |
| echo "" |
| echo -e "${GREEN}Demo is running! Press Ctrl+C to stop.${NC}" |
|
|
| |
| docker-compose logs -f agent |
|
|