Overview
This node automates browser tasks using Amazon Bedrock AgentCore Browser and Playwright. It supports executing browser actions from natural language instructions, running custom Playwright scripts, and navigating to URLs to extract data. Common use cases include automating web searches, filling forms, extracting web page content, and running custom browser automation scripts, which is useful for AI agents, data scraping, and automated testing.
Use Case Examples
- Search amazon.com for wireless headphones and extract top 3 products using natural language instructions.
- Run a custom Playwright script to interact with a web page and retrieve the page title.
- Navigate to a URL, perform actions like clicking or typing, and extract text or HTML content from specified selectors.
Properties
| Name | Meaning |
|---|---|
| Authentication | Selects the authentication method to use, either AWS credentials or custom AgentCore Browser API credentials. |
| Browser Tool ARN | The Amazon Resource Name (ARN) of the AgentCore Browser tool to use for automation. |
| Start URL | The initial URL to navigate to when starting the browser session. |
| Timeout (ms) | Maximum time in milliseconds to wait for the browser operation to complete. |
| Instructions | Natural language instructions describing the browser actions to perform, such as searching or extracting data. |
| URL Override | Optional URL to override the URL derived from instructions or the start URL. |
| Session Timeout (seconds) | Timeout duration in seconds for the browser session. |
Output
Binary
Screenshot image data in PNG format, captured optionally during operations.
JSON
results- Array of extracted search results with product names and prices (for Amazon search).instructions- The natural language instructions provided for the browser actions.searchQuery- Extracted search query from the instructions.url- The current URL of the browser page after navigation.title- The title of the current browser page.result- Result object returned from executing a custom Playwright script.data- Extracted data from the page based on the CSS selector and extraction mode.sessionInfobrowserId- Identifier of the browser instance used in the session.sessionId- Identifier of the browser session.
error- Error message if the operation fails and continueOnFail is enabled.
Dependencies
- Amazon Bedrock AgentCore Browser service
- AWS credentials or custom AgentCore Browser API credentials
Troubleshooting
- Ensure correct AWS credentials or custom API credentials are provided to avoid authentication errors.
- Timeout errors may occur if the page takes too long to load; increase the Timeout (ms) parameter if needed.
- Natural language instructions must be clear and relevant to supported actions; ambiguous instructions may lead to unexpected results.
- When running custom scripts, syntax errors or runtime exceptions in the script will cause the node to fail; validate scripts before use.
- If extraction selectors do not match any elements, the output data may be empty; verify CSS selectors are correct.
Links
- Amazon Bedrock AgentCore Browser Documentation - Official documentation for the AgentCore Browser service used by this node.
- Playwright Automation Library - Documentation for Playwright, the browser automation library used internally by the node.
