AMAZON BEDROCK / SERVICE DETAIL S07 BROWSER
AGENTCORE BROWSERPRACTICAL
CHAPTER 18 / 36
TOPIC give an agent a browser, watch it work
REV 2026.07
IN PLAIN WORDS
You will give a Strands agent a managed cloud browser and ask it something that needs the web; it opens pages and reads them, and you can watch it live in the AWS Console. Terms: AgentCoreBrowser = the Strands tool that connects to the managed browser; session = one open browser run (default 15 min); Automation = how the agent clicks and types; Live View = the video you watch.
[ 1 ] INSTALL AND CHECK CREDENTIALS
$ pip install bedrock-agentcore strands-agents strands-agents-tools playwright nest-asyncio
$ aws sts get-caller-identity # confirm your AWS login works
[x] Python 3.10+, AWS credentials
[x] Browser + model IAM permissions (see note)
[x] Model access: Anthropic Claude Sonnet 4.0 (per the docs quickstart)
[ 2 ] GIVE THE AGENT A BROWSER (browser_agent.py)
from strands import Agent
from strands_tools.browser import AgentCoreBrowser
browser_tool = AgentCoreBrowser(region="<Region>") # connect to the managed browser
agent = Agent(tools=[browser_tool.browser]) # give the agent the browser tool
prompt = (
"what are the services offered by Bedrock AgentCore? "
"Use the documentation link if needed: "
"https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html"
)
response = agent(prompt) # the agent browses and reads the page
print(response.message["content"][0]["text"])
[ 3 ] RUN IT, AND WATCH IT LIVE
$ python browser_agent.py
Agent navigates the docs site and returns the list of AgentCore services.
WATCH IT LIVE
1. Open the AgentCore Browser console.
2. Go to Built-in tools.
3. Find your session with status Ready.
4. Click View live session to watch, and take over if needed.
Permissions: your IAM identity needs the bedrock-agentcore Browser actions (Create / Start / Stop BrowserSession, ConnectBrowserAutomationStream, ConnectBrowserLiveViewStream) and bedrock:InvokeModel. To record sessions, add S3 PutObject and have the execution role trust bedrock-agentcore.amazonaws.com.