| | |
| | |
| |
|
| | Write-Host "π Graph-Driven Agent Demo" -ForegroundColor Green |
| | Write-Host "=========================" -ForegroundColor Green |
| | Write-Host "" |
| |
|
| | Write-Host "Step 1: Starting services..." -ForegroundColor Blue |
| | docker-compose up -d |
| | Start-Sleep 10 |
| |
|
| | Write-Host "Step 2: Checking health..." -ForegroundColor Blue |
| |
|
| | Write-Host "Checking Neo4j..." -ForegroundColor Cyan |
| | docker-compose exec neo4j cypher-shell -u neo4j -p password "MATCH (n) RETURN count(n) LIMIT 1" 2>$null |
| | if ($LASTEXITCODE -eq 0) { |
| | Write-Host "β
Neo4j: Healthy" -ForegroundColor Green |
| | } else { |
| | Write-Host "β Neo4j: Unhealthy" -ForegroundColor Red |
| | } |
| |
|
| | Write-Host "Checking PostgreSQL..." -ForegroundColor Cyan |
| | docker-compose exec postgres pg_isready -U postgres 2>$null |
| | if ($LASTEXITCODE -eq 0) { |
| | Write-Host "β
PostgreSQL: Healthy" -ForegroundColor Green |
| | } else { |
| | Write-Host "β PostgreSQL: Unhealthy" -ForegroundColor Red |
| | } |
| |
|
| | Write-Host "Checking MCP Server..." -ForegroundColor Cyan |
| | try { |
| | $response = Invoke-WebRequest -Uri "http://localhost:8000/health" -UseBasicParsing -TimeoutSec 5 |
| | if ($response.StatusCode -eq 200) { |
| | Write-Host "β
MCP Server: Healthy" -ForegroundColor Green |
| | } else { |
| | Write-Host "β MCP Server: Unhealthy" -ForegroundColor Red |
| | } |
| | } catch { |
| | Write-Host "β MCP Server: Unhealthy" -ForegroundColor Red |
| | } |
| |
|
| | Write-Host "Checking Frontend..." -ForegroundColor Cyan |
| | try { |
| | $response = Invoke-WebRequest -Uri "http://localhost:3000" -UseBasicParsing -TimeoutSec 5 |
| | if ($response.StatusCode -eq 200) { |
| | Write-Host "β
Frontend: Healthy" -ForegroundColor Green |
| | } else { |
| | Write-Host "β Frontend: Unhealthy" -ForegroundColor Red |
| | } |
| | } catch { |
| | Write-Host "β Frontend: Unhealthy" -ForegroundColor Red |
| | } |
| |
|
| | Write-Host "Checking Agent..." -ForegroundColor Cyan |
| | $agentStatus = docker-compose ps agent | Select-String "Up" |
| | if ($agentStatus) { |
| | Write-Host "β
Agent: Running" -ForegroundColor Green |
| | } else { |
| | Write-Host "β Agent: Not running" -ForegroundColor Red |
| | } |
| |
|
| | Write-Host "" |
| | Write-Host "Step 3: Seeding Neo4j database..." -ForegroundColor Blue |
| | Write-Host " (This populates the empty graph with demo workflows)" -ForegroundColor Gray |
| | docker-compose exec mcp python /app/ops/scripts/seed.py |
| |
|
| | Write-Host "" |
| | Write-Host "β
Demo environment ready!" -ForegroundColor Green |
| | Write-Host "" |
| | Write-Host "π Demo Instructions:" -ForegroundColor Yellow |
| | Write-Host "-------------------" -ForegroundColor Yellow |
| | Write-Host "1. Open http://localhost:3000 in your browser" -ForegroundColor White |
| | Write-Host "" |
| | Write-Host "2. In the chat, type: 'Show me customers who have ordered more than `$100'" -ForegroundColor White |
| | Write-Host "" |
| | Write-Host "3. You'll see:" -ForegroundColor White |
| | Write-Host " - 'Workflow created!' message" -ForegroundColor Gray |
| | Write-Host " - Graph visualization showing workflow nodes" -ForegroundColor Gray |
| | Write-Host " - Status showing 'Agent thinking...'" -ForegroundColor Gray |
| | Write-Host "" |
| | Write-Host "4. The agent will:" -ForegroundColor White |
| | Write-Host " - Pause for 5 minutes (or configured duration)" -ForegroundColor Gray |
| | Write-Host " - Discover PostgreSQL schema" -ForegroundColor Gray |
| | Write-Host " - Generate SQL query" -ForegroundColor Gray |
| | Write-Host " - Execute and return results" -ForegroundColor Gray |
| | Write-Host "" |
| | Write-Host "5. During the pause, you can:" -ForegroundColor White |
| | Write-Host " - Open Neo4j Browser: http://localhost:7474" -ForegroundColor Gray |
| | Write-Host " - Login: neo4j/password" -ForegroundColor Gray |
| | Write-Host " - Run: MATCH (i:Instruction {status: 'pending'}) RETURN i" -ForegroundColor Gray |
| | Write-Host " - Edit parameters to change the query" -ForegroundColor Gray |
| | Write-Host "" |
| | Write-Host "6. After execution completes:" -ForegroundColor White |
| | Write-Host " - Results appear in a table" -ForegroundColor Gray |
| | Write-Host " - Generated SQL is shown" -ForegroundColor Gray |
| | Write-Host " - Graph shows all nodes as green (complete)" -ForegroundColor Gray |
| | Write-Host "" |
| | Write-Host "Optional: Edit instruction during pause" -ForegroundColor Yellow |
| | Write-Host "docker-compose exec neo4j cypher-shell -u neo4j -p password \" |
| | Write-Host " \"MATCH (i:Instruction {type: 'generate_sql', status: 'pending'}) \" |
| | Write-Host " SET i.parameters = '{\"question\": \"Count all orders\"}'\"" |
| | Write-Host "" |
| | Write-Host "π DEMO IS RUNNING!" -ForegroundColor Green |
| | Write-Host "Press Ctrl+C to stop monitoring logs." -ForegroundColor Yellow |
| | Write-Host "" |
| |
|
| | |
| | Write-Host "Monitoring agent logs..." -ForegroundColor Blue |
| | docker-compose logs -f agent |
| |
|