Skip to main content
Browser Tool While we recommend direct execution for better control and live session access, you can also use browser tasks as agent tools in your AI applications.

Quick Start

Tradeoffs

Agent tools (simpler integration):
  • ✅ Easy to add to existing agent workflows
  • ✅ Let the LLM decide when to use browser
  • ❌ No live session URLs for monitoring
  • ❌ No video recording support
  • ❌ Adds extra LLM call overhead
  • ❌ Limited debugging capabilities
Direct execution (recommended):
  • ✅ Rich debugging data (URLs, actions, errors)
  • ✅ Live session access for monitoring
  • ✅ Video recording support
  • ✅ Agent self-assessment
  • ✅ No extra LLM calls
  • ❌ Requires explicit calls (not agent-driven)
For most use cases, we recommend direct execution for better control and debugging capabilities.

Tool Configuration

All tool adapters support the same configuration options:

Available Models

Site Authentication

Pass credentials when executing the tool:
Supports username/password, per-domain credentials, and cookies. See direct execution docs for details.

Example: Multi-tool Agent

Combine browser automation with other tools:

Formatting Results

The tool adapters return concise results suitable for agent consumption. For custom formatting:

Migration from Direct Execution

If you’re currently using direct execution and want to try tools: Before (direct execution):
After (as tool):
Browser tools use a different pattern ({ tool, execute }) than other Morph tools. Use createBrowserTool() directly with the apiKey option, or use morph.browser.execute() for direct execution.

See Also