
Copilot Agent Lite — Self-Hosted GitHub Copilot Su
A lightweight Copilot subscription agent runtime built on FastAPI and Copilot SDK. Manage multi-account OAuth, scheduled tasks, GitHub Enterprise support, and a bilingual Web UI.
#Ingenieurwesen#Produkt#Produktivität
Rating
Weitere Bewertungen erforderlich
Sold
1
How to use
Herunterladen
Overview
Copilot Agent Lite is a lightweight, self-hosted runtime for managing GitHub Copilot subscriptions. Built on FastAPI and the official Copilot SDK, it provides a complete solution for deploying, managing, and monitoring Copilot access across your organization — with zero external dependencies.
Key Features
Multi-Account Management
- OAuth Device Flow for adding Copilot accounts
- Batch import/export accounts
- Account tagging and organization
- Real-time quota monitoring per account
Web Dashboard (Built-in)
- Bilingual UI (English/Chinese) with instant switching
- 4 views: Chat, History, Agents, Settings
- Light/Dark/System theme support
- Server-Sent Events (SSE) for real-time streaming
- Zero build dependencies (vanilla JS + Tailwind CDN)
Scheduled Task Engine
- APScheduler-powered cron/interval scheduling
- YAML-based agent definition (no coding required)
- Run history with full audit trail
GitHub Enterprise Support
- Compatible with GitHub Enterprise Server (GHE)
- Custom hostname and enterprise ID configuration
- Classic PAT and GitHub App authentication
Production-Ready
- Enhanced start.sh with start/restart/stop/status
- Health check endpoint with process/port verification
- PID management and stale process cleanup
- Systemd service support for production deployment
Quick Start
# Clone and install
git clone <repo-url> copilot-agent-lite
cd copilot-agent-lite
python -m venv .venv
source .venv/bin/activate
pip install -e .
# Configure token
# Edit .env with your GitHub classic PAT (ghp_...)
# Start the service
./scripts/start.sh start
# Access Web UI
open http://localhost:8765
Architecture
copilot-agent-lite/
├── src/copilot_agent_lite/
│ ├── main.py # Entry point (uvicorn)
│ ├── app.py # FastAPI app (routes, webhook, settings API)
│ ├── runner.py # Copilot token exchange + chat API
│ ├── copilot_accounts.py # Multi-account management (OAuth, quota)
│ ├── config.py # Agent YAML + schedules.yaml loader
│ ├── scheduler.py # APScheduler (cron / interval)
│ └── models.py # Data models
├── agents/ # Agent definition YAML files
├── schedules.yaml # Scheduled task configuration
├── web/ # Web UI (HTML + JS)
│ ├── index.html # Main page (4 views)
│ └── static/app.js # App logic (i18n, SSE streaming)
└── scripts/start.sh # Lifecycle management script
Use Cases
- Team Copilot Subscription Management: Add and manage multiple Copilot seats from a single dashboard
- Automated Report Generation: Schedule daily reports of Copilot usage and quota consumption
- Self-Hosted AI Gateway: Route chat requests through your own Copilot subscription infrastructure
- Enterprise Deployment: Deploy behind a VPN with GitHub Enterprise Server support
Requirements
- Python 3.10+
- GitHub classic PAT (ghp_) with repo + read:user scopes
- Active GitHub Copilot subscription
Token Authentication
| Token Type | Prefix | Compatible |
|---|---|---|
| Fine-grained PAT | github_pat_ |
❌ Not supported |
| Classic PAT | ghp_ / gho_ |
✅ Supported |
| GitHub App token | ghu_ / ghs_ |
✅ Supported |
Troubleshooting
Common issues and solutions are documented in the skill package, including:
- HTTP 403: Fine-grained PAT vs Classic PAT diagnosis
- Port conflicts: Automatic cleanup
- Module import errors: Virtual environment management
- Health check failures: Token validation workflow
Support
For issues and feature requests, contact the publisher or open an issue on the project repository.


