Skip to content

M1325-source/SelfHealingCodeAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ง Self-Healing Code Agent

An intelligent AI-powered DevOps assistant that automatically monitors application logs, detects errors in real-time, and suggests code-level fixes using GPT-4. The system simulates a complete CI/CD pipeline by auto-generating Pull Requests with proposed fixes.

GitHub Pages Python Stars License


๐Ÿ“‹ Table of Contents


๐ŸŽฏ Overview

The Self-Healing Code Agent revolutionizes DevOps workflows by automating the error detection and resolution process. Instead of manually monitoring logs and debugging issues, this AI agent:

  1. Monitors application logs in real-time
  2. Detects errors, exceptions, and anomalies automatically
  3. Analyzes the error context using GPT-4
  4. Generates code-level fixes with explanations
  5. Creates Pull Requests with the proposed solution
  6. Simulates a complete CI/CD pipeline workflow

Perfect for: DevOps engineers, SREs, development teams, and anyone managing production systems who want to reduce MTTR (Mean Time To Resolution) and automate incident response.


โœจ Key Features

๐Ÿ” Intelligent Log Monitoring

  • Real-time log file monitoring and parsing
  • Pattern-based anomaly detection (ERROR, Exception, FATAL, etc.)
  • Contextual error extraction with surrounding log lines
  • Support for multiple log formats and sources

๐Ÿค– AI-Powered Error Analysis

  • GPT-4 integration for intelligent code analysis
  • Root cause identification from error messages
  • Context-aware fix generation
  • Code explanation and best practices suggestions

โš™๏ธ Automated CI/CD Workflow

  • Simulated Pull Request creation with fix details
  • Pre-commit validation and testing hooks
  • Integration-ready for GitHub/GitLab APIs
  • Automated fix verification pipeline

๐ŸŒ User-Friendly Interface

  • Beautiful Streamlit web dashboard
  • Real-time error display and fix suggestions
  • Interactive PR preview and management
  • CLI support for automation and scripting

๐Ÿ” Secure & Configurable

  • Environment-based API key management
  • Configurable error detection thresholds
  • Custom log pattern support
  • Easy integration with existing systems

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Log Sources Layer                         โ”‚
โ”‚        (Application Logs, System Logs, Error Logs)           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Log Monitor Module                          โ”‚
โ”‚              (monitor/anomaly_detector.py)                   โ”‚
โ”‚   โ€ข Real-time log watching                                   โ”‚
โ”‚   โ€ข Pattern matching (ERROR, Exception, FATAL)               โ”‚
โ”‚   โ€ข Error extraction with context                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Parser Module                             โ”‚
โ”‚                  (utils/parser.py)                           โ”‚
โ”‚   โ€ข Log line parsing and structuring                         โ”‚
โ”‚   โ€ข Timestamp and severity extraction                        โ”‚
โ”‚   โ€ข Context aggregation                                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  AI Fix Agent Module                         โ”‚
โ”‚               (agent/llm_fix_agent.py)                       โ”‚
โ”‚   โ€ข GPT-4 API integration                                    โ”‚
โ”‚   โ€ข Error analysis and root cause detection                  โ”‚
โ”‚   โ€ข Code fix generation with explanations                    โ”‚
โ”‚   โ€ข Best practices recommendations                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  CI/CD Automation Module                     โ”‚
โ”‚                  (cicd/create_pr.py)                         โ”‚
โ”‚   โ€ข Pull Request generation                                  โ”‚
โ”‚   โ€ข Fix documentation and formatting                         โ”‚
โ”‚   โ€ข Pre-commit hooks simulation                              โ”‚
โ”‚   โ€ข Integration with GitHub/GitLab APIs                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  User Interface Layer                        โ”‚
โ”‚        (streamlit_app.py / main.py CLI)                      โ”‚
โ”‚   โ€ข Dashboard visualization                                  โ”‚
โ”‚   โ€ข Interactive fix review                                   โ”‚
โ”‚   โ€ข PR management                                            โ”‚
โ”‚   โ€ข Configuration settings                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ Tech Stack

Component Technology Purpose
AI/ML OpenAI GPT-4 Intelligent error analysis and fix generation
Backend Python 3.10+ Core application logic
Web UI Streamlit Interactive dashboard and visualization
Log Processing Python Logging, Regex Pattern matching and parsing
CI/CD Custom Python Scripts PR generation and automation
API Management python-dotenv Secure environment variable handling
Development Dev Containers Consistent development environment

Key Dependencies

openai>=1.0.0           # GPT-4 API integration
streamlit>=1.28.0       # Web interface
python-dotenv>=1.0.0    # Environment management
watchdog>=3.0.0         # File system monitoring (optional)
requests>=2.31.0        # HTTP requests

๐Ÿ“ธ Screenshots

๐Ÿ–ฅ๏ธ Streamlit Dashboard

(Interactive web interface showing real-time error detection and AI-generated fixes)

๐Ÿ“Š Error Detection View

(Log monitoring with highlighted errors and anomalies)

๐Ÿ”ง Fix Suggestion Panel

(GPT-4 generated code fixes with explanations)

๐Ÿ“ Pull Request Preview

(Auto-generated PR with fix details ready for review)


๐Ÿ“‚ Project Structure

SelfHealingCodeAgent/
โ”‚
โ”œโ”€โ”€ agent/                          # AI Agent Core
โ”‚   โ””โ”€โ”€ llm_fix_agent.py           # GPT-4 integration for fix generation
โ”‚
โ”œโ”€โ”€ cicd/                           # CI/CD Automation
โ”‚   โ””โ”€โ”€ create_pr.py               # Pull Request creation logic
โ”‚
โ”œโ”€โ”€ logs/                           # Log Storage
โ”‚   โ””โ”€โ”€ sample_log.txt             # Example log file for testing
โ”‚
โ”œโ”€โ”€ monitor/                        # Error Detection
โ”‚   โ””โ”€โ”€ anomaly_detector.py        # Log monitoring and pattern matching
โ”‚
โ”œโ”€โ”€ utils/                          # Helper Utilities
โ”‚   โ””โ”€โ”€ parser.py                  # Log parsing and structuring
โ”‚
โ”œโ”€โ”€ docs/                           # Documentation & Demo
โ”‚   โ””โ”€โ”€ index.html                 # GitHub Pages landing page
โ”‚
โ”œโ”€โ”€ .devcontainer/                  # Development Container
โ”‚   โ””โ”€โ”€ devcontainer.json          # VS Code dev container config
โ”‚
โ”œโ”€โ”€ main.py                         # CLI Entry Point
โ”œโ”€โ”€ streamlit_app.py               # Web UI Entry Point
โ”œโ”€โ”€ requirements.txt               # Python Dependencies
โ”œโ”€โ”€ .env.example                   # Environment Variable Template
โ”œโ”€โ”€ .gitignore                     # Git Ignore Rules
โ””โ”€โ”€ README.md                       # Project Documentation

๐Ÿš€ Installation

Prerequisites

  • Python 3.10 or later
  • OpenAI API Key โ†’ Get one here
  • Git (for cloning the repository)

Step-by-Step Setup

1. Clone the Repository

git clone https://github.com/M1325-source/SelfHealingCodeAgent.git
cd SelfHealingCodeAgent

2. Create Virtual Environment (Recommended)

# Create virtual environment
python -m venv venv

# Activate on Windows
venv\Scripts\activate

# Activate on macOS/Linux
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

# Copy the example env file
cp .env.example .env

# Edit .env and add your OpenAI API key
# On Windows: notepad .env
# On macOS/Linux: nano .env

Add the following to your .env file:

OPENAI_API_KEY=sk-your-openai-api-key-here

5. Verify Installation

python -c "import streamlit; print('Setup complete!')"

๐Ÿงช Usage

Option 1: Command Line Interface (CLI)

Run the agent in terminal mode for automation and scripting:

python main.py

Features:

  • Monitors logs/sample_log.txt by default
  • Detects errors automatically
  • Prints AI-generated fixes to console
  • Simulates PR creation

Custom Log File:

python main.py --log-file /path/to/your/logfile.log

Option 2: Streamlit Web Dashboard

Launch the interactive web interface:

streamlit run streamlit_app.py

Access the dashboard:

  • Local URL: http://localhost:8501
  • Network URL: Check terminal output for external access

Dashboard Features:

  • ๐Ÿ“Š Real-time log monitoring visualization
  • ๐Ÿ” Error detection with highlighting
  • ๐Ÿค– AI fix suggestions with explanations
  • ๐Ÿ“ PR preview and download
  • โš™๏ธ Configuration settings

Option 3: Dev Container (VS Code)

For a consistent development environment:

  1. Open the project in VS Code
  2. Install the "Remote - Containers" extension
  3. Press F1 โ†’ Select "Reopen in Container"
  4. The environment will be set up automatically

๐Ÿ”ฌ How It Works

Workflow Overview

Step 1: Log Monitoring
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Monitor watches log files for changes  โ”‚
โ”‚  Detects patterns: ERROR, Exception     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ–ผ
Step 2: Error Detection
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Anomaly detector extracts error lines  โ”‚
โ”‚  Captures context (5 lines before/after)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ–ผ
Step 3: AI Analysis
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  GPT-4 analyzes error with context      โ”‚
โ”‚  Generates code-level fix suggestion    โ”‚
โ”‚  Provides explanation and best practicesโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ–ผ
Step 4: PR Creation
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Format fix as Pull Request             โ”‚
โ”‚  Include error details, fix, and tests  โ”‚
โ”‚  Simulate CI/CD pipeline approval       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Example Scenario

1. Log Entry Detected:

2026-02-04 10:30:45 ERROR [DatabaseConnection] Connection timeout after 30s

2. AI Analysis:

Root Cause: Database connection pool exhausted
Recommended Fix: Increase pool size and add connection retry logic

3. Generated Fix:

# Before
db_pool = create_pool(max_connections=10)

# After (AI-suggested fix)
db_pool = create_pool(
    max_connections=50,
    timeout=60,
    retry_on_timeout=True,
    max_retries=3
)

4. Pull Request Created:

Title: [AutoFix] Resolve database connection timeout
Description: Increased connection pool size and added retry logic
Files Changed: database/connection.py
Status: Ready for Review

๐Ÿ” API Configuration

OpenAI API Setup

  1. Get Your API Key:

    • Visit OpenAI Platform
    • Create a new API key
    • Copy the key (it starts with sk-)
  2. Set Up Environment:

    # Create .env file
    echo "OPENAI_API_KEY=sk-your-key-here" > .env
  3. Verify Configuration:

    from dotenv import load_dotenv
    import os
    
    load_dotenv()
    api_key = os.getenv("OPENAI_API_KEY")
    print("API configured!" if api_key else "API key missing!")

Cost Optimization Tips

  • Use GPT-4 for complex errors, GPT-3.5 for simple ones
  • Cache similar error patterns to avoid redundant API calls
  • Set rate limits to control costs
  • Monitor usage on OpenAI dashboard

๐Ÿ”ฎ Future Enhancements

Roadmap

Feature Tech Stack Status Priority
Real-time log monitoring Watchdog / OpenTelemetry ๐Ÿ”„ In Progress High
Auto PR to GitHub PyGitHub / GitHub API ๐Ÿ“‹ Planned High
Automated testing pipeline Pytest + GitHub Actions ๐Ÿ“‹ Planned High
Fix verification loop Reinforcement Learning ๐Ÿ”ฌ Research Medium
Multi-source log aggregation ELK Stack integration ๐Ÿ“‹ Planned Medium
Slack/Teams notifications Webhook integration ๐Ÿ“‹ Planned Low
Custom ML models TensorFlow / PyTorch ๐Ÿ”ฌ Research Low
Dashboard analytics Plotly / Chart.js ๐Ÿ“‹ Planned Medium

Phase 1: Enhanced Monitoring (Q2 2026)

  • Real-time file watching with Watchdog
  • Support for multiple log sources
  • Custom error pattern configuration
  • Integration with OpenTelemetry

Phase 2: GitHub Integration (Q3 2026)

  • Actual GitHub PR creation via API
  • Automated branch creation and commits
  • PR review automation
  • Integration with GitHub Actions

Phase 3: Testing & Validation (Q3 2026)

  • Automated test generation for fixes
  • Fix verification before PR creation
  • Rollback mechanism for failed fixes
  • Integration testing pipeline

Phase 4: Advanced AI (Q4 2026)

  • Reinforcement learning for fix quality improvement
  • Multi-model ensemble for better accuracy
  • Custom fine-tuned models for specific codebases
  • Predictive error detection

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

How to Contribute

  1. Fork the Repository

    # Click the 'Fork' button on GitHub
  2. Clone Your Fork

    git clone https://github.com/YOUR_USERNAME/SelfHealingCodeAgent.git
    cd SelfHealingCodeAgent
  3. Create a Feature Branch

    git checkout -b feature/amazing-feature
  4. Make Your Changes

    • Add new features
    • Fix bugs
    • Improve documentation
    • Add tests
  5. Commit Your Changes

    git add .
    git commit -m "Add amazing feature"
  6. Push to Your Fork

    git push origin feature/amazing-feature
  7. Open a Pull Request

    • Go to the original repository
    • Click "New Pull Request"
    • Describe your changes clearly

Contribution Guidelines

  • Follow PEP 8 style guide for Python code
  • Add docstrings to all functions and classes
  • Include unit tests for new features
  • Update documentation as needed
  • Keep commits atomic and well-described

Areas for Contribution

  • ๐Ÿ› Bug Fixes: Report and fix issues
  • โœจ New Features: Implement items from the roadmap
  • ๐Ÿ“ Documentation: Improve README, add tutorials
  • ๐Ÿงช Testing: Add unit tests and integration tests
  • ๐ŸŽจ UI/UX: Enhance Streamlit dashboard
  • ๐Ÿ”ง DevOps: Improve CI/CD, Docker support

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ค Author

Manisha Priya
AI Developer | DevOps Enthusiast | Automation Architect

Passionate about building intelligent systems that make developers' lives easier.


๐Ÿ™ Acknowledgments

  • OpenAI for providing the GPT-4 API
  • Streamlit team for the amazing framework
  • The DevOps and SRE communities for inspiration
  • All contributors and supporters of this project

๐Ÿ“ž Support

Getting Help

FAQ

Q: How much does it cost to run?
A: Costs depend on OpenAI API usage. Typical usage: ~$0.01-0.05 per error analysis.

Q: Can I use this with private repositories?
A: Yes! Configure GitHub Personal Access Token in .env for private repo access.

Q: Does it work with languages other than Python?
A: Yes! The AI can suggest fixes for any language in your logs.

Q: How accurate are the fixes?
A: GPT-4 provides high-quality suggestions, but always review before applying.


โญ Show Your Support

If you find this project useful:

  • โญ Star the repository on GitHub
  • ๐Ÿด Fork it and build something awesome
  • ๐Ÿ“ข Share it with your dev friends and colleagues
  • ๐Ÿ’ฌ Provide feedback through issues or discussions
  • ๐Ÿค Contribute by submitting PRs

Every star motivates me to keep improving this project!


๐Ÿ“Š Project Stats

  • ๐ŸŒŸ 3 Stars (and growing!)
  • ๐Ÿ”„ 10 Deployments on GitHub Pages
  • ๐Ÿ’ป 100% Python codebase
  • ๐Ÿ“ฆ 14 Commits of continuous improvement

๐ŸŽฅ Demo

Live Demo: View on GitHub Pages

Video Demo: Check out Self-Healing-DevOps-Demo.mp4 in the repository for a full walkthrough!


Built with โค๏ธ by Manisha Priya

Making DevOps smarter, one automated fix at a time.


Last Updated: February 2026

About

๐Ÿ”ง A self-healing AI agent that detects errors from logs and suggests code fixes using GPT-4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages