Daily Agent
Setup GuideAdmin GuideUser GuideCustomization

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

ProviderModelsNotes
AnthropicClaude familyNative SDK. Best for tool calling.
GoogleGemini familyNative Google AI SDK. Cheapest flash models.
OpenAIGPT familyOpenAI-compatible adapter.
OpenRouterAny modelProxy 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

Special-purpose models

PurposeConfigDefault
TitlesTITLE_MODELgoogle/gemini-3-flash-preview
ChatDEFAULT_CHAT_MODELanthropic/claude-sonnet-4.5
ImagesDEFAULT_IMAGE_MODELgoogle/gemini-2.5-flash-image
Search summaryPer-user settingTitle model
Briefing/Insights/ToolsPer-user ai_model_configTitle model
AI AssistPer-user ai_model_configDefault 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.

CategoryWindowLimit
chat1 min20 requests
image1 min5 requests
search1 min10 requests
ai-assist1 min15 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

App Configuration

Priority: Admin Settings (DB) → Environment Variables → Hardcoded Defaults.

Database settings are cached for 5 minutes.

Environment variable reference

VariableRequiredDescription
NEXT_PUBLIC_SUPABASE_URLYesSupabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYYesSupabase anon/public key
ENCRYPTION_KEYYes64-char hex key for AES-256-GCM encryption
SIGNUP_SECRETYesAccess code required at signup
TAVILY_API_KEYNoEnables web search feature
NEXT_PUBLIC_SITE_NAMENoApp name shown in UI (default: Daily Agent)
NEXT_PUBLIC_SITE_DESCRIPTIONNoApp description for meta tags
TITLE_MODELNoModel used for auto-generating chat titles
DEFAULT_IMAGE_MODELNoDefault model for image generation