Skip to content

Commit 225b039

Browse files
committed
update docs
1 parent 40e1c8c commit 225b039

3 files changed

Lines changed: 3502 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ HyperAgent provides two complementary APIs optimized for different use cases:
118118
- ⚡ **Fast** - Uses accessibility tree (no screenshots)
119119
- 💰 **Cheap** - Single LLM call per action
120120
- 🎯 **Reliable** - Direct element finding and execution
121-
- 📊 **Efficient** - Text-based DOM analysis
121+
- 📊 **Efficient** - Text-based DOM analysis with automatic ad-frame filtering
122122

123123
**Example**:
124124
```typescript
@@ -136,18 +136,27 @@ await page.aiAction("click the login button");
136136
**Best for**: Complex workflows requiring multiple steps and visual context
137137

138138
**Advantages**:
139+
139140
- 🖼️ **Visual Understanding** - Can use screenshots with element overlays
140141
- 🎭 **Complex Tasks** - Handles multi-step workflows automatically
141142
- 🧠 **Context-Aware** - Better at understanding page layout and relationships
142143
- 🔄 **Adaptive** - Can adjust strategy based on page state
143144

145+
**Parameters**:
146+
147+
- `useDomCache` (boolean): Reuse DOM snapshots for speed
148+
- `enableVisualMode` (boolean): Enable screenshots and overlays (default: false)
149+
144150
**Example**:
151+
145152
```typescript
146153
const page = await agent.newPage();
147154
await page.goto("https://flights.google.com");
148155

149156
// Complex task with multiple steps handled automatically
150-
await page.ai("search for flights from Miami to New Orleans on July 16");
157+
await page.ai("search for flights from Miami to New Orleans on July 16", {
158+
useDomCache: true,
159+
});
151160
```
152161

153162
### 🎨 Mix and Match
@@ -376,6 +385,12 @@ HyperAgent speaks Chrome DevTools Protocol natively. Element lookup, scrolling,
376385

377386
HyperAgent integrates seamlessly with Playwright, so you can still use familiar commands, while the actions take full advantage of native CDP protocol with fast locators and advanced iframe tracking.
378387

388+
**Key Features:**
389+
390+
- **Auto-Ad Filtering**: Automatically filters out ad and tracking iframes to keep context clean
391+
- **Deep Iframe Support**: Tracking across nested and cross-origin iframes (OOPIFs)
392+
- **Exact Coordinates**: Actions use precise CDP coordinates for reliability
393+
379394
Keep in mind that CDP is still experimental, and stability is not guaranteed. If you’d like the agent to use Playwright’s native locators/actions instead, set `cdpActions: false` when you create the agent and it will fall back automatically.
380395

381396
The CDP layer is still evolving—expect rapid polish (and the occasional sharp edge). If you hit something quirky you can toggle CDP off for that workflow and drop us a bug report.

0 commit comments

Comments
 (0)