MDX Limo
Consul — AI Executive Assistant

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

  • **25/month(earlyaccess,5025/month** (early access, 50% off the 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)

Email

  • 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:

  1. Drafts the action and shows a preview
  2. Suspends execution and asks for confirmation
  3. Waits for the user to approve, reject, or request edits
  4. 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

ServiceStackPortPurpose
Web AppNext.js 163000Frontend, OAuth flows, settings, dashboard
AgentsMastra framework4111AI agents, tools, workflows, Studio UI
Messaging GatewayBun/Hono4112iMessage/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:

  1. Auth — Validates Supabase JWT (or internal service secret), sets userId
  2. Body Parsing — Extracts whitelisted context values (strict allowlist of 35 keys to prevent injection)
  3. Context Population — Fetches user profile, agent preferences, and connected integrations (with 5-minute TTL cache to avoid redundant DB queries)
  4. DateTime — Formats current date/time in the user's timezone
  5. Session Logging — Records chat sessions for analytics (non-blocking)

Dual-Database Architecture

DatabaseTechnologyPurpose
Supabase (PostgreSQL)Cloud-hosted, RLS-protectedUser data, OAuth tokens, actions, preferences, billing
Turso (LibSQL)Edge-distributedMastra 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_KEY ensures each user's agent memory and data is isolated server-side

Automated Workflows

WorkflowTriggerWhat It Does
Email TriageGmail push notification (Pub/Sub)Classifies email, applies label, optionally drafts response, detects meeting requests & reminders
Daily BriefScheduled (user-configured time)Fetches calendar, emails, reminders → generates personalized morning summary → delivers via iMessage or email
Schedule MeetingUser request (chat or text)Resolves contacts → checks availability → offers slots → books event with Google Meet option
Sales ProcessingInbound sales emailScores lead, analyzes conversation stage, generates personalized response
Tag NotificationEmail tag assignedSends notification to user about tagged email

User Experience

Onboarding (4 Steps)

  1. Value Preview — User selects primary use case (email, calendar, tasks, or all)
  2. Google Connect — OAuth authorization for Google account
  3. Aha Moment — Preview of connected data (upcoming events, email stats)
  4. 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 TokenBillingExporter writes 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

LayerTechnology
FrontendNext.js 16, React, Tailwind CSS, Turbopack
AI FrameworkMastra v1.3.0 (agents, tools, workflows, memory)
LLMOpenAI gpt-4.1-mini
AuthSupabase Auth (JWT)
Primary DBSupabase (PostgreSQL with RLS)
Agent StorageTurso (LibSQL, edge-distributed)
Messaging GatewayBun + Hono
iMessage/SMSPhoton
Email ChannelAgentMail
Background JobsInngest (crons, event-driven workflows)
PaymentsStripe
Dev EnvironmentTilt (unified dev with hot reload + ngrok tunnels)
Monorepopnpm 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:

  1. Multi-channel — users interact via web, text, or email with no new app to learn
  2. Human-in-the-loop — all write actions require explicit user confirmation
  3. Single-agent with dynamic tool discovery — avoids brittle routing; the AI reasons about which of ~100 tools to use
  4. Automated workflows — email triage, daily briefs, and scheduling run in the background without user initiation
  5. Personalized — learns user preferences, communication style, and relationships over time via persistent working memory
Consul — AI Executive Assistant | MDX Limo