Quick Decision Tree
1
Is it a simple 1-2 action task?
Yes → Use Browser ActionsNo → Continue to next step
2
Is the primary goal data extraction?
Yes → Use Browser CodeNo → Continue to next step
3
Does it require multi-step navigation or complex workflow?
Yes → Use Browser AgentsNo → Use Browser Actions
By Use Case
Simple Interactions
Example: “Click the login button and enter email”Browser Actions
Best Choice - Fast, cheap, and perfect for simple tasks
- Completes in 1-2 steps
- Cacheable for cost savings
- Fast execution
- Predictable outcome
Data Extraction
Example: “Extract all product names and prices from the page”Browser Code
Best Choice - Precise, reliable extraction with structured output
- Returns structured data
- Precise control over extraction logic
- Cacheable code generation
- Reliable and repeatable
browser_assess_page for simpler extraction with schema validation.
Multi-Page Workflows
Example: “Complete the checkout process from cart to confirmation”Browser Agents
Best Choice - Autonomous navigation with unlimited steps
- No step limit
- Handles complex flows
- State management
- Adaptive to page changes
Visual Understanding
Example: “Find and click the green ‘Confirm’ button in the modal”Computer Use Agent
Best Choice - Vision-based understanding of layout
- Understands visual layout
- Extended reasoning capability
- Works with complex visual interfaces
- Can identify elements by appearance
Comparison Matrix
By Task Complexity
| Complexity Level | Task Examples | Best Choice | Alternative |
|---|---|---|---|
| Low (1-2 steps) | • Click button • Fill single field • Navigate to page | Browser Actions | - |
| Medium (3-10 steps) | • Multi-step form • Login flow • Search and filter | Browser Agents | Browser Actions (if predictable) |
| High (10+ steps) | • Complete checkout • Multi-page wizard • Complex workflow | Browser Agents | - |
| Data Focused | • Extract table data • Scrape listings • Parse structured info | Browser Code | browser_assess_page |
By Priority
| Priority | Recommendation | Why |
|---|---|---|
| Cost Optimization | Browser Actions (with caching) | 5 credits per cached execution |
| Reliability | Browser Code | Explicit, deterministic logic |
| Flexibility | Browser Agents | Handles unpredictable scenarios |
| Speed | Browser Actions | Fast execution, minimal overhead |
| Precision | Browser Code | Exact control over operations |
By Output Needs
| What You Need | Best Choice | Example |
|---|---|---|
| No output (just actions) | Browser Actions or Agents | Click, navigate, type |
| Simple confirmation | Browser Actions | ”Button clicked successfully” |
| Structured data | Browser Code | [{name: "...", price: "..."}] |
| Page assessment | browser_assess_page | Evaluated structured data |
| Screenshots | Any + browser_get_screenshot | PNG image data |
Common Scenarios
Scenario 1: E-commerce Product Search
Task: Search for “wireless headphones”, filter by price under $100, and add first result to cartScenario 2: Extract Product Listings
Task: Extract all products with name, price, and rating from the current pageScenario 3: Login and Navigate
Task: Log in to dashboard and navigate to settings pageScenario 4: Click Submit Button
Task: Scroll to the bottom and click the submit buttonCost Considerations
Optimize for Cost
-
Use Browser Actions for repeated simple tasks
- Fresh: 50 credits
- Cached: 5 credits (10x cheaper!)
-
Cache Browser Code for repeated extractions
- Code generation cached
- Subsequent runs cheaper
-
Avoid over-using Agents for simple tasks
- Variable cost based on steps
- More expensive than Actions
Example Cost Comparison
Task: Click login button (repeated 100 times)| Approach | Cost |
|---|---|
| Browser Actions (cached) | 5 credits × 100 = 500 credits |
| Browser Actions (fresh) | 50 credits × 100 = 5,000 credits |
| Browser Agents | ~2-5 steps × cost/step × 100 = Higher |
Still Not Sure?
Start Simple, Upgrade as Needed
- Try Browser Actions first if the task seems simple
- Upgrade to Agents if you hit the 2-step limit
- Switch to Code if you need precise data extraction
Ask Yourself
How many steps does this task require?
How many steps does this task require?
- 1-2 steps: Browser Actions
- 3+ steps: Browser Agents
- Just extraction: Browser Code
Will I repeat this task often?
Will I repeat this task often?
- Yes, frequently: Browser Actions (for caching)
- No, one-time: Any approach works
- Varies by data: Browser Code (caches generation)
How predictable is the workflow?
How predictable is the workflow?
- Very predictable: Browser Actions or Code
- Some variation: Browser Agents
- Highly dynamic: Browser Agents
What output do I need?
What output do I need?
- None (just actions): Browser Actions
- Structured data: Browser Code
- Completion confirmation: Browser Agents
Quick Reference
Browser Actions
When: Simple, fast, repeatedCost: 5-50 creditsLimit: 2 steps
Browser Agents
When: Complex, multi-step, adaptiveCost: VariableLimit: None
Browser Code
When: Data extraction, precise controlCost: MediumLimit: Logic-based