An AI-powered autonomous coding assistant that transforms natural language descriptions into fully functional projects. Built with LangGraph and powered by Groq, Coder Buddy simulates a complete development team workflow—planning, architecture design, and implementation—all in one seamless agent pipeline.
- 🤖 Multi-Agent Architecture – Leverages specialized agents (Planner, Architect, Coder) for different development phases
- 💬 Natural Language Input – Simply describe what you want to build
- 📁 Automatic File Generation – Creates complete, working projects with proper file structure
- 🔧 Real Developer Workflow – Plans → Designs → Implements (just like a real development team)
- 🚀 Fast & Efficient – Uses Groq's fast inference for rapid project generation
- 🔄 Iterative Refinement – Automatically retries and handles errors gracefully
- 📝 Context-Aware – Each agent maintains context from previous stages
Coder Buddy uses a multi-agent orchestration pattern:
User Request
↓
[PLANNER AGENT] → Creates detailed project plan
↓
[ARCHITECT AGENT] → Breaks down into implementation tasks
↓
[CODER AGENT] → Implements each task and writes files
↓
Generated Project Files
| Agent | Role | Output |
|---|---|---|
| Planner | Analyzes request and creates a structured project plan | JSON with project structure and features |
| Architect | Decomposes plan into granular, implementable tasks | Implementation steps with detailed context |
| Coder | Implements tasks using available tools (read/write files, run commands) | Complete, working source code files |
Before getting started, ensure you have:
- Python 3.11+ installed
- uv package manager (Installation Guide)
- Groq API Key (Get one here)
- A code editor (VS Code, PyCharm, etc.)
git clone <repository-url>
cd coder-buddy# Create virtual environment
uv venv
# Activate it
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activateuv pip install -r pyproject.tomlCreate a .env file in the project root:
cp .sample_env .envEdit .env and add your Groq API key:
GROQ_API_KEY=your_api_key_here
python main.pyGenerated projects will be created in the generated_project/ directory.
"Create a colorful modern to-do app with HTML, CSS, and JavaScript"
Generates: index.html, styles.css, script.js with full task management functionality
"Build a simple calculator web application with a clean interface"
Generates: index.html, styles.css, script.js with calculator logic
"Create a simple blog API in FastAPI with SQLite database"
Generates: main.py, models.py, database.py with REST endpoints
coder-buddy/
├── main.py # Application entry point
├── pyproject.toml # Project dependencies
├── .env # Environment variables (create this)
├── agent/
│ ├── __init__.py
│ ├── graph.py # LangGraph workflow orchestration
│ ├── states.py # Pydantic state models
│ ├── prompts.py # Agent system prompts
│ └── tools.py # Tool definitions (file I/O, commands)
├── generated_project/ # Output directory for generated projects
├── resources/
│ ├── coder_buddy_diagram.png # Architecture diagram
│ └── coder_buddy_diagram.mmd
├── README.md # This file
└── uv.lock # Dependency lock file
Edit agent/graph.py:
llm = ChatGroq(model="openai/gpt-4-turbo") # Change to desired modelAvailable models: Groq API Documentation
In agent/graph.py, modify:
max_retries = 3 # Increase for better resilience, decrease for speed| Issue | Solution |
|---|---|
GROQ_API_KEY not found |
Ensure .env file exists with valid API key |
Module not found: langchain |
Run uv pip install -r pyproject.toml |
| Generation times out | Check internet connection, verify API key, try simpler prompt |
| Incomplete code in files | Check console logs, system has automatic retry logic |
This project includes enhanced error handling and retry logic:
- 3-attempt retry mechanism for robust error recovery
- Smart JSON extraction for better parsing of model responses
- Fallback mechanisms when standard tool calling fails
- Improved prompts with explicit formatting guidelines
See FIXES_APPLIED.md for detailed changes.
Contributions welcome! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add your feature' - Push to branch:
git push origin feature/your-feature - Open a Pull Request
Demonstrating the power of multi-agent AI systems for software development.
Questions? Open an issue on GitHub or contact support.
Last Updated: March 2026
