@echo off REM Dynamic Multi-Agent Router System Setup Script for Windows echo 🚀 Setting up Dynamic Multi-Agent Router System... REM Check if Docker is running docker info >nul 2>&1 if %errorlevel% neq 0 ( echo ❌ Docker is not running. Please start Docker first. pause exit /b 1 ) echo ✅ Docker is running REM Create necessary directories echo 📁 Creating directories... if not exist agents mkdir agents if not exist workflows mkdir workflows REM Check if agents directory has files dir agents\*.md >nul 2>&1 if %errorlevel% neq 0 ( echo ⚠️ No agent files found in ./agents directory echo Please ensure your agent files are in ./agents/ echo The system will use hardcoded agents as fallback ) REM Start the services echo 🐳 Starting services with Docker Compose... docker-compose up -d REM Wait for services to be ready echo ⏳ Waiting for services to start... timeout /t 10 /nobreak >nul REM Check if n8n is accessible echo 🔍 Checking n8n accessibility... curl -s http://localhost:5678 >nul 2>&1 if %errorlevel% equ 0 ( echo ✅ n8n is accessible at http://localhost:5678 ) else ( echo ❌ n8n is not accessible. Check Docker logs: docker-compose logs n8n ) REM Check if Ollama is accessible echo 🔍 Checking Ollama accessibility... curl -s http://localhost:11434/api/tags >nul 2>&1 if %errorlevel% equ 0 ( echo ✅ Ollama is accessible at http://localhost:11434 REM Check if llama3.1 model is available curl -s http://localhost:11434/api/tags | findstr "llama3.1" >nul 2>&1 if %errorlevel% equ 0 ( echo ✅ llama3.1 model is available ) else ( echo ⚠️ llama3.1 model not found. Pulling it now... docker exec ollama-server ollama pull llama3.1 ) ) else ( echo ❌ Ollama is not accessible. Check Docker logs: docker-compose logs ollama ) echo. echo 🎉 Setup complete! echo. echo 📋 Next steps: echo 1. Open n8n at http://localhost:5678 echo 2. Login with admin/admin123 echo 3. Import the workflow: n8n_agent_system_flow_working.json echo 4. Activate the workflow echo 5. Test with: curl -X POST http://localhost:5678/webhook/agent-task -H "Content-Type: application/json" -d "{\"task\": \"Build a mobile app\"}" echo. echo 📚 For more information, see DYNAMIC_AGENT_SYSTEM_SETUP.md pause