mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
949bb3ae732bc87e232bc96b6f3afdee6d02c836
### Why do we need this PR?: This PR fixes [#3078](https://github.com/browser-use/browser-use/issues/3078), where `ChatAWSBedrock `fails when using temporary AWS credentials (e.g., STS/SSO or role-chained). The root cause was that the class didn't implement `AWS_SESSION_TOKEN`, unlike `ChatAnthropicBedrock`. ### Changes: Add support for reading `AWS_SESSION_TOKEN `when initializing `ChatAWSBedrock`. Aligns behavior with `ChatAnthropicBedrock `for consistency. ### Impact: Users relying on temporary credentials (via aws sts assume-role, SSO, or chained roles) can now authenticate successfully. No breaking changes for users with permanent credentials. ### Tested: Verified with temporary credentials (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, `AWS_REGION`). Confirmed successful invocation of Bedrock models where it previously failed with “The security token included in the request is invalid.” <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes auth failures in ChatAWSBedrock with temporary AWS credentials by supporting AWS_SESSION_TOKEN and passing it to the Bedrock client. Users using STS/SSO/assume-role can authenticate successfully; permanent credentials continue to work. - **Bug Fixes** - Read AWS_SESSION_TOKEN from env/params and include it when creating the Bedrock client. - Updated error message and usage docs to mention AWS_SESSION_TOKEN. <!-- End of auto-generated description by cubic. -->
Enable AI to control your browser
Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文
🤖 Quickstart
With uv (Python>=3.11):
# We ship every day - use the latest version!
uv pip install browser-use
Download chromium using playwright's shortcut:
uvx playwright install chromium --with-deps --no-shell
Create a .env file and add your API key. Don't have one? Start with a free Gemini key.
GEMINI_API_KEY=
Run your first agent:
from browser_use import Agent, ChatGoogle
from dotenv import load_dotenv
load_dotenv()
agent = Agent(
task="Find the number of stars of the browser-use repo",
llm=ChatGoogle(model="gemini-2.5-flash"),
# browser=Browser(use_cloud=True), # Uses Browser-Use cloud for the browser
)
agent.run_sync()
Check out the library docs and cloud docs for more settings.
Demos
Task: Add grocery items to cart, and checkout.
Task: Read my CV & find ML jobs, save them to a file, and then start applying for them in new tabs, if you need help, ask me.
https://github.com/user-attachments/assets/171fb4d6-0355-46f2-863e-edb04a828d04
See more examples and give us a star!
MCP Integration
This gives Claude Desktop access to browser automation tools for web scraping, form filling, and more. See the MCP docs.
{
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": ["browser-use[cli]", "--mcp"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Made with ❤️ in Zurich and San Francisco
Languages
Python
98%
Shell
1.4%
Dockerfile
0.4%
HTML
0.2%