Design a computer-use agent
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI system design interview question asked in Amazon's system design round, last asked Jan 2026. It tests agents, llm and evaluation.
Design an agent that completes tasks on a computer the way a person does. It gets a goal in plain language ("book the cheapest flight to Boston on Friday"), looks at the screen, chooses an action (click, type, scroll, press a key), sees the result and repeats until the task is done or it gives up. It must work across many websites and desktop applications whose layouts change without notice.
Requirements
- Functional: take a task in natural language; observe the screen as pixels and, where available, the accessibility tree or the page DOM; produce one action at a time; know when the task is finished; ask the user before anything irreversible.
- Non-functional: a few seconds per step at most; robust to small layout changes, pop-ups and slow pages; safe by default; measurable end to end.
Clarifying questions
- Browser only, or the whole operating system?
- Is there a structured view of the screen (DOM, accessibility tree), or only screenshots?
- Which actions need the user's confirmation (purchases, sending messages, deleting files)?
- How long can a task run, and what does a failure cost the user?
What a strong answer covers
- Perception: screenshots read by a vision-language model, combined with the accessibility tree so actions land on real elements instead of raw coordinates.
- The action space and the loop: observe, plan, act, check the result, with a step budget, retries and recovery when an action did not do what was expected.
- Planning and memory over long tasks: a task plan, a short history of past steps, and when to re-plan.
- Robustness to UI changes: grounding on element roles and text rather than positions, and noticing when the screen is not what the plan expected.
- Data: human demonstrations, synthetic tasks in sandboxed environments, and reinforcement learning on tasks whose outcome can be checked; how success is labeled.
- Safety: an allow-list of actions, confirmation before irreversible ones, a sandbox or virtual machine, and defence against prompt injection from page content.
- Evaluation: task success rate on a fixed set of tasks, steps per task, error categories and safety violations, offline and in production.
Follow-ups
- A website redesign breaks a task that used to work. How does the agent cope, and how do you find out?
- Text on a web page tells the agent to send the user's files somewhere. How do you stop it?
- How do you cut the latency and cost of each step?
- How would you train the agent to recover from its own mistakes?
Where it's asked
- Amazon · System design · Last asked Jan 202655 min · Design discussion
What it tests
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
