Harness Engineering for Computer Use
Published by O'Reilly Media, Inc.
Give your AI agents the ability to operate a computer
What you’ll learn and how you can apply it
- Understand the computer-use harness end to end: Learn how perception, grounding, action, verification, and recovery fit together as stages of one loop, and how working from pixels shapes every stage
- Build and operate a multisurface agent: Go from a provided agent harness to a working computer tool set, extend it with the shell and filesystem surfaces, route work across all three, and run a production use case on an isolated cloud sandbox
- Reason about safety, reliability, and cost: Apply sandbox isolation, confirmation gates, and prompt-injection defenses, catch silent failures with cross-surface verification, and manage the screenshot economics that govern a computer-use agent’s bill
Course description
Some of the most valuable work you can hand an agent has no API: legacy desktop applications, GUI-only vendor tools, and cross-app workflows that span a spreadsheet, a file manager, and a terminal. A computer-use agent does that work the way a person does, by seeing the screen and driving the mouse and keyboard. A capable model can already read a screenshot and choose an action, but making that reliable, safe, and affordable is the job of the harness around it, the code that captures what the model sees, executes what it picks, checks that the action landed, and blocks the actions you cannot afford.
This two-hour course opens up the computer-use agent. Sajal Sharma shows you how that harness works as you build its computer half yourself. You’ll learn what a screenshot costs in tokens, why production agents ground clicks by predicting coordinates directly, and how context management keeps a long run affordable. Then you’ll build the computer tool on a provided agent harness and drive a real cloud desktop with it, reading every step in the trace. You’ll add the desktop’s other two surfaces, the shell and the file system, and learn routing, i.e., sending each job to the cheapest reliable surface, verifying GUI work from the shell, and recovering from the silent failures that pixels alone hide. In the final segment, you’ll make it production-real with guardrails and human-in-the-loop gates for an agent that drives a whole machine, an architectural view of prompt injection, isolation, and blast radius, and a full use case run at capability, turning a folder of receipts into a report across all three surfaces. You’ll finish with how to evaluate a computer-use agent: your own task suites and the public benchmarks read critically.
This live event is for you because...
- You’re an AI engineer building agents, whether the desktop is the agent’s whole job or one capability among several, and you want to understand how the computer-use layer works under the hood.
- You’re a software engineer automating desktop or legacy applications, or integrating computer-use agents into a product, and you want to build, debug, and extend the harness with confidence.
- You’re a technical builder evaluating computer-use tools and frameworks, and you want enough internals to choose well and operate them safely.
Prerequisites
- A Python environment—Python 3.12+ with pip/uv available to install packages
- Node.js, used to install the browser tools
- An E2B account and API key for the cloud desktop sandbox (the free credit covers the course; a local Docker fallback ships in the repo)
- A code editor (VS Code recommended) and terminal access
- The prewired agent loop, tool stubs, and all demo code will be shared in a GitHub repo before the course
- Comfort with Python and the command line
- Basic understanding of LLMs and AI agents (the agent loop, tools, and tool calls)
- Familiarity with containers or virtual machines (helpful, but not required)
Recommended follow-up:
- Explore Building AI Agents with LangGraph (on-demand course)
- Read AI Agents: The Definitive Guide (book)
- Take Advanced Harness Engineering (live online course with Richmond Alake)
- Take Getting Started with Claude Agent SDK (live online course with Sajal Sharma)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
The machine and its interaction surfaces (45 minutes)
- Presentation: How a computer-use agent works as a loop—perceive the screen, ground an action, execute it, verify the result, and recover when the GUI does not provide a clean success signal; how screenshots, coordinates, resolution, and context management affect reliability and cost; why the desktop should be treated as one environment with multiple surfaces (GUI, shell, and files)
- Hands-on exercise: Wire the computer tool into a prebuilt agent harness, capture screenshots, and dispatch click/type/key actions
- Q&A
- Break
The shell, the files, and routing (40 minutes)
- Presentation: Routing work across the shell, file system, and GUI; when scripts are cheaper and more reliable than pixels; how command output and file checks become verification signals; how cross-surface recovery catches failures the screen alone can hide
- Hands-on exercises: Add shell and filesystem tools and implement routing capabilities between different interaction surfaces
- Q&A
- Break
Production, safety, and evaluation (35 minutes)
- Presentation: What changes when a model can drive a whole machine—blast radius, prompt injection through pixels and files, network boundaries, human approval gates, trace logging, and deterministic verification; evaluating computer-use agents with small task suites and public benchmarks without mistaking leaderboard scores for production readiness
- Hands-on exercises: Run an end-to-end receipts-to-report workflow in a cloud computer
- Q&A
Your Instructor
Sajal Sharma
Sajal Sharma is an AI engineer and technology leader with over eight years of experience in AI/ML, specializing in natural language processing. He works at Liminal, a venture studio in Singapore, where he focuses on building AI-first products and shaping technology strategies. Previously, he led AI initiatives at various consulting and product companies, developing innovative AI solutions across industries. His on-demand course, Building AI Agents with LangGraph, is available on the O’Reilly learning platform. Sajal has delivered a guest lecture at Yale University and has been a mentor for Udacity and the University of Melbourne, where he guided students in machine learning and AI. He holds a master’s degree in information technology from the University of Melbourne.
Skills covered
- AI Agents
- AI & ML
- Large Language Models (LLMs)