Chief of AI Staff: Personal AI Executive Assistant - Image 1
AI Automation2026

Chief of AI Staff: Personal AI Executive Assistant

Chief of AI Staff is a production multi-agent AI system built as a personal executive assistant for a high-volume real estate professional. The system replaces the need for a human integrator — turning ideas into structure, capturing tasks, managing three Gmail inboxes, reading and writing Google Calendar events, and generating AI-powered morning briefings every day. The core Chief of Staff Agent runs on OpenRouter (Claude Sonnet 4.6) with 23 real tool calls across email, calendar, tasks, goals, quick wins, memory, and web search. Every conversation is backed by Mem0 long-term memory so the agent remembers context, preferences, and decisions across sessions. A dedicated Email Triage Agent runs every 15 minutes via Supabase pg_cron — classifying every email into five categories, generating summaries, urgency scores, needs-reply flags, and editable draft replies. A Daily Briefing Agent fires on a cron schedule and generates an AI morning briefing — calendar events, priorities, weekly goals, quick wins, and an email snapshot — then pushes it to Telegram. The full Visual Command Center is a Next.js dashboard with live streaming chat, an email inbox with category tabs and draft reply panel, briefing page, goals tracker, memory panel, settings, and full Telegram bot integration (same agentic loop, same tools, same session history). Every AI turn is traced end-to-end in Langfuse with tool spans, model, user, and latency. The architecture is multi-user from day one — a second user account (family member) is already supported with no rebuild needed.

The Story

The Problem

A high-output real estate professional with ADD was managing three email inboxes, multiple calendars, scattered tasks, and daily priorities manually — missing follow-ups, losing context between sessions, and spending hours on coordination work instead of high-value decisions. Generic AI chatbots lacked real integrations, persistent memory, and the structured executive thinking needed to act as a true chief of staff.

The Solution

Built a purpose-specific multi-agent AI system with live Gmail API access across three accounts, full Google Calendar read/write, and Mem0 persistent memory that saves facts after every conversation turn. The Chief of Staff Agent uses an agentic loop with 23 real tools and replies in the client's voice. An automated Email Triage Agent runs every 15 minutes to classify, summarize, and draft replies for every incoming email. A Daily Briefing Agent generates and pushes a structured morning briefing to Telegram on a cron schedule. The entire system is accessible via a Visual Command Center dashboard and a full Telegram bot — both using the same agentic loop, tool set, and session history.

My Approach

Built phase by phase — core agent + integrations first, then automated background agents (email triage, briefing cron), then the full visual dashboard. Multi-user architecture baked in from day one. Every AI turn traced with Langfuse for observability. Designed to grow: Phase 2 adds personal finance and household agents; Phase 3 adds real estate business tools.

Vision & Objectives

  • Replace the need for a human integrator with a real AI agent system — not a chatbot
  • Turn ideas into structure: capture, stress-test, and plan via chat + task tools
  • Automate the coordination layer: emails, calendar, priorities, briefings
  • Persistent memory so the agent always knows context — no re-explaining needed
  • One dashboard for everything: emails, calendar, chat, goals, briefings
  • Scalable multi-agent architecture — add specialized sub-agents over time

Technology Stack

Frontend

  • Next.js (App Router) — Visual Command Center dashboard
  • TypeScript — Type-safe components and API routes
  • Tailwind CSS — Clean, low-cognitive-load UI
  • SSE (Server-Sent Events) — Word-by-word streaming AI responses
  • Markdown rendering — Rich formatted agent replies

Backend & Infrastructure

  • Next.js API Routes — /api/chat, /api/email, /api/briefing serverless endpoints
  • Supabase PostgreSQL — users, google_accounts, emails, calendar_events, tasks, goals, daily_briefings, chat_sessions, chat_messages
  • Supabase Edge Functions — email-sync cron (every 15 min), briefing cron (every 5 min)
  • pg_cron — scheduled background agent execution
  • Google OAuth — Gmail + Calendar access for multiple accounts
  • Vercel — Hosting and deployment

AI & Intelligence Layer

  • OpenRouter — AI model routing (free model + Claude Sonnet 4.6)
  • Chief of Staff Agent — agentic loop, 23 real tools, replies in client voice
  • Email Triage Agent — classifies, summarizes, scores urgency, drafts replies
  • Daily Briefing Agent — generates structured morning briefing on cron schedule
  • Mem0 — long-term memory: saves facts after every turn, recalls on demand
  • Langfuse — full AI observability: per-turn tracing, tool spans, model, latency

Payments & Integrations

  • Gmail API — read, send, triage across 3 accounts (Personal, Business, Investment)
  • Google Calendar API — full read, create, delete events
  • Telegram Bot API — full agentic bot (same tools, history, sessions as web chat)
  • Mem0 REST API — persistent cross-session memory
  • Langfuse — tracing and monitoring dashboard

Core Platform Modules

A. Chief of Staff Agent

The primary AI executive assistant — agentic loop with 23 real tools, persistent Mem0 memory, and replies tuned to the client's voice and tone.

  • OpenRouter agentic loop (up to 5 rounds per turn)
  • 23 real tools: email read/send, calendar CRUD, tasks, goals, quick wins, memory save/recall, internet search
  • Connects to all 3 Gmail accounts simultaneously
  • Full Google Calendar read and write access
  • Mem0 persistent memory — saves facts after every turn, recalls on demand
  • Replies in the client's voice and communication style
  • Idea capture → stress test → actionable plan via chat
  • File attachments: images (vision), PDFs, DOCX, XLSX, text files
  • Model selector: free OpenRouter model vs Claude Sonnet 4.6

B. Email Triage Agent

Automated background agent that runs every 15 minutes, classifying every email, generating summaries and draft replies, and syncing results to the dashboard inbox.

  • Runs every 15 minutes via Supabase pg_cron
  • Classifies every email into 5 categories: To-Do, FYI, Promotion, Sales, Archive
  • Custom labels per account (e.g. banking, lease, deal-flow)
  • AI fields per email: summary, decision, urgency reason, needs_reply flag
  • Draft replies generated for important emails — editable and sendable from dashboard
  • 10 emails processed in parallel per sync run
  • Inbox Cleanup Agent — batch processes old emails in groups of 50

C. Daily Briefing Agent

Cron-triggered AI agent that generates a structured morning briefing and pushes it to Telegram — covering calendar, priorities, goals, quick wins, and email snapshot.

  • Cron fires every 5 minutes to check if briefing is due
  • Generates: calendar events, top priorities, weekly goals, quick wins, email snapshot, focus score
  • HTML-formatted Telegram delivery with emoji
  • Briefing page: fully interactive — toggle quick wins, add/remove goals and calendar events
  • Generate Now button for manual trigger
  • Configurable briefing time per user stored in Settings

D. Visual Command Center

Full Next.js dashboard — the single interface for chat, email, briefings, goals, memory, and settings.

  • Live streaming chat with Chief of Staff (SSE, tool-calling, markdown)
  • Email inbox: category tabs, search, pagination, draft reply panel
  • Daily briefing page with interactive priorities and calendar
  • Weekly goals — add, update progress, track status
  • Chat history — session panel, rename, delete, infinite scroll
  • Memory panel — view and delete all Mem0 memories from UI
  • Settings — Google accounts, Telegram config, briefing time, email sync, appearance

E. Telegram Bot Integration

Full agentic Telegram bot running the same Chief of Staff loop — same tools, same memory, same session history as the web dashboard.

  • Full agentic loop via Telegram messages
  • Same 23 tools as web chat
  • Sessions and chat history stored in DB and shared with dashboard
  • Typing indicator while agent processes
  • Receives daily briefing push notifications
  • Multi-user support already built in

F. Observability & Monitoring

End-to-end AI tracing with Langfuse — every turn logged with full tool spans, model metadata, user context, and latency.

  • Every AI turn traced in Langfuse
  • Tool call spans with inputs and outputs
  • Model, user email, and timestamp on every trace
  • Latency and token usage tracking
  • Supports debugging and performance optimization

Advanced System Capabilities

  • Live Gmail access across 3 accounts — read, send, triage
  • Full Google Calendar read and write (create, delete, update events)
  • 23 real tools in a single agentic loop
  • Automated email triage every 15 minutes via pg_cron
  • AI-generated morning briefing pushed to Telegram on schedule
  • Mem0 long-term memory — persists facts and preferences across all sessions
  • Streaming chat responses (SSE) word-by-word
  • Full Telegram bot — same agent, tools, and history as web
  • Langfuse tracing on every AI turn for full observability
  • Multi-user architecture — second user account supported with no rebuild
  • File attachments: images (vision), PDFs, DOCX, XLSX
  • Model selection per conversation: free vs Claude Sonnet 4.6

System Architecture Principles

  • Next.js (Vercel) → /api/chat, /api/email, /api/briefing API routes → OpenRouter agentic loop
  • Agentic loop: OpenRouter LLM → tool decision → execute tools (Gmail, Calendar, Supabase, Mem0) → loop up to 5 rounds → stream final answer via SSE
  • Supabase PostgreSQL: users, google_accounts, emails, threads, calendar_events, tasks, goals, daily_briefings, chat_sessions, chat_messages
  • Supabase Edge Functions: email-sync cron (every 15 min) + briefing cron (every 5 min)
  • Telegram Bot: same agentic loop, webhook → POST /api/telegram → agent → reply
  • Langfuse: trace opened per turn → spans per tool call → closed with full I/O after final reply
  • Mem0: save call after every turn → recall at start of every turn → persistent cross-session context

Value Proposition

  • For the Client: One place for email, calendar, tasks, goals, and AI — nothing missed, no context lost between sessions
  • For Productivity: Automated triage, briefings, and follow-ups eliminate hours of manual coordination each week
  • For Growth: Phase 2 adds personal finance and household management; Phase 3 adds real estate business tools — same DB, same agent, no rebuild