AI Engineering
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.
· 5 MIN READ
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.
ABOUT THE AUTHOR
ONE LETTER A MONTH · NO TRACKER · UNSUBSCRIBE ANYTIME
CONTINUE READING
Related dispatches
AWS Agent Toolkit GA: How I Gave an Agent 15,000 AWS APIs Without Losing Sleep
9 MIN READ
Boulder — The Self-Replicating AI Build Factory on AWS
10 MIN READ
From RPA Bots to AI Agents — A 5-Criterion Scoring Framework for Enterprise Migration
5 MIN READ
Comments
Sign in to leave a comment
