Skip to content

OmerYasirOnal/Agent-MVP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Agent MVP - Autonomous Software Development

Self-Improving AI Agent for Automatic Software Project Generation

An intelligent AI-powered system that automatically analyzes, designs, codes, tests, and documents complete software projects using state-of-the-art language models via OpenRouter.ai.

FastAPI Python Docker OpenRouter


🎯 What Does It Do?

The AI Agent MVP takes a simple project description and automatically generates:

  1. πŸ“Š Project Analysis - Requirements, user stories, technical specifications
  2. πŸ—οΈ Software Architecture - System design, database schema, API structure
  3. πŸ’» Complete Source Code - Ready-to-run project files and folders
  4. πŸ§ͺ Testing Strategy - Test cases, automation setup, quality gates
  5. πŸ“š Documentation - User guides, API docs, deployment instructions
  6. πŸ”§ Real Project Files - Actual working directories with proper file structure

Input: "Build a todo app with React frontend and Node.js backend"
Output: Complete working project with all files, documentation, and deployment ready!


✨ Key Features

  • πŸš€ End-to-End Automation - From idea to working code
  • πŸ€– Multi-Model Support - Works with various AI models via OpenRouter
  • πŸ“ Real File Generation - Creates actual project directories and files
  • 🐳 Docker Ready - Containerized for easy deployment
  • πŸ”„ Sequential Pipeline - 6-phase structured development process
  • πŸ“Š Comprehensive Logging - Track every step of the generation process
  • 🎯 Production Ready - Clean, documented, and maintainable code output

πŸ› οΈ Tech Stack

Component Technology
Backend Python 3.12 + FastAPI
AI Integration OpenRouter.ai API
Current Model Qwen 3 Coder (Free)
Container Docker + Docker Compose
Environment python-dotenv
HTTP Client requests

πŸš€ Quick Start

Prerequisites

1. Clone the Repository

git clone https://github.com/yourusername/mvp-ai-agent.git
cd mvp-ai-agent

2. Configure Environment

# Add your OpenRouter API key to .env
echo "OPENROUTER_API_KEY=your_actual_api_key_here" >> .env

3. Build and Run

# Build the Docker image
docker build -t mvp-ai-agent .

# Run with volume mapping for real-time file access
docker run -d -p 8000:8000 -v $(pwd)/outputs:/app/outputs mvp-ai-agent

4. Test the API

# Check if the service is running
curl http://localhost:8000/health

# Generate your first project
curl -X POST "http://localhost:8000/generate" \
  -H "Content-Type: application/json" \
  -d '{"description": "Build a simple todo app with React frontend and Express.js backend"}'

5. Check Generated Files

# View generated project structure
ls -la outputs/
tree outputs/source_code/  # If tree is installed

# Generated files will be in:
# outputs/source_code/frontend/
# outputs/source_code/backend/

πŸ“š API Documentation

Interactive API Docs

Once running, visit: http://localhost:8000/docs

Main Endpoints

POST /generate

Generate a complete software project from description.

Request:

{
  "description": "Your project description here"
}

Response:

{
  "success": true,
  "message": "AI agent pipeline completed successfully",
  "execution_time": 45.2,
  "outputs": {
    "analysis": "outputs/analysis.md",
    "design": "outputs/design.md",
    "source_code": "outputs/source_code/implementation.md",
    "testing": "outputs/tests.md",
    "documentation": "outputs/documentation.md"
  },
  "project_generation": {
    "success": true,
    "created_files": ["frontend/App.jsx", "backend/server.js"],
    "created_directories": ["frontend", "backend"],
    "total_files": 8,
    "total_directories": 3
  }
}

Other Endpoints

  • GET /health - Health check
  • GET / - Service status

βš™οΈ Configuration

Environment Variables

Variable Description Default
OPENROUTER_API_KEY Your OpenRouter API key Required
OPENROUTER_MODEL AI model to use qwen/qwen3-coder:free

Model Switching

Available Models:

  • qwen/qwen3-coder:free (Default - Free)
  • google/gemini-2.0-flash-exp:free (Free)
  • anthropic/claude-3.5-sonnet (Paid)
  • openai/gpt-4o (Paid)

Switch Models:

# Via environment variable
export OPENROUTER_MODEL="google/gemini-2.0-flash-exp:free"

# Via Docker run
docker run -e OPENROUTER_MODEL="anthropic/claude-3.5-sonnet" mvp-ai-agent

πŸ“ Project Structure

mvp-ai-agent/
β”œβ”€β”€ app.py                      # FastAPI orchestrator
β”œβ”€β”€ openrouter_service.py       # AI model integration
β”œβ”€β”€ model_config.py            # Model configuration
β”œβ”€β”€ prompts/                   # AI prompt templates
β”‚   β”œβ”€β”€ analysis.txt
β”‚   β”œβ”€β”€ design.txt
β”‚   β”œβ”€β”€ coding.txt
β”‚   β”œβ”€β”€ testing.txt
β”‚   └── documentation.txt
β”œβ”€β”€ outputs/                   # Generated content
β”‚   β”œβ”€β”€ analysis.md           # Project analysis
β”‚   β”œβ”€β”€ design.md             # Architecture design
β”‚   β”œβ”€β”€ tests.md              # Testing strategy
β”‚   β”œβ”€β”€ documentation.md      # Final documentation
β”‚   └── source_code/          # Real project files
β”‚       β”œβ”€β”€ frontend/         # Frontend application
β”‚       β”œβ”€β”€ backend/          # Backend application
β”‚       └── database/         # Database files
β”œβ”€β”€ requirements.txt          # Python dependencies
β”œβ”€β”€ Dockerfile               # Container configuration
└── .env                     # Environment variables

🎯 Example Use Cases

Web Applications

{
  "description": "Create a blog platform with user authentication, post creation, comments, and admin panel using Next.js and PostgreSQL"
}

Mobile Backend

{
  "description": "Build a REST API for a fitness tracking app with user profiles, workout logging, and progress analytics using FastAPI and MongoDB"
}

Desktop Application

{
  "description": "Develop a file organizer desktop app with drag-drop interface, automatic categorization, and cloud sync using Electron and Node.js"
}

πŸ”„ Development Workflow

The 6-Phase Pipeline

  1. πŸ” Analysis Phase - Requirements gathering, user stories, technical specs
  2. πŸ—οΈ Design Phase - System architecture, database design, API specs
  3. πŸ’» Coding Phase - Complete source code, project structure, config files
  4. πŸ§ͺ Testing Phase - Test strategies, test cases, quality assurance
  5. πŸ“š Documentation Phase - User docs, API docs, deployment guides
  6. πŸ”§ Real Project Generation - Actual file creation, directory structure

πŸ“Š Performance & Limitations

Metric Value
Average Generation Time Depending on the performance of the language model
Supported File Types JavaScript, Python, HTML, CSS, JSON, Markdown
Max Project Complexity Medium to large applications
Concurrent Requests Limited by OpenRouter rate limits

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Clone and setup
git clone https://github.com/yourusername/mvp-ai-agent.git
cd mvp-ai-agent

# Install dependencies
pip install -r requirements.txt

# Run locally
python app.py

πŸ“„ License

This project is licensed under the MIT License.


πŸ™ Acknowledgements


πŸ“ž Support


Made with ❀️ by Γ–mer Yasir Γ–nal(https://github.com/yourusername)

"From idea to implementation in minutes, not months."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published