agent-mcp-sql / Makefile
ohmygaugh's picture
demo working
a0eb181
.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