An autonomous AI agent setup built with CrewAI and Gemini that moves beyond simple prompting to implement Loop Engineering.
- Coder Agent: Writes Python code based on task requirements.
- Python Execution Tool: Executes code in a runtime environment to validate output.
- Self-Healing Debugger Agent (Loop): Captures error traces and automatically refactors code until execution succeeds.
- Framework: CrewAI
- Language: Python
- Model: Gemini AI
-
Clone the Repository:
git clone https://github.com/satyanarayana51115/auto-code-fixer.git cd auto-code-fixer -
Create a Virtual Environment:
python -m venv venv -
On Windows:
venv\Scripts\activate -
On Mac/Linux:
source venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt -
Configure API Keys:
GEMINI_API_KEY=your_gemini_api_key_here -
Run the Self-Healing Loop:
python main.py
graph TD
A[User Prompt / Task] --> B[Code Writer Agent]
B --> C[Code Execution Tool]
C -->|If Error Detected| D[Debugger Agent - Loop]
D -->|Feeds Traceback & Refactors| C
C -->|If Success| E[Clean Output]
Satyanarayana - @satyanarayana51115