Computer use agents fit interact wit websites like how pesin go do am: opening browser, check di page, den take di next best action based on wetin dem see. For dis lesson, you go build browser automation agent wey dey search Airbnb, carry out structured listing data, and find di cheapest place to stay for Stockholm.
Di lesson join Browser-Use for AI-driven navigation, Playwright and Chrome DevTools Protocol (CDP) for browser control, Azure OpenAI for vision-enabled reasoning, plus Pydantic for structured extraction.
Dis lesson go cover:
After you finish dis lesson, you go sabi how to:
Dis lesson get one notebook tutorial:
Install di packages wey di notebook dey use:
pip install browser_use playwright python-dotenv
playwright install chromium
Set the Azure OpenAI environment variables wey di notebook dey use:
AZURE_OPENAI_ENDPOINT=...
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=...
# Optional: e go use di latest API version if you no put anything
AZURE_OPENAI_API_VERSION=...
Di notebook dey show one hybrid browser automation workflow:
Dis method dey keep di flexible, vision-based reasoning wey Browser-Use sabi well, plus e still give you deterministic browser control when you need am.
| Scenario | Use Agent | Use Actor |
|---|---|---|
| Dynamic layouts | Yes, AI fit adapt to page changes | No, brittle selectors fit break |
| Known structure | No, agent slow pass direct control | Yes, fast and precise |
| Finding elements | Yes, natural language dey work well | No, exact selectors dey required |
| Timing control | No, less predictable | Yes, full control over waits and retries |
| Complex workflows | Yes, fit handle unexpected UI states | No, e need explicit branching |
Browser agents dey work for live websites, so dem need tighter boundaries pass script wey dey call known API only. Before you move from notebook demo go real workflow, define di controls about wetin di agent fit see, click, and submit.
For di Airbnb sample, di safe default na to search listings and extract prices. To sign in, contact host, or complete booking suppose be separate user-approved action.
Di agent wey you build for dis lesson na small, local version of computer use agent (CUA) — na program wey dey drive browser like pesin. Microsoft dey bring dis same idea enter enterprise wit Project Opal (Frontier), na feature for Microsoft 365 Copilot.
Wit Project Opal, you go talk task, and di agent go work on your behalf using computer use for secure Windows 365 Cloud PC, e go work across your organization’s browser-based apps, sites, and data. E dey work asynchronously for background, and you fit guide di work or take control anytime. Example jobs na:
Opal na correct example for production-grade, trustworthy computer use agent — and e dey reinforce concepts from earlier lessons:
| Concept for dis course | How Project Opal dey apply am |
|---|---|
| Human-in-the-loop (Lesson 06) | Opal go pause for login credentials, sensitive data, or ambiguous instructions, and e no go ever enter passwords or submit forms without clear confirmation. You fit Take Control and Return Control during task. |
| Trustworthy & secure agents (Lessons 06 & 18) | E dey run inside isolated Windows 365 Cloud PC, e browser-only by default (other computer access blocked, enforced by Intune), e dey use your identity so e go only access wetin you get permission for, and e go log every action for auditability. |
| Planning & metacognition (Lessons 07 & 09) | Opal first go generate plan for job, then e go supervise e own reasoning at each step and pause if e see suspicious activity. |
| Reusable capabilities / tools (Lesson 04) | Skills dey let you write instructions for repeatable jobs (import from .md file or write with Opal) and reuse dem across conversations. |
Availability: Project Opal dey available now for users wey dey Frontier early access program wit Microsoft 365 Copilot subscription, and your administrator must complete setup. Because na experimental Frontier feature, capabilities fit change over time.
Exploring Microsoft Agent Framework
Disclaimer: Dis document don translate wit AI translation service Co-op Translator. Even tho we dey try make am correct, abeg make you know say automated translation fit get errors or mistakes. Di original document for dia own language na im be di correct source. For important info, make person wey sabi human translation do am. We no go responsible for any misunderstanding or wrong understanding wey fit happen because of dis translation.