Timothy Eastridge
clean up on seeding and system overview
da2713e
# Graph-Driven Agent Demo Script for PowerShell
# Run this with: powershell -ExecutionPolicy Bypass -File ops/scripts/demo.ps1
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 ""
# Keep running and show agent logs
Write-Host "Monitoring agent logs..." -ForegroundColor Blue
docker-compose logs -f agent