A constitution-driven AI agent built with Auth0 for AI Agents Token Vault.
Axon is an AI productivity agent that manages Gmail, Google Calendar, Google Drive, and GitHub through delegated access powered by Auth0 Token Vault.
What makes Axon different:
- Token Vault — OAuth tokens stored and managed by Auth0. The application never stores third-party credentials.
- Constitution rules — Users define plain-English behavioral rules enforced at runtime before any tool executes.
- Risk classification — Every action classified into five tiers: observe, draft, act, transact, admin.
- Approval queue — Act-tier and higher actions create approval requests. Users approve or reject before execution.
- Operating modes — Shadow (observe only), Assist (approvals required), Autopilot (routine actions auto-execute).
- Full audit trail — Every action logged with service, risk tier, scopes, rules applied, and outcome.
- Multi-session chat — Multiple chat sessions with history persistence.
- Voice input — Speech-to-text input using browser Speech Recognition API.
- Markdown rendering — AI responses rendered with proper formatting.
- Gmail — Read, draft, send emails
- Google Calendar — List and create events
- Google Drive — List and search files
- GitHub — List repos, issues, PRs, notifications. Create issues and comments.
- Next.js 16
- Auth0 (login + Token Vault)
- Supabase (PostgreSQL)
- Gemini 2.0 Flash (primary AI)
- OpenRouter (secondary, multiple model fallback)
- Groq / Llama 3.3 70B (tertiary)
- Vercel (deployment)
- Users authenticate with GitHub or Google via Auth0
- External services connected through Auth0 Token Vault Connected Accounts
- GitHub uses GitHub App with expiring user tokens for refresh token support
- Actions classified by risk tier before execution
- Constitution rules enforced in application code, not just in prompts
- High-risk actions routed to approval queue
- All actions logged with full context
Create .env.local:
AUTH0_SECRET=
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
APP_BASE_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
GROQ_API_KEY=
GOOGLE_AI_API_KEY=
OPENROUTER_API_KEY=