Design a Personal AI Assistant Agent
Understanding the Problem
📅 What is a personal AI assistant agent? A personal assistant agent is an LLM connected to a person's own accounts (email, calendar, task list, contacts) that can answer questions about them ("what did Priya say about the launch date?"), prepare work ("draft a reply declining politely"), take actions ("move my 1:1 with Sam to Thursday afternoon") and keep an eye on things in the background ("remind me if the landlord hasn't replied by Friday"). It's the old idea of an executive assistant, built on an LLM with tools.
What makes this different from a chatbot is that it holds delegated access to someone's life. It can read every email and send mail as the user. So the design centers on three questions: how little access can we hold and how do we protect it, which actions can the agent take on its own and which need the user's approval, and how do we stop an incoming email (which anyone in the world can send) from giving the agent instructions. Interviewers also like a follow-up: "now the assistant handles health information, what changes?"
The generic agent platform pieces (durable runs, tool gateway, memory basics) are in Design an Agentic System. We'll focus on what's specific to a personal assistant over email, calendar and tasks.
Functional Requirements
Core Requirements
- Users should be able to connect their email, calendar and task accounts and ask the assistant questions about them in chat.
- The assistant should be able to draft and take actions (send or reply to email, create or move events, create tasks), with the user's approval before anything with side effects.
- The assistant should run background routines: triage new mail, a morning brief, and conditional follow-ups ("if no reply by Friday, remind me").
- The assistant should remember the user's preferences and important facts across conversations, and the user should be able to see, edit and delete what it remembers.
Below the line (out of scope)
- Voice interaction (see Design a Real-Time Voice Assistant).
- Building the email or calendar provider itself.
- Enterprise admin consoles and team-shared assistants.
Non-Functional Requirements
We'll assume 10 million users with connected accounts and 3 million daily actives.
Core Requirements
- Interactive replies should start streaming within about 1.5 seconds; simple lookups should finish within a few seconds including provider API calls.
- No email is sent, event changed or item deleted without the user's approval, unless the user created a standing rule that covers exactly that action.
- Access tokens must be stored encrypted, scoped to the minimum needed, and never visible to the model.
- Background routines must be reliable: a follow-up scheduled for Friday 9 a.m. fires once, on time, in the user's time zone.
- User data isn't used to train models, and deleting the account or a memory removes it everywhere within a bounded time.
Below the line (out of scope)
- Multi-region residency details.
- Offline/on-device operation (see Privacy in ML Systems for on-device trade-offs).
Back-of-the-envelope:
- Interactive: 3M DAU x ~5 requests a day = 15M requests a day, about 175 QPS on average and maybe 600 QPS at peak. Each request averages ~3 tool calls and ~2 model turns. That's a modest LLM workload.
- Background triage: if users get ~50 emails a day, that's 500M emails a day across 10M users, about 5,800 per second. At ~1,000 tokens per email, that's 500 billion tokens a day. With a frontier model at ~$3 per million input tokens, that's $1.5M a day. With a small classification model at ~$0.10 per million, it's $50k a day.
- Provider quotas: email and calendar APIs enforce per-user and per-app rate limits, so our sync must use push notifications and incremental sync, not polling.
The triage arithmetic decides the architecture: the expensive model can't read every email. Background work runs on cheap rules and small models that decide what deserves attention, and the frontier model only sees the handful of items that matter or that the user asks about.