#!/bin/bash # Quick Start Debug Script for Multi-Agent NLP System # This script helps you debug and validate your multi-agent system step by step set -e # Exit on any error echo "🚀 Multi-Agent NLP System - Quick Start Debug" echo "==============================================" # Check if we're in the right directory if [ ! -f "shared/kafka_client.py" ]; then echo "❌ Error: Please run this script from the multi-agent-nlp-system directory" exit 1 fi echo "" echo "📋 Step 1: Installing Python dependencies..." python3 -m pip install --upgrade pip python3 -m pip install -r requirements-validation.txt echo "" echo "📋 Step 2: Checking Docker status..." if ! docker --version > /dev/null 2>&1; then echo "❌ Docker is not installed or not running" echo "💡 Please install Docker and ensure it's running" exit 1 fi if ! docker info > /dev/null 2>&1; then echo "❌ Docker daemon is not running" echo "💡 Please start Docker daemon" exit 1 fi echo "✅ Docker is running" echo "" echo "📋 Step 3: Starting core infrastructure services..." echo "🔧 Starting Kafka, Redis, and MinIO..." # Stop any existing containers docker-compose -f docker-compose-minimal.yml down 2>/dev/null || true # Start the minimal infrastructure docker-compose -f docker-compose-minimal.yml up -d echo "⏳ Waiting for services to start up..." sleep 30 echo "" echo "📋 Step 4: Running infrastructure validation..." python3 check_infrastructure.py echo "" echo "📋 Step 5: Running comprehensive debug tests..." python3 run_debug_tests.py echo "" echo "🎉 Debug process completed!" echo "" echo "📊 Next steps:" echo " 1. Review any failed tests above" echo " 2. Check service logs: docker-compose -f docker-compose-minimal.yml logs" echo " 3. Access MinIO console: http://localhost:9001 (admin/minioadmin123)" echo " 4. Monitor Kafka: docker exec -it kafka kafka-topics --list --bootstrap-server localhost:9092" echo "" echo "🔧 Troubleshooting:" echo " - Stop services: docker-compose -f docker-compose-minimal.yml down" echo " - View logs: docker-compose -f docker-compose-minimal.yml logs [service-name]" echo " - Restart services: docker-compose -f docker-compose-minimal.yml restart"