Timothy Eastridge
commit step 10
ead5455
#!/bin/bash
echo "πŸš€ Graph-Driven Agent Demo"
echo "========================="
echo ""
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
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}"
# Keep running
docker-compose logs -f agent