Design a computer-use agent end-to-end
AmazonApplied Scientist · OnsiteLast updated
This problem evaluates your ability to design a multimodal agent capable of interpreting UI elements and executing sequences of actions to complete user-defined tasks on a computer screen.
Problem Statement
Design an autonomous agent that can perform tasks on a desktop OS (e.g., 'Book a flight to Seattle on this website' or 'Draft a meeting summary from these emails') by observing the screen and controlling the mouse and keyboard.
Requirements
- Perception: How will you represent the screen state for the model? Discuss the trade-offs between raw pixel inputs (screenshots) and structured data (DOM/Accessibility tree).
- Decision Making: Propose an architecture for the agent. Should it be a purely reactive policy, or do you need a planning module? How do you handle long-horizon tasks?
- Action Space: How do you map the agent's output (e.g., coordinates, text tokens, clicks) to OS-level inputs?
- Robustness & Safety: How does the agent handle UI changes (e.g., responsive web design) or non-deterministic task environments? How do you implement guardrails to prevent the agent from performing unintended destructive actions (e.g., deleting files)?
Scale and Constraints
- The agent should handle screen resolutions up to 4K.
- Latency should be low enough for a fluid user experience (target < 500ms per inference step).
- The agent must be capable of multi-step reasoning (e.g., navigate to a site, fill a form, click submit).
Expected Output
Provide a high-level system architecture diagram (in text description), explain the training strategy (e.g., imitation learning vs. reinforcement learning), and describe how you would evaluate the agent's performance in a real-world setting.
Hints
Hint 1
Consider how a vision-language model (VLM) might ingest UI metadata to bridge the gap between pixel perception and semantic understanding.
Hint 2
Think about using a hierarchical architecture where a high-level planner breaks tasks into sub-goals and a low-level controller handles precise mouse movements and keyboard strokes.
Hint 3
Address the cold-start problem: how would you collect or synthesize the training data necessary for a model to learn standard UI interaction patterns?
Follow-up questions
- How would you measure the agent's success beyond binary task completion (e.g., efficiency, precision)?
- What specific safety mechanisms or 'human-in-the-loop' protocols would you design for high-stakes actions like financial transactions?
- How would you adapt the system if the application UI updates frequently, causing elements to shift positions or change labels?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.