Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🤖 GitHub AI Agent

An autonomous, asynchronous AI agent that manages your GitHub profile using Gemini 3.6 Flash + FastAPI

Python FastAPI Gemini Render License: MIT

Asynchronous event processing · Auto-replies to issues · Auto-labels · Automated PR code reviews · Daily README stats updater · Star thanker


⚡ Key Features

  • Asynchronous Background Processing: Dispatches incoming webhooks to isolated background threads instantly (<200ms response time) to guarantee zero 500 delivery timeouts on GitHub.
  • 💬 Automated Issue Triage & Labeling: Gemini reads new issue contents, generates context-aware replies, and auto-assigns tags (bug, feature, question).
  • 🔍 AI Pull Request Reviewer: Evaluates code diffs in real-time, providing structured feedback and inline improvements.
  • Stargazer Engagement: Detects new stargazers and sends personalized thank-you notes in repository discussions.
  • 📊 Dynamic Profile README Updater: Runs scheduled background tasks to keep GitHub profile statistics up to date.

📸 Proof of Concept

Automated PR Code Review Live Render Deployment GitHub Code Diff Inspection
PR Review Proof Render Proof PR Diff Proof

🏗️ Architecture

GitHub Webhook Event (Issue / PR / Star)
        │
        ▼
FastAPI Webhook Server (/webhook)  ──[Returns 200 OK (<200ms)]──► GitHub
        │
        ▼ (Daemon Background Thread)
Agent Core (Routes Event)
     │               │               │
     ▼               ▼               ▼
Gemini 3.6 Flash   GitHub REST API   Scheduler
 (Reasoning)       (Executes Actions) (Background Tasks)

🛠️ Project Structure

github-ai-agent/
├── main.py                  # FastAPI server + Async thread webhook dispatcher
├── scheduler.py             # Daily background jobs
├── agent/
│   ├── core.py              # Event router
│   ├── claude_client.py     # Gemini 3.6 Flash client wrapper
│   └── github_client.py     # GitHub REST API interface
├── skills/
│   ├── issue_responder.py   # Auto-reply to issues
│   ├── issue_labeler.py     # Auto-label issues
│   ├── pr_reviewer.py       # Auto-review PR diffs
│   ├── readme_updater.py    # Profile README stats updater
│   └── star_thanker.py      # Stargazer engagement
├── .env.example
├── Dockerfile
├── docker-compose.yml
└── requirements.txt

🚀 Quick Start

1. Clone Repository

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

2. Configure Environment Variables

cp .env.example .env

Edit .env:

GITHUB_TOKEN=ghp_your_token_here
BOT_USERNAME=BhavanBot
GITHUB_WEBHOOK_SECRET=your_secret
GEMINI_API_KEY=your_gemini_api_key

3. Local Execution

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

🗺️ Roadmap

  • Sub-200ms Asynchronous Threading Pipeline
  • Issue auto-responder & labeler
  • Automated PR code reviewer (Gemini 3.6 Flash)
  • Daily profile README stats updater
  • Stargazer engagement module
  • LinkedIn automated activity summaries
  • Multi-repository webhook dashboard

👨‍💻 Author

Bhavan Kumar RT — B.E. Electrical & Electronics Engineering, Rajalakshmi Engineering College


About

An autonomous, asynchronous AI agent powered by FastAPI and Gemini 3.6 Flash. Automates GitHub repository management, including intelligent issue triage, real-time PR code reviews, background webhooks, stargazer engagement, and profile README stats updates.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages