Skip to content

SH-Nihil-Mukkesh-25/AutoGenesis

Repository files navigation

🧬 AutoGenesis

Autonomous Multi-Agent AI Developer Platform

Generate. Review. Deploy. Evolve.

Python Next.js FastAPI License: MIT Docker Vercel


🚀 What is AutoGenesis?

AutoGenesis is a multi-agent autonomous AI developer platform that transforms natural language prompts into complete, production-ready software projects — including source code, unit tests, CI/CD pipelines, and Dockerfiles — all with zero manual intervention.

It uses a quality-gated, multi-pass pipeline with four specialized AI agents that plan, code, review, and deploy. The system gets smarter over time via an XP-based intelligence system and RLHF feedback loop.


🖼️ Screenshots

⚡ Code Generation Dashboard

Describe your idea, pick a template, or speak it — AutoGenesis does the rest.

Code Generation Dashboard


🖥️ Generated Code Viewer

View all generated files with syntax highlighting and an AI-assigned quality score.

Code View Panel


🔭 Live Preview

See your generated web project rendered live in a sandboxed preview pane.

Live Preview


🧠 AI Skill Tree

Track the AI's growth stages — from Baby to Sage — as it learns from every project.

AI Skill Tree


✨ Core Features

Feature Description
🏗️ Multi-Agent Pipeline Architect → Coder → Reviewer → DevOps agents working in sequence
🔁 Quality-Gated Loops Automatically retries and fixes until quality thresholds are met
📡 Real-Time Streaming Live progress updates via Server-Sent Events (/run-stream)
🧠 XP & Skill Tree Gamified AI progression: Baby → Child → Teen → Adult → Expert → Sage
💬 Voice Input Speak your project idea via Web Speech API
🎯 Live Preview Instantly preview generated web projects in an iframe sandbox
🔬 RLHF Feedback Star ratings captured and converted to Oumi-compatible DPO training data
⚙️ DevOps Generation Auto-generates unit tests, GitHub Actions CI, and Dockerfiles
🚀 One-Click Deploy Deploy to Vercel or build & push a Docker image straight from the UI
🗂️ Persistent Memory Remembers past projects and uses context for smarter future generations
🔐 Security Hardened CORS allowlist, trusted host middleware, security headers, authenticated /reset
🌊 Kestra Integration AI memory summarization workflows triggered on milestones

🤖 Agent Architecture

┌────────────────────────────────────────────────────────────┐
│                     AutoGenesis Pipeline                    │
│                                                            │
│   User Prompt                                              │
│       │                                                    │
│       ▼                                                    │
│  🏗️ Architect Agent  ──→  Project Plan (files, tech stack) │
│       │                                                    │
│       ▼                                                    │
│  💻 Coder Agent      ──→  Source files (multi-language)    │
│       │                                                    │
│       ▼                                                    │
│  🔍 Reviewer Agent   ──→  Quality score + issue list       │
│       │                                                    │
│       ▼                                                    │
│  ⚙️ DevOps Agent     ──→  Tests, CI/CD, Dockerfile         │
│       │                                                    │
│       ▼                                                    │
│  🎯 Quality Gate     ──→  Pass / Retry loop                │
│                                                            │
└────────────────────────────────────────────────────────────┘

Provider Routing

Priority Provider Model Role
1 CCAPI MiniMax-M2.5 Primary gateway
2 Gemini gemini-2.5-flash Planner & Reviewer
3 Groq llama-3.3-70b Coder & DevOps

All providers include exponential backoff retry, rate-limit detection, telemetry, and automatic failover.


🛠️ Tech Stack

Backend

  • Python 3.9+ · FastAPI · Uvicorn
  • Gemini API (Architect, Reviewer) · Groq API (Coder, DevOps)
  • Server-Sent Events for real-time streaming
  • Oumi RL for RLHF fine-tuning pipeline

Frontend

  • Next.js 16 · TypeScript · Tailwind CSS
  • Web Speech API for voice input

DevOps & Integrations

  • Docker · Docker Compose · GitHub Actions
  • Vercel deployment · Kestra AI workflow automation
  • CodeRabbit for automated PR reviews

📦 Requirements

  • Python 3.9+
  • Node.js 20.x
  • npm >=9
  • Optional: vercel CLI, docker

⚙️ Environment Setup

# Copy and fill environment variables
cp .env.example .env
cp backend/.env.example backend/.env

Minimum required keys:

Variable Description
GEMINI_API_KEY Primary planner/reviewer
GROQ_API_KEY Primary coder/devops
NEXT_PUBLIC_API_URL Frontend → backend URL (e.g. http://localhost:8000)

Top-Tier Mode (optional):

TOP_TIER_MODE=true
TOP_TIER_MAX_ATTEMPTS=3
TOP_TIER_QUALITY_THRESHOLD=0.85
TOP_TIER_MIN_REVIEW_SCORE=0.80
TOP_TIER_MIN_UI_SCORE=0.70
AGENT_PROVIDER_MAP={"architect":"gemini","coder":"groq","reviewer":"gemini","devops":"groq"}
ALLOW_MOCK_FALLBACK=false

🏃 Run Locally

Backend

cd backend
python -m venv .venv

# Windows
.venv\Scripts\activate
# macOS/Linux
# source .venv/bin/activate

pip install -r requirements.txt
uvicorn api:app --reload --host 0.0.0.0 --port 8000

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:3000 in your browser.

Or use Docker Compose

docker-compose up --build

📡 API Reference

Endpoint Method Description
/run POST Non-streaming project generation
/run-stream POST Streaming generation via SSE
/preview/start POST Start live preview server
/preview/status GET Preview server status + logs
/preview/stop POST Stop live preview server
/optimize POST Optimize a prompt before generation
/fix POST AI-assisted code fix
/explain POST AI code explanation
/memory GET Project memory history
/intelligence GET XP / level status
/skills GET Skill tree data
/feedback POST Submit RLHF star rating
/feedback/stats GET RLHF & training dataset stats
/deploy POST Deploy to Vercel or Docker
/status GET Provider status + pipeline telemetry
/kestra/summarize POST Trigger Kestra memory workflow
/kestra/status GET Kestra integration history
/reset DELETE Admin reset (requires x-admin-token)

🚀 Deployment

Vercel

Set VERCEL_TOKEN in your environment, then:

# From UI: click Deploy → Vercel
# Or via API:
POST /deploy  { "target": "vercel" }

Set VERCEL_ALLOW_INTERACTIVE=true to use interactive CLI login locally.

Docker

POST /deploy  { "target": "docker", "push_image": true }

🧬 RLHF & Oumi Integration

AutoGenesis captures user star ratings and converts them to training data:

File Purpose
storage/feedback.json Raw star ratings
storage/oumi_dataset.jsonl Oumi-compatible DPO dataset
storage/rlhf_meta.json Training metadata

Auto-training controls:

  • RLHF_AUTO_TRAIN=true
  • RLHF_MIN_FEEDBACK_FOR_TRAIN=10

🌊 Kestra Integration

AutoGenesis can trigger Kestra workflows for AI memory summarization:

KESTRA_ENABLED=true
KESTRA_API_URL=http://localhost:8080
KESTRA_NAMESPACE=autogenesis
KESTRA_FLOW_ID=summarize_memory
KESTRA_AUTO_SUMMARIZE=true
KESTRA_SUMMARY_INTERVAL=10   # trigger every N memory saves

🧪 Testing

Backend unit tests

cd backend
pytest -q

Frontend smoke test

cd frontend
npm run test:smoke

Frontend production build check

cd frontend
npm run build

📁 Project Structure

autogenesis/
├── assets/                   # Screenshots & media
├── backend/
│   ├── agent/
│   │   ├── agent.py          # Provider routing + retry
│   │   ├── orchestrator.py   # Multi-pass quality pipeline
│   │   ├── agents.py         # Agent class definitions
│   │   ├── coder.py          # Language-aware code generation
│   │   ├── reviewer.py       # Code review + scoring
│   │   ├── quality_gate.py   # Multi-signal quality evaluation
│   │   ├── sandbox.py        # Subprocess execution sandbox
│   │   ├── preview.py        # Runtime preview management
│   │   ├── memory.py         # Project memory persistence
│   │   ├── feedback.py       # RLHF feedback loop
│   │   └── intelligence.py   # XP / progression tracking
│   ├── api.py                # FastAPI endpoints + SSE
│   └── oumi_rl.py            # Oumi RL integration
├── frontend/
│   └── src/app/page.tsx      # Main Next.js UI
├── cli/
│   └── autogenesis.py        # Cline CLI
├── kestra/
│   └── flows/summarize_memory.yaml
├── .coderabbit.yaml          # CodeRabbit PR review config
├── docker-compose.yml
├── vercel.json
└── .env.example

🤝 Contributing

See CONTRIBUTING.md for guidelines.


📄 License

This project is licensed under the MIT License.


Built for Hackathon 2025 · Made with ❤️ and a lot of AI

About

AutoGenesis is an AI agent that turns ideas into full software projects - with code, tests, CI/CD, Docker, live preview, self‑review, and XP‑based learning.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors