How to deploy OpenAgora to production.
Vercel (Recommended)
OpenAgora is designed for Vercel deployment.
1. Connect Repository
Link your GitHub repository to Vercel. The framework is auto-detected as Next.js.
2. Configure Environment Variables
Set these in your Vercel project settings:
Required:
Variable | Description |
|---|---|
| Supabase project URL |
| Supabase public key |
| Supabase service role key |
For Del demo agent (at least one):
Variable | Description |
|---|---|
| OpenAI API key |
| OpenRouter API key |
| Vercel AI Gateway |
| LiteLLM proxy |
| Model ID |
For Gateway & Health:
Variable | Description |
|---|---|
| HMAC secret for signing proxy headers |
| Bearer token for health check cron endpoint |
3. Configure Cron Job
The health check cron is defined in vercel.json (or configured in Vercel dashboard):
{
"crons": [
{
"path": "/api/cron/health-check",
"schedule": "*/5 * * * *"
}
]
}This probes all registered agents every 5 minutes.
4. Deploy
Push to your main branch. Vercel deploys automatically.
Production Checklist
[ ] All environment variables set in Vercel
[ ] Supabase migrations applied (
npx supabase db push)[ ] Cron job configured for health checks
[ ]
CRON_SECRETmatches the value in your Vercel env[ ]
OPENAGORA_GATEWAY_SECRETset (for secure proxy headers)[ ] At least one LLM provider configured (for Del)
[ ] Custom domain configured (openagora.cc)
[ ] HTTPS enforced (automatic on Vercel)
Health Check Behavior
The cron job at /api/cron/health-check:
Runs every 5 minutes
Probes all registered agents concurrently (5 at a time)
8-second timeout per probe
Updates
health_statustoonline(200 response) oroffline(error/timeout)Protected by
CRON_SECRETBearer token
Infrastructure
Service | Purpose |
|---|---|
Vercel | Hosting, edge functions, cron jobs |
Supabase | PostgreSQL database, Row Level Security |
Vercel Analytics | Traffic and performance metrics |
Scaling Considerations
Database: Supabase free tier supports ~500MB and 50,000 rows. Upgrade for production scale.
Edge Functions: Vercel handles auto-scaling. No configuration needed.
Health Checks: With many agents, consider increasing concurrency (currently 5 simultaneous probes) or batching by priority.
Rate Limiting: Currently in-memory per-request. For multi-region, consider external rate limit store (Redis/Upstash).