Skip to content

George-Sakellariou/autogen-cicd-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AutoGen CI/CD Agent

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.

✨ Features

  • 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

🚀 Quick Start

# 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.py

🔧 Configuration

Essential 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

🎯 How It Works

  1. LogAnalyzer Agent - Parses pipeline logs and categorizes failures
  2. FixGenerator Agent - Creates targeted solutions using AI or templates
  3. ADOIntegrator Agent - Applies fixes via pull requests

📋 Supported Failure Types

  • Dependencies - npm, pip, NuGet package issues
  • Docker - Build failures, image problems
  • Configuration - Missing variables, YAML errors
  • Tests - Timeout issues, failing test suites

🛡️ Safety First

  • Runs in simulation mode by default
  • Creates pull requests for human review
  • Never makes direct commits to main branches
  • Comprehensive logging and error handling

📚 Usage Example

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"])

🔗 Requirements

  • Python 3.9+
  • Azure DevOps account with PAT
  • OpenAI or Anthropic API key (optional - works without)
  • AutoGen framework

📖 More Info

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

About

AutoGen CI/CD pipeline failure resolution agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages