# Browser Tool

Composio Browser Tool enables AI Agents and LLMs to automate web interactions, perform web scraping, and conduct automated testing. Use cases include data extraction, form automation, website monitoring, and intelligent web navigation.

- **Category:** ai agents
- **Auth:** NO_AUTH
- **Composio Managed App Available?** N/A
- **Tools:** 5
- **Triggers:** 0
- **Slug:** `BROWSER_TOOL`
- **Version:** 20260319_00

## Tools

### Run Browser Task

**Slug:** `BROWSER_TOOL_CREATE_TASK`

Run an AI-powered browser automation task. The AI agent will control a cloud browser to complete your task. It can: - Navigate websites, click buttons, fill forms - Extract data and return results - Handle multi-step workflows (login -> navigate -> extract) - Solve CAPTCHAs and handle dynamic content If there is no running browser session in context, call CreateTask to start one. AFTER CREATING A TASK: 1. Use GetSession with browser_session_id to get the liveUrl - share with user to watch live 2. Use WatchTask with watch_task_id to check progress and get the final result 3. Use StopTask if you need to abort TIPS FOR GOOD TASKS: - Be specific: "Click login, enter email 'test@test.com', click submit" - Break complex workflows into smaller tasks

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task` | string | Yes | Natural language instructions for the browser AI agent. Be specific and clear. Examples: 'Go to amazon.com, search for wireless headphones, and return the top 3 results with prices', 'Log into twitter.com and post a tweet saying Hello World'. For multi-step workflows, break them into clear sequential instructions. |
| `secrets` | object | No | Domain-specific credentials for automatic login. Map domain patterns to 'username:password'. Example: {'https://example.com': 'user@email.com:pass123', 'https://*.google.com': 'email@gmail.com:password'}. Wildcards (*) supported for subdomains. |
| `startUrl` | string | No | URL to navigate to before starting the task. If not provided, agent starts from blank page. |
| `sessionId` | string | No | Leave this empty for the first task, a new session will be auto-created. To continue in an existing browser: pass the browser_session_id from a previous CreateTask response. This preserves login state and cookies between tasks. Important: the previous task in this session must be finished or stopped (via StopTask or by waiting for WatchTask to show status='finished') before creating a new task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Task File

**Slug:** `BROWSER_TOOL_GET_OUTPUT_FILE`

Get a download URL for a file generated by a task. When a task downloads or creates files (PDFs, images, spreadsheets, etc.), they appear in WatchTask's outputFiles list. Use this to get a download URL. The download URL is temporary (presigned) - download promptly.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | File ID from WatchTask's outputFiles list |
| `taskId` | string | Yes | Task ID from CreateTask |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Session Live URL

**Slug:** `BROWSER_TOOL_GET_SESSION`

Get the live URL to watch a browser session in real-time. Call this right after CreateTask to get the liveUrl. Always share this URL with the user so they can watch the AI agent working in the browser. The liveUrl opens a visual stream showing exactly what the browser agent sees and does.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sessionId` | string | Yes | The sessionId returned from a CreateTask call you made previously. Only use session IDs from your own CreateTask responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stop Browser Task

**Slug:** `BROWSER_TOOL_STOP_TASK`

Kill a browser task and its session. Use this when the browser agent is in a bad state: - Task is stuck or taking too long - WatchTask shows the agent going in the wrong direction - Agent is looping or making no progress After stopping, call CreateTask again to start fresh with a new browser.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Task ID to stop (from CreateTask) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Watch Browser Task

**Slug:** `BROWSER_TOOL_WATCH_TASK`

Poll a browser task to check progress and get results. Call this after CreateTask to monitor the task: - status='started' means still running, poll again - status='finished' means done, check output and is_success - status='stopped' means aborted Returns what the agent is doing (current_goal, current_url), screenshots from each step, and any files generated. If the agent is going wrong, use StopTask to kill it and start fresh.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | The taskId from CreateTask response |
| `lastStepSeen` | integer | No | Last step number from a previous WatchTask response (current_step value). Only steps after this will be returned for incremental updates. Omit or pass 0 to get all steps. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
