An AI-powered autonomous agent for managing, reviewing, and improving your entire GitHub repository portfolio. Automatically analyzes code quality, generates documentation, creates pull requests, and executes delegated tasks across all your public and private repositories.
- π Scans all your repositories (public + private) via GitHub API
- π Analyzes code quality using MiniMax M2.1 for intelligent review
- π Generates status reports (
REPO_STATUS.md) for each repository - π Identifies bugs and stuck areas with TODO/FIXME detection
- π― Recommends next steps for each project
- π Creates PRs for improvements and documentation updates
- π€ Accepts commands via Telegram bot
- β‘ Executes delegated tasks like adding tests, fixing bugs, updating docs
- Python 3.10+
- GitHub Personal Access Token
- MiniMax M2.1 API Key (recommended) or OpenAI API Key
- Telegram Bot Token (optional, for commands)
# Clone the repository
git clone https://github.com/tony-42069/project-agent.git
cd project-agent
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys:
# - GITHUB_TOKEN=ghp_xxxxx
# - MINIMAX_API_KEY=sk-xxxxx (or OPENAI_API_KEY)
# - TELEGRAM_BOT_TOKEN=12345:xxxxx# Review all repositories
python -m src review
# Start the API server
python -m src api
# Start Telegram bot
python -m src bot# Deploy with Docker Compose
./deploy.sh- Automatic scanning of all GitHub repositories
- Intelligent file prioritization for analysis
- Structure detection (Python, Node.js, Go, Rust, Java, C++)
- Documentation quality assessment
- MiniMax M2.1 powered comprehensive code analysis
- Quality scoring (code quality, documentation, structure, testing)
- Bug and issue detection
- TODO/FIXME identification
- Stuck area detection
REPO_STATUS.mdgeneration for each repository- Quality score visualization with progress bars
- Next steps recommendations
- Summary dashboard for all repositories
- Automatic branch creation
- PR description generation from reviews
- Review workflow management
- Merge scheduling
- Natural language command parsing
- Priority-based task queue
- Task execution engine
- Real-time status tracking
/help - Show available commands
/status - System status overview
/review <repo> - Review specific repository
/review all - Review all repositories
/list - List all tracked repositories
/pr <repo> - Create PR for improvements
/execute "<task>" - Delegate a coding task
project-agent/
βββ src/
β βββ api/ # FastAPI endpoints
β βββ commands/ # Telegram bot & command parser
β βββ core/ # Config, database, logging, security, monitoring
β βββ github/ # GitHub API client
β βββ openai/ # OpenAI integration
β βββ report/ # Report generation & PR creation
β βββ review/ # Code analysis & review orchestrator
β βββ tasks/ # Task delegation system
βββ deploy/ # Systemd service file
βββ scripts/ # Startup scripts
βββ grafana/ # Grafana dashboards
βββ prometheus.yml # Prometheus config
βββ docker-compose.yml # Docker orchestration
βββ Dockerfile # Container definition
βββ config.yaml # Application configuration
βββ pyproject.toml # Project metadata
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
β | GitHub Personal Access Token |
MINIMAX_API_KEY |
β | MiniMax M2.1 API Key |
OPENAI_API_KEY |
β | OpenAI API Key (alternative to MiniMax) |
TELEGRAM_BOT_TOKEN |
β | Telegram Bot Token |
TELEGRAM_WEBHOOK_URL |
β | Telegram Webhook URL |
app:
host: "0.0.0.0"
port: 8000
log_level: "INFO"
github:
rate_limit_wait: 1.0
max_retries: 3
minimax:
model: "MiniMax-M2.1"
temperature: 0.3
review:
max_files_per_repo: 100
exclude_patterns: [*.pyc, node_modules/, .git/]The agent includes built-in monitoring with:
- Prometheus Metrics:
/metricsendpoint - Health Checks:
/healthendpoint - Grafana Dashboards: Pre-configured visualizations
- Uptime Tracking: Availability monitoring
Access:
- API: http://localhost:8000
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000 (admin/admin)
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f project-agent
# Stop services
docker-compose down# Copy service file
sudo cp deploy/project-agent.service /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable and start
sudo systemctl enable project-agent
sudo systemctl start project-agent
# Check status
sudo systemctl status project-agentpython -m src review allpython -m src review owner/repo-name/list # List all repositories
/review my-api-project # Review specific repo
/status # Check system status
/execute "add tests to auth module" # Delegate task
# List repositories
curl http://localhost:8000/api/v1/repositories
# Review repository
curl -X POST http://localhost:8000/api/v1/review \
-H "Content-Type: application/json" \
-d '{"repository_name": "owner/repo"}'
# Health check
curl http://localhost:8000/health
# Get metrics
curl http://localhost:8000/metrics- Rate limiting to prevent abuse
- API key authentication
- Audit logging for all actions
- Secure password hashing (PBKDF2)
- HMAC signature verification
- Docker security hardening
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- MiniMax for M2.1
- GitHub for the API
- Python Telegram Bot community