Skip to content

Commit c879c02

Browse files
masnwilliamsclaude
andcommitted
Expand control.mdx with computer use + playwright execution patterns
Adds three named patterns (tool, checkpoint, drop-the-agent) as short bullets under the existing recommended-pattern section. No new page. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 3aa9dd2 commit c879c02

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

introduction/control.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ If you're reaching for Playwright, prefer the execution API over `connectOverCDP
163163

164164
Computer controls drive the browser the way a person would — they don't speak the programmatic API surface. Anything you'd reach for the DOM or Playwright client for (reading text and attributes, `page.goto`, file uploads, cookie or storage access, switching tabs) belongs on the [playwright execution](/browsers/playwright-execution) side. The recommended pattern for agents is computer controls for interaction, playwright execution as a tool the agent can call when it needs structured data or a programmatic action.
165165

166+
A couple of patterns this enables:
167+
168+
- **Checkpoint between steps.** After a step you can't verify from a screenshot — a login, a cart add, a multi-step form — use playwright execution to assert cookies or DOM state before letting the agent continue. Cheaper than another screenshot round-trip and harder to hallucinate around.
169+
- **Drop the agent once selectors are stable.** The agent's job was finding the right things to click and extract. Once you have stable selectors, the next million requests don't need a model — hit URLs directly via playwright execution.
170+
166171
<CodeGroup>
167172
```typescript Typescript/Javascript
168173
const response = await kernel.browsers.playwright.execute(

0 commit comments

Comments
 (0)