Admin Guide
Everything an admin needs to configure and manage the app.
Becoming an Admin
UPDATE profiles SET is_admin = true WHERE email = 'your@email.com';Admin accounts bypass all rate limits and usage limits.
Provider Management
Settings → Provider Management
| Provider | Models | Notes |
|---|---|---|
| Anthropic | Claude family | Native SDK. Best for tool calling. |
| Gemini family | Native Google AI SDK. Cheapest flash models. | |
| OpenAI | GPT family | OpenAI-compatible adapter. |
| OpenRouter | Any model | Proxy for 100+ models. |
Adding a provider
Click Add Provider, enter your API key, click Save, then Test to verify.
Security
Keys are encrypted with AES-256-GCM and never sent to the client (displayed as ••••xxxx). ENCRYPTION_KEY is required.
Custom OpenAI-compatible endpoints
Supports OpenRouter, xAI, Ollama, LM Studio, and any OpenAI-compatible proxy.
Model Management
Settings → Model Management
Fields: Model ID, Display Name, Provider, Type, Input/Output Price, Default, Sort Order.
Model routing
anthropic/*→ Anthropic SDKgoogle/*→ Google AI SDKopenai/*,openrouter/*,xai/*, custom → OpenAI-compatible adapter
Special-purpose models
| Purpose | Config | Default |
|---|---|---|
| Titles | TITLE_MODEL | google/gemini-3-flash-preview |
| Chat | DEFAULT_CHAT_MODEL | anthropic/claude-sonnet-4.5 |
| Images | DEFAULT_IMAGE_MODEL | google/gemini-2.5-flash-image |
| Search summary | Per-user setting | Title model |
| Briefing/Insights/Tools | Per-user ai_model_config | Title model |
| AI Assist | Per-user ai_model_config | Default chat model |
Usage Limits
Settings → Usage Limits
Settings: Monthly Budget, Daily Conversation Limit, Warning Threshold (default 80%).
Enforcement: Budget check runs before every AI request. Conversation count is checked per-day. Admin accounts bypass all limits.
Per-user overrides and global defaults are both supported.
Rate Limiting
In-memory sliding window per user per category.
| Category | Window | Limit |
|---|---|---|
chat | 1 min | 20 requests |
image | 1 min | 5 requests |
search | 1 min | 10 requests |
ai-assist | 1 min | 15 requests |
Limitation: Rate limit counters reset on serverless cold starts.
Usage Overview
Settings → Usage Overview
Shows: total spend, per-user breakdown, model usage, and spending trends. Click any user row for a detailed view.
User Management
Managed through Supabase SQL.
View all users
SELECT id, email, is_admin, created_at
FROM profiles
ORDER BY created_at DESC;Grant or revoke admin
-- Grant
UPDATE profiles SET is_admin = true WHERE email = 'user@example.com';
-- Revoke
UPDATE profiles SET is_admin = false WHERE email = 'user@example.com';Set a per-user monthly budget
UPDATE usage_limits
SET monthly_budget = 10.00
WHERE user_id = (SELECT id FROM profiles WHERE email = 'user@example.com');Delete a user
-- Deletes profile and cascades to all user data
DELETE FROM auth.users WHERE email = 'user@example.com';Controlling access
- SIGNUP_SECRET — share only with intended users
- Disable signups — remove or unset
SIGNUP_SECRET - OAuth — OAuth sign-in bypasses
SIGNUP_SECRET; configure carefully
App Configuration
Priority: Admin Settings (DB) → Environment Variables → Hardcoded Defaults.
Database settings are cached for 5 minutes.
Environment variable reference
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Yes | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Yes | Supabase anon/public key |
ENCRYPTION_KEY | Yes | 64-char hex key for AES-256-GCM encryption |
SIGNUP_SECRET | Yes | Access code required at signup |
TAVILY_API_KEY | No | Enables web search feature |
NEXT_PUBLIC_SITE_NAME | No | App name shown in UI (default: Daily Agent) |
NEXT_PUBLIC_SITE_DESCRIPTION | No | App description for meta tags |
TITLE_MODEL | No | Model used for auto-generating chat titles |
DEFAULT_IMAGE_MODEL | No | Default model for image generation |