Browser Automation Agents - Amazon Bedrock AgentCore
Enterprise workflows often require interacting with web applications that lack APIs. Traditional automation scripts are brittle and break when UIs change.
The Problem
Many enterprise workflows require interacting with web applications that lack APIs:
- Legacy systems with web-only interfaces
- Third-party portals for data extraction
- Form filling across multiple platforms
- QA testing of dynamic web applications
Traditional approaches (Selenium scripts, Playwright automation) are brittle and require constant maintenance when UIs change.
The Solution
Amazon Bedrock AgentCore provides managed infrastructure for deploying production-ready AI agents with browser automation capabilities. Instead of writing brittle selectors, you describe actions in natural language and let AI-driven tools handle the execution.
Key components:
- Browser Tool β Managed headless Chrome with VM-level isolation
- Nova Act β Specialized model for UI automation (90%+ reliability)
- Strands β AWSβs native agent framework with browser integration
How It Works
AgentCore Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β YOUR AGENT CODE β
β (Strands / Nova Act / LangGraph / CrewAI / Custom) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AMAZON BEDROCK AGENTCORE β
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββββββββββββ
β β Runtime β β Gateway β β Memory β β Identity ββ
β β Serverless β β APIβMCP β β Context β β Cross-service ββ
β β execution β β conversion β β storage β β auth ββ
β βββββββββββββββ βββββββββββββββ βββββββββββββββ ββββββββββββββββββββββββ
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β BROWSER TOOL ββ
β β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββββββββββ ββ
β β β Headless β β Playwright β β Session Isolation (1:1) β ββ
β β β Chrome β β Library β β VM-level security β ββ
β β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββββββββββ ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Framework Comparison
| Framework | Best For | AI-Driven Actions | Integration Effort |
|---|---|---|---|
| Nova Act | UI automation, form filling | Yes (90%+ reliability) | Low |
| Strands | Multi-agent workflows | Yes | Low |
| LangGraph | Complex reasoning chains | Via tools | Medium |
| Raw Playwright | Explicit control | Manual coding | High |
Method 1: Nova Act (Recommended)
Nova Act uses a specialized model trained for browser automation:
from nova_act import NovaAct
agent = NovaAct(
api_key=os.environ["NOVA_ACT_API_KEY"],
browser="agentcore"
)
# Natural language instruction - AI figures out the actions
result = agent.act(
"Go to the shipping portal, log in with credentials from environment, "
"navigate to the rates section, and extract all Capesize route prices"
)
print(result.extracted_data)
Method 2: Strands Agents
AWSβs native agent framework with browser integration:
from strands import Agent
from strands_agents_tools import BrowserTool
agent = Agent(
model="anthropic.claude-sonnet-4",
tools=[BrowserTool()],
system_prompt="""You are a data extraction agent.
Use the browser to navigate websites and extract structured data.
Always return data in JSON format."""
)
response = agent.run(
"Go to the Baltic Exchange website and extract today's dry bulk rates"
)
Method 3: Playwright with AgentCore Browser
For cases requiring explicit control:
async def run_with_agentcore():
agentcore = boto3.client('bedrock-agent-runtime')
session = agentcore.create_browser_session(sessionDurationMinutes=30)
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp(session['cdpEndpoint'])
page = await browser.new_page()
await page.goto("https://example.com")
await page.fill("#username", "user@example.com")
await page.click("button[type='submit']")
rates = await page.evaluate("""
() => Array.from(document.querySelectorAll('.rate-row'))
.map(row => ({
route: row.querySelector('.route').textContent,
rate: row.querySelector('.rate').textContent
}))
""")
return rates
Deployment to AgentCore Runtime
# Configure
agentcore configure -e my_agent.py
# Launch (creates AWS resources automatically)
agentcore launch
# Test
agentcore invoke '{"prompt": "Extract data from example.com"}'
Security Features
| Feature | Description |
|---|---|
| Session Isolation | Each session runs in isolated VM |
| Ephemeral Sessions | Browser state cleared after use |
| CloudTrail Logging | All actions logged for audit |
| IAM Integration | Fine-grained access control |
| VPC Connectivity | Private network access supported |
What I Learned
- Use Nova Act or Strands for AI-driven browser automation β They handle the complexity of mapping natural language to browser actions
- Playwright + AgentCore for explicit control β When you need deterministic behavior
- Custom wrappers are possible but costly β Integrating other frameworks (Google ADK, etc.) requires significant custom code
- Security is built-in β VM isolation, ephemeral sessions, and audit logging come standard
Whatβs Next
- Build a multi-agent workflow for end-to-end data pipeline
- Implement retry logic and error recovery patterns
- Add session recording for debugging failed runs
Related Posts
AWS Weekly Roundup β February 2026: AgentCore, Bedrock, EC2 and More
A curated summary of the most important AWS announcements from February 2026 β from Bedrock AgentCore deep dives to new EC2 instances and the European Sovereign Cloud.
CloudDeploying a Personal AI Assistant on AWS with Bedrock AgentCore Runtime
A hands-on walkthrough of deploying OpenClaw on AWS using AgentCore Runtime for serverless agent execution, Graviton ARM instances, and multi-model Bedrock access β from CloudFormation template to customizing the agent's personality.
DevelopmentAWS Backup Cost Analysis
EBS snapshot costs were growing month-over-month with no clear explanation or optimization strategy.
