What It Is
Consul is an AI-powered executive assistant that manages email, calendar, documents, and contacts on behalf of busy professionals. It operates across three channels — web chat, iMessage/SMS, and email — so users interact with it through tools they already use, with no new app to learn.
The core value proposition: automate the 2+ hours/day of administrative overhead that knowledge workers spend on email triage, scheduling, drafting responses, and file management.
Who It's For
Busy professionals, founders, and executives who are overwhelmed by:
- High-volume inboxes requiring triage and response
- Back-and-forth scheduling across multiple parties
- Repetitive document and file management tasks
- Context-switching between Gmail, Calendar, Drive, Docs, Slack, and Contacts
Pricing
- **50 standard price — locked in permanently for early users)
- Includes 25,000 AI credits/month
- Free tier available with limited web chat access
Billing is handled through Stripe with a self-service portal for managing subscriptions.
Core Capabilities
1. Email Management (Gmail)
- Automated Triage: Incoming emails are classified into categories (action needed, meeting requests, newsletters, FYI, etc.) and labeled automatically
- AI Drafting: Consul writes email responses in the user's voice and tone, with configurable per-category draft policies (never/auto/always)
- Full Inbox Control: Search, archive, label, star, trash, mark read/unread — all via natural language commands
- Meeting & Reminder Detection: Triage automatically identifies meeting requests and action items embedded in emails
2. Calendar Management (Google Calendar)
- Multi-Step Scheduling: A guided workflow that resolves attendee contacts, checks availability across all parties, offers time slots, and books the meeting
- Conflict Resolution: Queries free/busy data and respects user-configured meeting windows (default 9am–6pm), minimum notice (30 min), and buffer between meetings (15 min)
- Full Event Lifecycle: Create, update, reschedule, cancel events; add/remove attendees; set colors; toggle Google Meet links
3. Document & File Management (Google Drive + Docs)
- Drive Operations: Search, upload, download, move, rename, share, trash/untrash files and folders — 20 tools total
- Docs Operations: Create documents with content, insert/append/replace text, format text, advanced search — 13 tools total
- Permission Management: Share files with specific people, update or revoke permissions
4. Contact Management (Google Contacts)
- Lookup & Search: Find contacts by name, email, phone; search the corporate directory
- CRUD Operations: Create, update, and delete contacts
- Recipient Resolution: When the user says "email John," Consul resolves which John from their contacts
5. Slack Integration
- Messaging: Send messages, add reactions, join channels
- Search & Read: Search messages, read channel history, get thread replies, look up users
6. Reminders
- Create, edit, list, cancel, and look up reminders
- Delivery via iMessage, SMS, email, or web notification
- Timezone-aware scheduling
7. Daily Brief
- Automated morning summary combining calendar events, email highlights, and pending reminders
- Generated as a shareable artifact with a unique link
- Delivered via iMessage or email on a user-configured schedule
- Includes a recovery cron to ensure delivery even if the primary chain breaks
Multi-Channel Access
Web Chat (Primary)
- Real-time streaming AI chat embedded in the dashboard at
/home - Full conversation history managed client-side
- Tool usage visible with thinking indicators
- Responses can be retried or copied
iMessage / SMS
- Users text Consul at a dedicated number via Photon integration
- Natural texting voice ("Got it," "On it," "Done," "Handled") — no markdown
- Typing indicators and read receipts for a human-like experience
- Message effects (confetti, fireworks, hearts, etc.) for personality
- Server-side conversation memory (last 15 messages)
- Users email Consul via AgentMail integration
- Email orchestrator routes requests to the right capability (scheduling, search, drafting, etc.)
- Responses sent back as email replies
Human-in-the-Loop Confirmation
All write operations (31 tools) use a suspend/resume pattern for safety. When Consul is about to take an action (send an email, create a calendar event, delete a file, share a document), it:
- Drafts the action and shows a preview
- Suspends execution and asks for confirmation
- Waits for the user to approve, reject, or request edits
- Resumes and executes (or re-drafts based on feedback)
This ensures the user always has final say over actions taken on their behalf.
Architecture Overview
Three-Service Monorepo
| Service | Stack | Port | Purpose |
|---|---|---|---|
| Web App | Next.js 16 | 3000 | Frontend, OAuth flows, settings, dashboard |
| Agents | Mastra framework | 4111 | AI agents, tools, workflows, Studio UI |
| Messaging Gateway | Bun/Hono | 4112 | iMessage/SMS/email relay via Photon & AgentMail |
AI Agent Design
Consul uses a single-agent architecture powered by Mastra (an open-source AI agent framework). Instead of routing between many specialized sub-agents, a single agent dynamically discovers and loads tools on demand:
- 12 core tools always loaded (reminders, email compose, scheduling, feedback, recipient resolution)
- ~86 discoverable tools available via semantic search — the agent searches for relevant tools based on the user's request, loads them, then uses them
- Model: OpenAI
gpt-4.1-mini(1M context window, cost-efficient for high-volume use)
This approach avoids the brittleness of hardcoded routing logic and lets the AI reason about which tools to use.
Middleware Pipeline
Every request passes through 5 middleware layers:
- Auth — Validates Supabase JWT (or internal service secret), sets userId
- Body Parsing — Extracts whitelisted context values (strict allowlist of 35 keys to prevent injection)
- Context Population — Fetches user profile, agent preferences, and connected integrations (with 5-minute TTL cache to avoid redundant DB queries)
- DateTime — Formats current date/time in the user's timezone
- Session Logging — Records chat sessions for analytics (non-blocking)
Dual-Database Architecture
| Database | Technology | Purpose |
|---|---|---|
| Supabase (PostgreSQL) | Cloud-hosted, RLS-protected | User data, OAuth tokens, actions, preferences, billing |
| Turso (LibSQL) | Edge-distributed | Mastra internals: AI traces, workflow state, conversation memory |
Security
- Token Encryption: All OAuth tokens encrypted with AES-256-GCM before storage; encryption key must match between web app and agent service
- Three-Tier Token Resolution: Tools resolve access tokens from (1) direct input, (2) request context, or (3) Supabase with auto-refresh — never hardcoded
- Row-Level Security: All Supabase tables use RLS for user isolation
- Resource Isolation:
MASTRA_RESOURCE_ID_KEYensures each user's agent memory and data is isolated server-side
Automated Workflows
| Workflow | Trigger | What It Does |
|---|---|---|
| Email Triage | Gmail push notification (Pub/Sub) | Classifies email, applies label, optionally drafts response, detects meeting requests & reminders |
| Daily Brief | Scheduled (user-configured time) | Fetches calendar, emails, reminders → generates personalized morning summary → delivers via iMessage or email |
| Schedule Meeting | User request (chat or text) | Resolves contacts → checks availability → offers slots → books event with Google Meet option |
| Sales Processing | Inbound sales email | Scores lead, analyzes conversation stage, generates personalized response |
| Tag Notification | Email tag assigned | Sends notification to user about tagged email |
User Experience
Onboarding (4 Steps)
- Value Preview — User selects primary use case (email, calendar, tasks, or all)
- Google Connect — OAuth authorization for Google account
- Aha Moment — Preview of connected data (upcoming events, email stats)
- Personalize — Name, timezone, communication preferences
Dashboard (/home)
- Left panel: Setup progress, agent identity, integration status, activity graph
- Right panel: Live chat interface
- Real-time updates via Supabase subscriptions
Settings & Configuration
- Agent Identity (
/agent/identity) — Customize name, role, communication style, email signature - Relationships (
/agent/relationships) — Personal CRM for important contacts with tags and context - Integrations (
/agent/integrations) — Connect/disconnect Google services and Slack - Activity Log (
/agent/activity) — Full history of all automated actions - Skills (
/skills/*) — Toggle and configure each automation (triage, drafting, scheduling, reminders, daily brief)
Observability & Billing
- Trace Linking: Every LLM call is linked to the requesting user via
TraceRegistrationProcessor - Token Billing: Custom
TokenBillingExporterwrites consumption events (input/output/total tokens) to Supabase for per-user billing and quota enforcement - Cloud Monitoring: Traces exported to Mastra Cloud for centralized observability
- Sensitive Data Filtering: Tokens and credentials are redacted from all logs
Tech Stack Summary
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React, Tailwind CSS, Turbopack |
| AI Framework | Mastra v1.3.0 (agents, tools, workflows, memory) |
| LLM | OpenAI gpt-4.1-mini |
| Auth | Supabase Auth (JWT) |
| Primary DB | Supabase (PostgreSQL with RLS) |
| Agent Storage | Turso (LibSQL, edge-distributed) |
| Messaging Gateway | Bun + Hono |
| iMessage/SMS | Photon |
| Email Channel | AgentMail |
| Background Jobs | Inngest (crons, event-driven workflows) |
| Payments | Stripe |
| Dev Environment | Tilt (unified dev with hot reload + ngrok tunnels) |
| Monorepo | pnpm workspaces + Turborepo |
Scale of the System
- ~100 tools across 6 Google services + Slack + reminders + messaging
- 31 write tools with human-in-the-loop confirmation
- 5 automated workflows handling email triage, daily briefs, scheduling, sales, and notifications
- 3 communication channels (web, iMessage/SMS, email)
- 5-layer middleware pipeline per request
- Dual-database architecture for user data vs. AI internals
Summary
Consul is a production-grade AI executive assistant that deeply integrates with Google Workspace and Slack to automate administrative work. Its differentiators are:
- Multi-channel — users interact via web, text, or email with no new app to learn
- Human-in-the-loop — all write actions require explicit user confirmation
- Single-agent with dynamic tool discovery — avoids brittle routing; the AI reasons about which of ~100 tools to use
- Automated workflows — email triage, daily briefs, and scheduling run in the background without user initiation
- Personalized — learns user preferences, communication style, and relationships over time via persistent working memory