Intelligent pipeline failure resolution using AI-powered multi-agent systems
Automatically analyzes Azure DevOps pipeline failures, generates targeted fixes using LLMs, and creates pull requests to resolve CI/CD issues.
- Smart Log Analysis - Identifies dependency, Docker, configuration, and test failures
- AI-Powered Fixes - Generates specific solutions using OpenAI GPT-4 or Anthropic Claude
- AutoGen Framework - Multi-agent conversation system for collaborative problem-solving
- Safe Application - Creates pull requests for review before applying changes
- Multiple Modes - Works with or without LLM APIs using pattern-based fallbacks
# Clone and setup
git clone <repository-url>
cd autogen-cicd-agent
# Run setup script
python setup.py
# Configure your environment
cp .env.example .env
# Edit .env with your API keys and Azure DevOps details
# Test the system
python src/enhanced_main_test.pyEssential environment variables:
# LLM API (choose one)
OPENAI_API_KEY=your-openai-key
# ANTHROPIC_API_KEY=your-anthropic-key
# Azure DevOps
ADO_ORGANIZATION_URL=https://dev.azure.com/your-org
ADO_PROJECT_NAME=Your-Project
ADO_PAT=your-personal-access-token
# Safety settings
SIMULATION_MODE=true
ENABLE_REAL_PR_CREATION=false- LogAnalyzer Agent - Parses pipeline logs and categorizes failures
- FixGenerator Agent - Creates targeted solutions using AI or templates
- ADOIntegrator Agent - Applies fixes via pull requests
- Dependencies - npm, pip, NuGet package issues
- Docker - Build failures, image problems
- Configuration - Missing variables, YAML errors
- Tests - Timeout issues, failing test suites
- Runs in simulation mode by default
- Creates pull requests for human review
- Never makes direct commits to main branches
- Comprehensive logging and error handling
from src.agent_orchestrator import AgentOrchestrator
from src.config.agent_config import get_llm_config
# Initialize with your LLM config
orchestrator = AgentOrchestrator(get_llm_config())
# Resolve a pipeline failure
result = orchestrator.resolve_pipeline_failure(
build_logs="your pipeline logs here",
build_info={"build_number": 123, "definition_name": "CI Build"}
)
print(result["summary"])- Python 3.9+
- Azure DevOps account with PAT
- OpenAI or Anthropic API key (optional - works without)
- AutoGen framework
Run python setup.py for guided setup and testing, or check the project documentation for advanced configuration options.
Built with AutoGen • Supports OpenAI & Anthropic APIs • Azure DevOps Integration