Agent System Design: A 45-Minute Time Budget, Back-of-the-Envelope Estimates, and Failure Modes
The most common way to lose a system design round is not drawing the wrong architecture. It is drawing before asking for requirements, not being able to say what the thing costs per month, and not being able to say how it breaks. Today splits 45 minutes into requirements, estimation, architecture, deep dive, and failure modes and evaluation, and drills working out tokens times volume times price and steps times per-step latency on the spot. A pull-request review agent is walked through end to end, and two more prompts come with checklists. The interviewer agent learns to review a design document: are all the stages there, are the estimates right, and how many failure modes does it cover.
Today's Goals
- Can split a 45-minute agent system design question into five segments and name the sign that each one is running over
- Can estimate an agent service's monthly tokens, monthly cost, and peak concurrency on the spot, and check a design against a list of failure modes
- Can implement a design reviewer that checks whether the stages are complete and in order, recomputes the estimates, and counts failure-mode coverage
Yesterday was a system you built; today is one that does not exist yet. When you finish, come back to the top and check off the three goals.
Plain-Language Walkthrough
A moving company's quote: rooms, floors, elevator first, then truck size and crew
Anyone who has called a moving company knows the drill. A good mover does not quote a price the moment you pick up. They ask first: how many bedrooms? Which floor? Is there an elevator? Anything big like a piano? From where to where? Only after those questions do they name a truck size, a crew, and a rough price, and they add a warning: "If there's no parking downstairs, we'll need one more person to carry."
The bad kind says "no problem, one truck is plenty", arrives, finds a sixth-floor walk-up, and raises the price on the spot.
System design questions test which kind of mover you are. The interviewer gives you one sentence: "Design an agent that reviews pull requests." The good approach asks about scale and scope first, then does the math, then draws, and finally says where things go wrong. The bad approach picks up the pen and starts drawing boxes.
Day 26 of the 30-day course already gives design templates for four common prompts (an agent platform, customer support, multi-tenancy, cost control), and they are not repeated here. Today practices three skills behind all of those templates that are skipped most often: how to spend the time, how to do the math, and how it breaks.
Interview questions
Design an agent service that automatically posts review suggestions when a pull request is opened.设计一个在 PR 提交后自动给出评审建议的 Agent 服务。
Common in ChinaCommon overseasDeep dive#system-design#code-review#estimation🔒 Unlock this chapter to see the answer keys.
A research-report agent runs for hours. How does it resume after the process restarts?一个要跑几个小时的研究报告 Agent,进程重启后怎么接着跑?
Common in ChinaCommon overseasDeep dive#long-running#checkpoint#system-design🔒 Unlock this chapter to see the answer keys.
How do you split your time in a 45-minute system design interview?一道 45 分钟的系统设计题,你怎么分配时间?
Common in ChinaCommon overseasBasic#system-design#time-management🔒 Unlock this chapter to see the answer keys.
How would you estimate the monthly cost of an agent service?怎么估一个 Agent 服务每个月要花多少钱?
Common in ChinaCommon overseasIntermediate#cost#estimation#system-design🔒 Unlock this chapter to see the answer keys.
