Transform natural language task descriptions into fully functional, tested, and dockerized code solutions
CodeCraft Agents is an advanced multi-agent AI system that automatically converts natural language descriptions into production-ready code. The project demonstrates the power of specialized AI agents working in collaboration to handle the entire software development lifecycle - from task analysis to deployment.
Note: This is a prototype version currently optimized for single-file applications.
- Fully Automated Code Generation - From concept to working code with minimal human intervention
- Multi-Agent Architecture - Specialized agents for each development stage
- Comprehensive Verification - Built-in testing, validation, and feedback loops
- Docker Integration - Automatic containerization of generated applications
- Knowledge Extraction - Continuous learning from generated solutions
Our system employs a specialized agent for each stage of the development process:
- DecomposerAgent - Breaks down the task description into structured modules and interfaces
- ValidatorAgent - Verifies the completeness and correctness of the plan
- ConsistencyAgent - Checks for data type and logic consistency across modules
- CodeGeneratorAgent - Creates the actual code based on the approved plan
- CodeExtractorAgent - Saves the code to appropriate files
- DockerRunnerAgent - Generates Dockerfile and docker-compose configurations
- TesterAgent - Creates test cases and validates application functionality
- DocumentationAgent - Generates comprehensive usage documentation
- MonitorAgent & CoordinatorAgent - Oversee the process and manage workflow transitions
When you provide a task description to CodeCraft Agents, the system follows this workflow:
- Task Analysis - The DecomposerAgent breaks down the task into manageable components
- Planning & Validation - The system creates and verifies a comprehensive development plan
- Code Generation - Clean, efficient code is created based on the approved plan
- Testing & Containerization - The code is thoroughly tested and packaged in a Docker container
- Documentation - Comprehensive usage documentation is automatically generated
The entire process is governed by our adaptive feedback loop, which ensures high-quality output through multiple verification layers.
Given a simple input:
Create an API server with route /sum that takes two GET parameters a and b (numbers) and returns their sum. Use aiohttp.
CodeCraft Agents will produce:
- A working Python application with error handling and proper structure
- Dockerized environment for easy deployment
- Test suite to verify functionality
- Comprehensive documentation for usage and deployment
The system is built on a modular architecture that includes:
- Advanced prompt engineering for specialized agent roles
- Verification mechanisms for quality control
- Adaptive feedback loops for error correction
- Isolated execution environments for testing
- Vector knowledge base for context enhancement
As a prototype, CodeCraft Agents currently has some limitations:
- Optimized for single-file Python applications
- Works best with web API and basic utility applications
- Limited complexity in database relationships and authentication
- Does not yet support full-scale multi-file projects
- Python 3.9 or higher
- Docker and docker-compose
- Access to OpenRouter API
- Qdrant for vector storage
- Clone the repository:
git clone https://github.com/yourusername/codecraft-agents.git
cd codecraft-agents- Install dependencies:
pip install -r requirements.txt- Start Qdrant using docker-compose:
docker-compose up -d- Set your OpenRouter API key:
export OPENROUTER_API_KEY=your_key_hereRun the system with a task description:
python main.pyBy default, the system will generate code for a sample task. To customize, edit the task variable in main.py.
Output files will be created in the project/ directory.
For more detailed information on the system's architecture and components, see:
- Multi-file project support
- Additional programming languages
- Frontend code generation
- More complex database integrations
- CI/CD pipeline generation
- Enhanced knowledge extraction and reuse
- React and other frontend framework support
This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with ❤️ by the CodeCraft Agents Team