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
Do It Yourself
Key takeaways:
- AI-driven browser automation beats brittle selectors β Nova Act and Strands let you describe actions in natural language. When UIs change, the agent adapts without code changes. Traditional Selenium/Playwright scripts break and require maintenance.
- AgentCore provides production-grade infrastructure β VM-level session isolation, ephemeral browsers, CloudTrail audit logging, and IAM integration are included. You donβt need to manage headless browser infrastructure yourself.
- Pick the right tool for your control vs. flexibility trade-off β Nova Act for natural language automation (highest flexibility), Strands for multi-agent orchestration, Playwright with AgentCore for deterministic control when you need exact selectors.
Try it now:
- Set up AgentCore and run a test agent β Follow the Bedrock AgentCore getting started guide to deploy your first browser automation agent. Start with a simple task like navigating to a public website and extracting structured data.
- Try Nova Act for natural language automation β Install the Nova Act SDK and test it on a form-filling task. Compare the code simplicity of
agent.act("fill the contact form with this data")vs. writing explicit Playwright selectors for each field. - Build a data extraction workflow β Pick a website your team manually extracts data from today (a vendor portal, logistics dashboard, or compliance site). Build an AgentCore agent that automates the extraction and outputs structured JSON. Measure time saved per run.
Never miss a post
Get notified when I publish new articles about AI, Cloud, and AWS.
No spam, unsubscribe anytime.
Comments
Sign in to leave a comment
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.
Deploying 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.
Strands Agents Steering Plugins β How Just-in-Time Guidance Beats Prompts and Workflows
Strands Agents plugins let you intercept every decision in the agentic loop. Steering hooks achieved 100% accuracy across 600 evaluation runs β where prompt engineering scored 82.5% and graph workflows 80.8%.
