A production-grade multi-agent system that autonomously builds software based on natural language specifications. Just describe what you want, and AI Agents (Planner β Coder β Reviewer β QA) generate the complete code.
Built with CrewAI, Groq (Llama 3.3), MCP-style File Tools, and AI Safety Guardrails.
- Planner Agent π§ β Analyzes your requirements and creates a development plan.
- Coder Agent βοΈ β Writes clean, production-ready code using MCP File Tools.
- Reviewer Agent π β Reviews the code for bugs, logical errors, and security issues.
- QA Agent β β Validates that the code meets the original requirements.
All agents work autonomously β just enter specs and watch the factory build your software!
- β Multi-Agent Orchestration β 4 specialized agents collaborate like a real dev team.
- β MCP (Model Context Protocol) Tools β Agents can Read/Write/List files in a sandboxed workspace.
- β
AI Safety Guardrails β Automatically scans for dangerous patterns (
eval,os.system,rm -rf). - β Beautiful UI β Streamlit-based interface for easy interaction.
- β FastAPI Backend β REST API to trigger builds programmatically.
- β Zero Cloud Lock-in β Uses Groq free tier and runs 100% locally.
| Layer | Technology |
|---|---|
| Multi-Agent Framework | CrewAI (0.108.0) |
| LLM | Groq (Llama 3.3 70B Versatile) |
| Backend | FastAPI, Uvicorn |
| Frontend | Streamlit |
| Tools | Custom MCP File System Tools |
| Guardrails | Regex-based Dangerous Pattern Scanner |
| Language | Python 3.12+ |
git clone https://github.com/vaibhav07772/Autonomous-AI-Software-Factory.git
cd Autonomous-AI-Software-Factory
2. Create Conda Environment (Recommended)
conda create -n ai_factory python=3.12 -y
conda activate ai_factory
3. Install Dependencies
pip install -r requirements.txt
4. Set Up API Keys (.env file)
Create a .env file in the root directory:
OPENAI_API_KEY=gsk_your_groq_key_here
OPENAI_BASE_URL=https://api.groq.com/openai/v1
OPENAI_MODEL_NAME=groq/llama-3.3-70b-versatile
Get your free Groq API key: console.groq.com/keys
βΆοΈ Run the Application
Step 1: Start the Backend (FastAPI)
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
Wait for Application startup complete.
Step 2: Start the Frontend (Streamlit)
streamlit run streamlit_app.py
Step 3: Open Browser
Go to http://localhost:8501 β Enter specs β Click "β‘ Build Now"!
π Example Usage
Input Specs:
Build a simple calculator with HTML, CSS, and JS.
It should have add, subtract, multiply, divide.
Create three files: index.html, style.css, script.js.
Output:
workspace/index.html β Calculator structure
workspace/style.css β Calculator styling
workspace/script.js β Calculator logic (add, subtract, multiply, divide)
Guardrail Scan: β
All files safe!
π Project Structure
Autonomous-AI-Software-Factory/
βββ agents/
β βββ factory_crew.py # CrewAI Agents (Planner, Coder, Reviewer, QA)
β βββ tools/
β βββ mcp_file_tools.py # MCP-style File System Tools
βββ app/
β βββ main.py # FastAPI Backend
βββ guardrails/
β βββ code_guardrail.py # AI Safety Scanner
βββ workspace/ # Sandbox where code is generated
βββ logs/ # Build logs (auto-generated)
βββ streamlit_app.py # Streamlit UI
βββ requirements.txt # Dependencies
βββ .env # API Keys (ignored)
βββ README.md # This file
π Guardrails (Safety Features)
The system automatically scans generated code for:
os.system() β System command execution
subprocess β Shell command execution
eval() / exec() β Dynamic code execution
rm -rf β Dangerous file deletion
__import__() β Dynamic imports
Any file containing these patterns is flagged as Dangerous and blocked.
π‘ Future Improvements
Deploy with Docker + Kubernetes.
Add support for more file types (Python, JSON, YAML).
Integrate with GitHub API for auto-PR creation.
Add human-in-the-loop approval for critical code sections.
Support for multiple LLM providers (OpenAI, Anthropic).
π¬ Connect with Me
Author: Vaibhav Singh
GitHub: vaibhav07772
LinkedIn: vaibhav Singh
β If this project helped you, please give it a star! β