Overview
Integration details
Tool features
Available tools
The toolkit provides multiple tools for browser automation:Setup
The integration lives in thelangchain-aws package. It also requires playwright and beautifulsoup4 for browser automation and HTML parsing.
Credentials
You need AWS credentials configured with permissions for Bedrock AgentCore Browser. See the Amazon Bedrock AgentCore documentation for required IAM permissions. Itβs also helpful (but not needed) to set up LangSmith for best-in-class observability:Instantiation
The toolkit is created using a factory function. In its simplest form, only the AWS region is required:Proxy configuration
Route browser traffic through external proxies using theproxy_configuration parameter. This is useful for geo-targeting, IP rotation, or accessing region-restricted content.
proxy_configuration parameter accepts either a ProxyConfiguration dataclass from bedrock-agentcore or an equivalent dictionary with proxies and optional bypass keys. Proxy credentials are stored securely in AWS Secrets Manager.
For more details, see the AWS documentation on browser proxies.
Browser extensions
Load browser extensions from S3 into the managed browser session using theextensions parameter. Extensions are packaged as ZIP files and hosted in an S3 bucket.
extensions parameter accepts a list of BrowserExtension dataclasses or equivalent dictionaries, each with an S3 location specifying the bucket and prefix.
For more details, see the AWS documentation on browser extensions.
Browser profiles
Persist browser state (cookies, local storage, cached data) across sessions using theprofile_configuration parameter. This allows agents to resume where they left off without re-authenticating or losing context.
Create a profile using the AWS CLI or Boto3, then pass the returned profile ID:
profile_configuration parameter accepts either a ProfileConfiguration dataclass from bedrock-agentcore or an equivalent dictionary with a profileIdentifier key. Profile IDs follow the format <name>-<10-char-suffix> and are returned when you create a profile via the Bedrock AgentCore control plane API.
For more details, see the AWS documentation on browser profiles.
Combining configuration options
All three configuration options can be used together:Invocation
Direct tool usage
Get specific tools and invoke them:Use within an agent
Thread-based session isolation
The toolkit maintains separate browser sessions for eachthread_id. This enables concurrent usage without interference:
Browser actions
Navigation
Interacting with elements
Extracting content
Screenshots and scrolling
Session cleanup
Always clean up browser sessions when done to release resources:Note: Whilecreate_browser_toolkit()is synchronous, thecleanup()method is asynchronous and must be awaited.
Concurrency protection
The toolkit includes built-in concurrency protection. Each browser session is tied to a specificthread_id, and attempting to access the same session while itβs already in use will raise a RuntimeError. Use different thread_id values for concurrent operations.
API reference
For detailed documentation of all features and configurations, see:- langchain-aws API reference
- Amazon Bedrock AgentCore documentation
- Browser proxies
- Browser extensions
- Browser profiles
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

