Technical guide · ~15 min read

How to build an AI Chief of Staff

Everyone wants the same thing: one agent that remembers everything, sits on top of email, calendar, docs, and CRM, and actually moves work forward instead of waiting to be prompted. Here's the architecture that works — and the honest cost of running it yourself.

1. What an AI Chief of Staff actually is

Strip the marketing off and it's four things stitched together: a reasoning loop (an LLM planning multi-step work), a persistent memory layer, a set of tool integrations (email, calendar, CRM, Drive, Slack), and a surface where you talk to it (chat, voice, or a dashboard). Everything else is polish.

The bar isn't "answers questions." It's owns outcomes across days: notices a deal has gone quiet, drafts the nudge, books the follow-up, updates the CRM, and tells you it happened.

2. Reference architecture

  • Model layer. A frontier model (Claude Sonnet 4 / GPT-5 / Gemini 2.5) as the planner. A cheaper model for classification and summarization.
  • Orchestration. LangGraph, Mastra, or a hand-rolled state machine. You need durable runs, retries, and human-in-the-loop checkpoints — not just a while loop over tool calls.
  • Memory. Postgres + pgvector for semantic recall, plus a structured store (people, deals, decisions, commitments). Both matter — vector search alone hallucinates relationships.
  • Tools. MCP servers or direct API clients for Gmail/Outlook, Google/Microsoft Calendar, HubSpot/Salesforce, Notion/Drive, Slack.
  • Auth. OAuth per user per provider, refresh-token rotation, per-tenant secrets. This alone is a week of work.
  • Surfaces. Web chat, a mobile PWA, a voice number (Twilio + Vapi/Retell), and a dashboard for the human.

3. Connecting email and calendar

Gmail and Google Calendar via OAuth 2.0 with the gmail.modify and calendar.events scopes. Microsoft Graph for Outlook/M365. Push notifications (Gmail watch, Graph subscriptions) so the agent reacts to new mail within seconds instead of polling.

Pitfalls: watch expirations (Gmail every 7 days, Graph every 3 days — you need a renewal cron), threading vs. message-level context, and quota limits when you fan out across a customer base.

4. Memory that survives Monday

The reason most AI assistants feel stupid is they have no memory. Real memory is three layers:

  1. Episodic — raw transcripts of every conversation and email thread, chunked and embedded.
  2. Semantic — extracted facts ("Katherine's launch is Nov 12," "Acme's decision-maker is Priya") stored as typed rows.
  3. Procedural — the operator instructions that tell the agent how this specific principal wants things done. Tone, escalation rules, what to never touch.

The procedural layer is what separates a chatbot from a chief of staff. It's also the layer that has to be edited by a human every week as the business changes.

5. The maintenance burden nobody warns you about

You will be spending real time on:

  • OAuth token refresh failures (weekly).
  • Model releases and prompt regressions (every 4–8 weeks).
  • Provider API changes — Gmail, HubSpot, Slack all break things (monthly).
  • Eval suites so you notice when the agent gets worse.
  • Guardrails so it doesn't send the wrong email to the wrong person.
  • Cost monitoring — a single runaway agent loop can burn $200 in an hour.

Budget 10–20 engineering hours a week to keep a production AI chief of staff healthy for a single principal. More if you add clients.

6. Should you build it?

Build it if you're an engineering team who wants to own the stack, has patience for the operational drag, and treats the agent as a product surface for your own company.

Don't build it if you're a founder who just wants the outcome. The gap between "I wired up n8n to Gmail" and "an agent I trust with my inbox on Monday" is measured in months, not weekends.

The shortcut

Or skip the build. Install one in a week.

Chief of Staff is the managed version of everything above. Persistent memory, connected tools, a Fit Interview so it sounds like you, and a human operator (Rosenfeld Marketing) tuning the procedural layer weekly. $1,200/month, 3-month minimum, install is free.

See how it works →