An AI-powered collaborative debugging system that leverages multiple specialized agents to analyze, diagnose, and resolve software bugs efficiently.
- Overview
- Problem Statement
- Features
- Architecture
- Installation
- Usage
- How It Works
- Agent Roles
- Technology Stack
- Project Structure
- Future Enhancements
- Contributing
- License
- Contributors
Multi-Agentic Debugger is an innovative debugging system that employs multiple AI agents working collaboratively to identify and resolve software bugs. Unlike traditional debugging tools that provide single-threaded analysis, this system orchestrates specialized agents that examine code from different perspectives simultaneously, mimicking how expert debugging teams approach complex problems.
- Faster Resolution: Multiple agents analyzing simultaneously reduces debugging time by 40-60%
- Comprehensive Analysis: Different agents bring specialized expertise (error patterns, code flow, root cause analysis)
- Intelligent Collaboration: Agents share findings and challenge hypotheses, reducing false positives
- Learning System: Improves over time by learning from previously solved bugs
Software debugging consumes 30-50% of development time, with complex issues often requiring days to resolve. Traditional debugging faces several challenges:
- Single-threaded analysis misses patterns that require multi-domain expertise
- Context switching between logs, stack traces, and code flow is cognitively overwhelming
- Pattern recognition limitations in identifying subtle bugs across large codebases
- Knowledge silos prevent collaborative problem-solving
Our Solution: A multi-agent system where specialized AI agents collaborate to provide comprehensive, multi-perspective debugging analysis.
- ๐ฏ Orchestrated Agent Coordination - Central orchestrator manages multiple specialized debugging agents
- ๐ Parallel Analysis - Multiple agents analyze different aspects of bugs simultaneously
- ๐ง Root Cause Intelligence - Advanced algorithms identify underlying issues, not just symptoms
- ๐ก Solution Generation - Automatically proposes fixes with explanations
- ๐ Visual Debugging Flows - Interactive visualization of error propagation and analysis
- ๐ Context-Aware Learning - Learns from historical debugging sessions
- โก Real-time Collaboration - Agents communicate and share insights dynamically
- ๐ Detailed Reports - Comprehensive debugging reports with step-by-step analysis
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ USER INTERFACE LAYER โ
โ (CLI / Jupyter Notebook / Web Interface) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ORCHESTRATOR AGENT โ
โ โข Task Delegation โข Result Synthesis โข Coordination โ
โโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโผโโโโโโ โโโโโโโผโโโโโโ โโโโโโโผโโโโโโโ โโโโโโโโโโโ
โ Error โ โ Code โ โRoot Cause โ โSolution โ
โ Analyst โ โ Tracer โ โ Analyzer โ โGeneratorโ
โ Agent โ โ Agent โ โ Agent โ โ Agent โ
โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโโ โโโโโโฌโโโโโ
โ โ โ โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATA LAYER โ
โ โข Code Repository โข Error Logs โข Stack Traces โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Python 3.9 or higher
- pip package manager
- API key for OpenAI or Anthropic (for LLM backend)
-
Clone the repository
git clone https://github.com/itsokayyybro/MultiAgentic_Debbuger.git cd MultiAgentic_Debbuger -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure API keys
cp .env.example .env # Edit .env and add your API keysRequired environment variables:
OPENAI_API_KEY=your_openai_key_here # OR ANTHROPIC_API_KEY=your_anthropic_key_here -
Run the system
# CLI Mode python -m agentic_debugger.cli # Jupyter Notebook Mode jupyter notebook Multi_Agentic_Debugger.ipynb
from agentic_debugger import MultiAgenticDebugger
# Initialize the debugger
debugger = MultiAgenticDebugger()
# Provide buggy code and error context
code = """
def calculate_average(numbers):
total = sum(numbers)
return total / len(numbers)
result = calculate_average([])
"""
error_message = "ZeroDivisionError: division by zero"
# Run debugging analysis
result = debugger.debug(
code=code,
error_message=error_message,
stack_trace=stack_trace # Optional
)
# View results
print(result.root_cause)
print(result.proposed_solutions)
print(result.agent_analysis)# Debug a Python file
python -m agentic_debugger debug --file buggy_code.py --error "IndexError: list index out of range"
# Interactive mode
python -m agentic_debugger interactive
# With custom agent configuration
python -m agentic_debugger debug --file code.py --agents error,tracer,root_cause --verbose-
Input Phase
- User submits buggy code, error messages, and optional context
- System parses and structures input data
-
Orchestration Phase
- Orchestrator analyzes the problem complexity
- Creates a debugging plan and assigns tasks to specialized agents
-
Parallel Analysis Phase
- Error Analyst Agent: Parses error messages and identifies error patterns
- Code Tracer Agent: Analyzes execution flow and variable states
- Root Cause Analyzer: Correlates findings to identify underlying issues
- Solution Generator: Proposes fixes based on analysis
-
Synthesis Phase
- Orchestrator collects agent findings
- Resolves conflicts and builds comprehensive analysis
- Ranks solutions by confidence and feasibility
-
Output Phase
- Presents debugging report with explanations
- Provides step-by-step solution guidance
- Offers validation and testing recommendations
Responsibility: Coordinates all agent activities, manages workflow, synthesizes results
- Creates debugging plans
- Assigns tasks to specialized agents
- Resolves conflicts between agent findings
- Produces final comprehensive report
Responsibility: Analyzes error messages, logs, and stack traces
- Parses exception types and messages
- Identifies error patterns and commonalities
- Extracts relevant context from logs
- Compares with historical error database
Responsibility: Tracks code execution flow and data flow
- Analyzes function call sequences
- Traces variable state changes
- Identifies problematic code paths
- Maps dependencies and interactions
Responsibility: Identifies underlying issues beyond surface symptoms
- Correlates findings from multiple agents
- Applies causal reasoning
- Distinguishes symptoms from root causes
- Provides confidence scores for hypotheses
Responsibility: Proposes fixes and improvements
- Generates multiple solution approaches
- Provides code patches
- Explains trade-offs of each solution
- Suggests preventive measures
Responsibility: Tests and validates proposed solutions
- Runs proposed fixes in isolated environments
- Verifies solutions resolve the issue
- Checks for side effects
- Provides validation reports
- Python 3.9+ - Primary programming language
- LangChain / CrewAI - Agent orchestration framework
- OpenAI GPT-4 / Anthropic Claude - Large Language Models for agent intelligence
- AST (Abstract Syntax Tree) - Code structure parsing
- Python
astmodule - Syntax tree manipulation - PyFlakes / Pylint - Static code analysis
- Jupyter Notebook - Interactive development and testing
- FastAPI - Web API (planned)
- Streamlit - Web UI (planned)
langchain- LLM application frameworkopenai/anthropic- LLM API clientspydantic- Data validationpytest- Testing framework
MultiAgentic_Debbuger/
โโโ agentic_debugger/ # Main package
โ โโโ __init__.py
โ โโโ orchestrator.py # Orchestrator agent logic
โ โโโ agents/ # Individual agent implementations
โ โ โโโ error_analyst.py
โ โ โโโ code_tracer.py
โ โ โโโ root_cause.py
โ โ โโโ solution_generator.py
โ โ โโโ validator.py
โ โโโ utils/ # Utility functions
โ โ โโโ code_parser.py
โ โ โโโ error_parser.py
โ โ โโโ visualizer.py
โ โโโ cli.py # Command-line interface
โ โโโ config.py # Configuration management
โโโ tests/ # Test suite
โ โโโ test_orchestrator.py
โ โโโ test_agents.py
โ โโโ test_integration.py
โโโ examples/ # Usage examples
โ โโโ basic_debugging.py
โ โโโ complex_scenario.py
โ โโโ batch_debugging.py
โโโ docs/ # Documentation
โ โโโ architecture.md
โ โโโ agent_protocols.md
โ โโโ api_reference.md
โโโ Multi_Agentic_Debugger.ipynb # Jupyter notebook demo
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment variables template
โโโ REFACTORING_REPORT.md # Refactoring documentation
โโโ LICENSE # MIT License
โโโ README.md # This file
- IDE Integration (VS Code, IntelliJ, PyCharm plugins)
- Web-based UI with real-time debugging visualization
- Support for JavaScript, Java, and C++
- Enhanced error pattern database
- Performance optimization and caching
- Real-time production monitoring integration
- Team collaboration features (multi-developer debugging)
- Auto-patching system with automated testing
- Security vulnerability detection agents
- Integration with issue tracking systems (Jira, GitHub Issues)
- Fine-tuned domain-specific LLMs for debugging
- Predictive bug detection (identify bugs before they occur)
- Formal verification integration
- Cross-platform mobile debugging support
- Enterprise-grade deployment options
We welcome contributions from the community! Here's how you can help:
- ๐ Report bugs and issues
- ๐ก Suggest new features or enhancements
- ๐ Improve documentation
- ๐ง Submit pull requests
- โญ Star the repository if you find it useful
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Write or update tests
- Ensure all tests pass (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Write docstrings for all functions and classes
- Include unit tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Prajapati Om (@itsokayyybro) - Creator & Lead Developer
- Jeet Pandya (@PandyaJeet) - Core Contributor
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [Create an issue for contact requests]
- Inspired by research in multi-agent systems and collaborative AI
- Built with LangChain and OpenAI
- Special thanks to the open-source community
Made with โค๏ธ by the Multi-Agentic Debugger Team
If you find this project useful, please consider giving it a โญ!