Playwright Adapter¶
@agentclutch/playwright provides an explicit wrapper for browser actions.
Attach¶
import { attachClutch } from "@agentclutch/playwright";
const clutch = await attachClutch(page, {
runId: "run_001",
agentName: "browser-agent",
recorder
});
Click¶
Submit¶
Behavior¶
The adapter:
- Converts the browser action into
ActionProposalInput. - Sets
sourceModetotool_wrapper. - Normalizes the proposal with
@agentclutch/loop. - Builds an Action Card.
- Shows the browser overlay.
- Builds
LoopResumeContext. - Executes only on
approve_once.
block, edit_fields, take_wheel, and create_rule do not execute the original browser action in the MVP.
No Monkey Patching¶
The MVP does not monkey-patch Playwright. Call clutch.click or clutch.submit explicitly.