"Design an agent that…" is a demanding prompt in AI product interviews, because it tests everything at once: product sense, technical fluency, risk judgment and measurement. The weak answer is a diagram of boxes labelled "planner", "memory" and "tools". The strong answer is a sequence of decisions, each defended.
Here is a structure that keeps the decisions in front: seven moves, in order, each a sentence or two out loud before you go deeper where the interviewer pulls.
Read diagram description
Seven moves for an agent design answer in three groups. Frame: the job and the cost of a wrong action; workflow or agent. Design: autonomy and permissions; the harness of tools, context, verification and stopping. Prove: evaluation; cost per successful task and latency; failure handling and monitoring.
The worked example below uses one prompt throughout: design an agent that handles refund requests for an online retailer.
Frame
1. The job and the cost of a wrong action. Start with who uses it and what a mistake costs, because that decides everything after. "Customers ask for refunds in chat. A wrong refund costs money and is hard to claw back; a wrongly refused refund costs a customer. I'll assume 20,000 requests a month, and that the business wants most simple refunds handled without a person." This move matters because it sets the bar before you build.
2. Workflow or agent. Some "agent" problems are better served by a fixed workflow with a model at one or two steps. "Order lookup, policy check and refund are a fixed sequence; the model is needed to understand the request and explain the outcome. I'd build a workflow with a model at the front, and only give a model open-ended control for the messy cases." See workflow vs agent.
Design
3. Autonomy and permissions. Decide what runs unasked, what waits and what is refused, by reversibility. "Refunds under a limit on orders the customer named run automatically; above it, a person approves. The agent acts with the customer's own order access, never an admin account." See autonomy levels and delegated access for agents.
4. The harness. Name the tools, what context the model sees, how work is verified and when it stops. "Three tools: look up order, check policy, issue refund with an idempotency key. A code check verifies the amount against the order before the refund tool runs. A step limit and a spend limit end any run that loops." The agent harness concept covers the parts.
Prove
5. Evaluation. "A labelled set of 300 real requests, including partial refunds, duplicate claims and injection attempts in the message. Success means the right amount on the right order, or a correct handoff. Ship when the pass rate clears the bar with a confidence interval, and check the steps it took, not only the outcome." See trajectory evals.
6. Cost per successful task and latency. Price a finished refund, not a model call, and include the people who handle failures. Cost per successful task shows the arithmetic, and effective cost with human fallback adds the handoffs.
7. Failure handling and monitoring. "When the agent is unsure, it hands off with a summary so the customer is not asked again. In production I trace every run, sample failures weekly, and add them to the test set." See human handoffs and agent traces.
When the interviewer changes a constraint
Practise with a constraint that changes after you have a design: the refund limit doubles, a regulator requires a person on every refund above a threshold, or the agent starts approving duplicates. The structure makes the update easy: say which move the change touches, revise that decision, and re-state the bar. Our hard and expert questions practise exactly this with Round 2 and Round 3 prompts; users approve almost every permission prompt and same model, but a competitor completes more tasks are two to start with.
Three ways answers go wrong
Drawing architecture before stating what a mistake costs. Giving the agent every permission and adding "human in the loop" as a box without saying when the human is asked. Ending without a number for quality, cost or both. Each one is fixed by a single sentence from the seven moves.
Questions about this topic
Judgment about autonomy and evidence. A strong answer says what a wrong action costs, chooses a fixed workflow where one will do, limits what the agent may do without a person, designs how it is evaluated and monitored, and prices a successful task, rather than drawing a large multi-agent diagram.