@echo off REM Dynamic Multi-Agent Router System Setup Script for Windows REM This script sets up the complete system with all dependencies echo 🚀 Setting up Dynamic Multi-Agent Router System echo ============================================== REM Check if Docker is installed echo [INFO] Checking Docker installation... docker --version >nul 2>&1 if %errorlevel% neq 0 ( echo [ERROR] Docker is not installed. Please install Docker Desktop first. pause exit /b 1 ) docker-compose --version >nul 2>&1 if %errorlevel% neq 0 ( echo [ERROR] Docker Compose is not installed. Please install Docker Compose first. pause exit /b 1 ) echo [SUCCESS] Docker and Docker Compose are installed REM Create necessary directories echo [INFO] Creating necessary directories... if not exist "agents" mkdir agents if not exist "agents\engineering" mkdir agents\engineering if not exist "agents\design" mkdir agents\design if not exist "agents\marketing" mkdir agents\marketing if not exist "agents\product" mkdir agents\product if not exist "agents\project-management" mkdir agents\project-management if not exist "agents\studio-operations" mkdir agents\studio-operations if not exist "agents\testing" mkdir agents\testing if not exist "agents\bonus" mkdir agents\bonus if not exist "workflows" mkdir workflows if not exist "letsencrypt" mkdir letsencrypt if not exist "n8n_data" mkdir n8n_data echo [SUCCESS] Directories created REM Copy agent files if they exist echo [INFO] Setting up agent files... if exist "n8n_data\agents" ( echo [INFO] Copying existing agent files... xcopy "n8n_data\agents\*" "agents\" /E /I /Q ) REM Create sample agent files if none exist if not exist "agents\engineering\ai-engineer.md" ( echo [INFO] Creating sample agent files... ( echo --- echo name: ai-engineer echo description: Expert in AI/ML implementation, LLM integration, and intelligent automation echo keywords: ai, machine learning, llm, automation, ml, artificial intelligence echo color: cyan echo tools: Write, Read, MultiEdit, Bash, WebFetch echo --- echo. echo # AI Engineer echo. echo You are an expert AI engineer specializing in practical machine learning implementation and AI integration for production applications. Your expertise spans large language models, computer vision, recommendation systems, and intelligent automation. echo. echo ## Core Responsibilities echo. echo 1. **LLM Integration ^& Prompt Engineering** echo 2. **ML Pipeline Development** echo 3. **Recommendation Systems** echo 4. **Computer Vision Implementation** echo 5. **AI Infrastructure ^& Optimization** echo 6. **Practical AI Features** echo. echo Your goal is to democratize AI within applications, making intelligent features accessible and valuable to users while maintaining performance and cost efficiency. ) > agents\engineering\ai-engineer.md ( echo --- echo name: ui-designer echo description: Creates beautiful, functional interfaces that are implementable within rapid development cycles echo keywords: ui, design, interface, user experience, frontend, visual design echo color: magenta echo tools: Write, Read, MultiEdit, WebSearch, WebFetch echo --- echo. echo # UI Designer echo. echo You are a visionary UI designer who creates interfaces that are not just beautiful, but implementable within rapid development cycles. Your expertise spans modern design trends, platform-specific guidelines, component architecture, and the delicate balance between innovation and usability. echo. echo ## Core Responsibilities echo. echo 1. **Rapid UI Conceptualization** echo 2. **Component System Architecture** echo 3. **Trend Translation** echo 4. **Visual Hierarchy ^& Typography** echo 5. **Platform-Specific Excellence** echo 6. **Developer Handoff Optimization** echo. echo Your goal is to create interfaces that users love and developers can actually build within tight timelines. ) > agents\design\ui-designer.md ( echo --- echo name: content-creator echo description: Specializes in cross-platform content generation, from long-form blog posts to engaging video scripts echo keywords: content, marketing, writing, social media, blog, video, content strategy echo color: green echo tools: Write, Read, MultiEdit, WebSearch, WebFetch echo --- echo. echo # Content Creator echo. echo You are a Content Creator specializing in cross-platform content generation, from long-form articles to video scripts and social media content. You excel at adapting messages across formats while maintaining brand voice and maximizing platform-specific impact. echo. echo ## Core Responsibilities echo. echo 1. **Content Strategy Development** echo 2. **Multi-Format Content Creation** echo 3. **SEO ^& Optimization** echo 4. **Brand Voice Consistency** echo. echo Your goal is to create compelling content that drives engagement and conversions across all platforms. ) > agents\marketing\content-creator.md ) echo [SUCCESS] Agent files set up REM Create environment file echo [INFO] Creating environment configuration... ( echo # N8N Configuration echo N8N_BASIC_AUTH_ACTIVE=true echo N8N_BASIC_AUTH_USER=admin echo N8N_BASIC_AUTH_PASSWORD=admin123 echo N8N_HOST=localhost echo N8N_PORT=5678 echo N8N_PROTOCOL=http echo WEBHOOK_URL=http://localhost:5678/ echo GENERIC_TIMEZONE=UTC echo N8N_LOG_LEVEL=info echo N8N_METRICS=true echo N8N_DIAGNOSTICS_ENABLED=true echo. echo # Ollama Configuration echo OLLAMA_BASE_URL=http://ollama:11434 echo OLLAMA_MODEL=llama3.1 echo. echo # Redis Configuration echo REDIS_HOST=redis echo REDIS_PORT=6379 echo REDIS_PASSWORD=redis123 echo. echo # Agent System Configuration echo AGENT_DIRECTORY=/home/node/.n8n/agents echo CACHE_TTL=3600 ) > .env echo [SUCCESS] Environment file created REM Create nginx configuration echo [INFO] Creating Nginx configuration... ( echo events { echo worker_connections 1024; echo } echo. echo http { echo upstream n8n { echo server n8n:5678; echo } echo. echo upstream ollama { echo server ollama:11434; echo } echo. echo server { echo listen 80; echo server_name localhost; echo. echo # N8N echo location / { echo proxy_pass http://n8n; echo proxy_set_header Host $host; echo proxy_set_header X-Real-IP $remote_addr; echo proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; echo proxy_set_header X-Forwarded-Proto $scheme; echo } echo. echo # Ollama API echo location /ollama/ { echo rewrite ^/ollama/\(.*\) /$1 break; echo proxy_pass http://ollama; echo proxy_set_header Host $host; echo proxy_set_header X-Real-IP $remote_addr; echo proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; echo proxy_set_header X-Forwarded-Proto $scheme; echo } echo. echo # Redis Commander echo location /redis/ { echo proxy_pass http://redis-commander:8081/; echo proxy_set_header Host $host; echo proxy_set_header X-Real-IP $remote_addr; echo proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; echo proxy_set_header X-Forwarded-Proto $scheme; echo } echo } echo } ) > nginx.conf echo [SUCCESS] Nginx configuration created REM Start services echo [INFO] Starting all services... docker-compose up -d echo [SUCCESS] Services started REM Wait for services echo [INFO] Waiting for services to be ready... echo [INFO] Waiting for N8N... timeout /t 30 /nobreak >nul REM Check if N8N is ready :check_n8n curl -s http://localhost:5678 >nul 2>&1 if %errorlevel% neq 0 ( echo [INFO] Still waiting for N8N... timeout /t 5 /nobreak >nul goto check_n8n ) echo [SUCCESS] N8N is ready REM Show final instructions echo. echo 🎉 Setup Complete! echo ================== echo. echo Services are now running: echo • N8N: http://localhost:5678 echo • Ollama: http://localhost:11434 echo • Redis Commander: http://localhost:8081 echo. echo Default credentials: echo • N8N: admin / admin123 echo • Redis: (no auth required for Redis Commander) echo. echo Next steps: echo 1. Open http://localhost:5678 in your browser echo 2. Login with admin / admin123 echo 3. Import the workflow file: n8n_agent_system_flow_with_rag.json echo 4. Test the system using: python test_agent_system.py echo. echo Webhook endpoint: http://localhost:5678/webhook/agent-task echo. echo To stop the system: docker-compose down echo To view logs: docker-compose logs -f echo. pause