BLOG
Bedrock AgentCore: How to Integrate with Remote Browser for Scalable Web Automation
Integrate Bedrock AgentCore with remote-browser.dev for scalable web automation. Deploy AI agents that interact with websites without managing infrastructure.
When you build an autonomous AI agent with Bedrock AgentCore, you give it the ability to reason, plan, and execute tasks on your behalf. But what happens when that task involves interacting with a web page—filling a form, extracting data, or monitoring a dashboard? Your agent needs a browser. And not just any browser: it needs one that is reliable, scalable, and easy to manage from the cloud.
This is where remote-browser.dev fits. Instead of spinning up a local Chromium instance for each agent task, you offload browser operations to our hosted API. The result is a cleaner architecture, lower operational overhead, and a runtime that works as seamlessly with Bedrock AgentCore as it does with any other AI workflow.
In this post, we’ll walk through why a hosted browser is the natural companion for Bedrock AgentCore, how to connect them, and what you gain by using remote-browser.dev instead of a local setup.
What is Bedrock AgentCore?
Bedrock AgentCore is an AWS service for building and running autonomous agents that can break down tasks, call APIs, and orchestrate multi-step workflows. Think of it as the brain: the agent decides what to do next, potentially calling a function or interacting with an external service.
When the “external service” is a web application—like a SaaS dashboard, an e-commerce site, or a legacy system without an API—the agent needs a browser to execute. That browser must be:
- Always available (agents run 24/7)
- Scalable (agents can spawn numerous concurrent sessions)
- Stealthy (avoid detection by anti-bot measures)
- Instrumentable (via standard protocols like CDP or WebDriver)
Running a browser locally inside a Lambda, ECS task, or EC2 instance works for testing, but it breaks down quickly at production scale. That’s the gap remote-browser.dev fills.
The Problem with Local Browsers for AgentCore
Let’s be concrete. You have an AgentCore agent that monitors competitor pricing on a dynamic page. The agent loops every hour: open the page, extract prices, decide if a response is needed.
Running Chromium locally means you must:
- Provision a machine with enough resources (RAM, CPU)
- Manage Chrome binaries and keep them updated
- Handle zombie processes and memory leaks
- Configure proxies and user agents manually for each task
- Deal with IP blocks when scaling across multiple sessions
For a single agent, this is manageable. For ten agents doing different tasks—scraping, form filling, UI testing—it becomes a maintenance nightmare. And if your agent runs in a serverless environment like Lambda, you’ll hit cold start delays and storage limits when you try to bundle a browser.
Why a Cloud Browser Changes the Game
A hosted browser API abstracts all that infrastructure. With remote-browser.dev, you get:
- Instant Chromium sessions via a simple API call or WebSocket connection
- Persistent profiles that keep cookies, logins, and local storage across sessions
- Configurable browser settings—proxy, user-agent, viewport—to match your target site
- Playwright, Puppeteer, and CDP compatibility—no vendor lock-in
- Session isolation—each agent gets a clean sandbox by default, or a dedicated instance
- Usage controls—set timeouts, max pages, and concurrency limits per API key
All of this runs on our infrastructure, so your Bedrock AgentCore agent simply calls a remote endpoint. No browser to install, no drift between staging and production.
Comparison: Local vs. Remote Browser for AgentCore
| Aspect | Local Browser (e.g., in ECS/Lambda) | Remote Browser (remote-browser.dev) |
|---|---|---|
| Setup time | Hours: install Chrome, configure drivers, manage dependencies | Minutes: get an API key, use a WebSocket URL |
| Scalability | Limited by instance resources; multi-session requires careful orchestration | Scales horizontally; launch many isolated sessions on demand |
| Stealth | Manual tuning of user agents, viewports, and headers | Pre-configured proxy network and browser profiles for reduced detectability |
| Maintenance | You handle browser updates, bug fixes, and patching | Provider handles version updates and security patches |
| Persistence | Complex: must persist cookies and storage to disk or DB | Built-in persistent profiles save and restore state automatically |
| Cold starts | Yes, if using serverless or auto-scaling | No cold starts; sessions are always hot |
| Cost | Server cost + engineering time for management | Pay per session minute; no idle resource cost (see /pricing) |
| Global reach | Requires setting up proxies in each region | Access to a pool of IPs across multiple geographies |
For Bedrock AgentCore agents that must run reliably for days or weeks, the remote approach wins on every dimension except pure latency for very short-lived tasks.
Integrating remote-browser.dev with Bedrock AgentCore
The integration is straightforward. Your agent uses the CDP (Chrome DevTools Protocol) endpoint to connect to a remote browser instance. Here’s a TypeScript example using Playwright:
import { chromium } from 'playwright';
import { BedrockAgentRuntimeClient, InvokeAgentCommand } from '@aws-sdk/client-bedrock-agent-runtime';
async function runAgentWithBrowser() {
// Connect to a remote browser session
const browser = await chromium.connectOverCDP('wss://remote-browser.dev/connect?apiKey=YOUR_API_KEY');
const page = await browser.newPage();
// Navigate to the target URL
await page.goto('https://example-pricing.com');
// Extract data
const prices = await page.evaluate(() => {
return Array.from(document.querySelectorAll('.price')).map(el => el.textContent);
});
// Pass data to Bedrock AgentCore for reasoning
const client = new BedrockAgentRuntimeClient({ region: 'us-east-1' });
const command = new InvokeAgentCommand({
agentId: 'your-agent-id',
agentAliasId: 'your-alias',
sessionId: 'session-1',
inputText: `Here are the latest prices: ${JSON.stringify(prices)}. Should we respond?`
});
const response = await client.send(command);
console.log(response.completion);
// Clean up
await browser.close();
}In this pattern, the agent’s browser interaction happens entirely through the remote API. Bedrock AgentCore never sees the browser code; it only receives the structured data extracted from the page. This keeps your agent logic clean and focused on decision-making.
If you prefer raw CDP access, the same endpoint works with Puppeteer or direct WebSocket connections. See our /documentation for protocol-specific details.
Use Cases for Bedrock AgentCore + Remote Browser
The combination unlocks practical, production-grade automations:
- Competitive monitoring – Agents that log into dashboards, take screenshots, and alert on changes.
- E-commerce operations – Automated price updates, stock checks, and checkout flows across multiple stores.
- Lead generation – Agents that scrape directories, enrich profiles, and update CRM records.
- Compliance auditing – Agents that periodically visit regulated sites and verify required disclosures.
- Web-based AI training – Agents that collect training data from public websites, respecting
robots.txtand rate limits. - Content aggregation – Agents that gather news, reviews, or social media trends from multiple sources and summarise them for dashboards or reports.
In each case, the remote browser handles the “head” while Bedrock AgentCore handles the “brain”. You get the reliability of a managed runtime with the flexibility of a custom AI workflow.
Best Practices for Production Deployments
When moving from prototype to production with Bedrock AgentCore and remote-browser.dev, consider these guidelines:
- Use persistent profiles for tasks that require login state. This avoids re-authentication on every run and reduces the risk of IP blocks.
- Set explicit timeouts on both the agent invocation and the browser session to avoid runaway costs. remote-browser.dev allows you to configure max session duration and idle limits.
- Isolate sessions by purpose – use separate API keys or session IDs for different agent tasks to prevent interference.
- Monitor browser health – check the live viewer in your remote-browser.dev dashboard to verify that pages render correctly and that the remote browser is not blocked.
- Fallback strategies – if a browser session fails (e.g., timeout or connection error), configure your agent to retry with a new session. The API returns immediate error codes you can handle in your agent logic.
- Combine with AWS Secrets Manager – store API keys and browser endpoints securely and rotate them regularly.
Getting Started
Setting up remote-browser.dev for your Bedrock AgentCore project takes less than ten minutes:
- Sign up at remote-browser.dev to get your API key and trial credits.
- Choose your connection method – Playwright, Puppeteer, or direct CDP (see Playwright CDP docs for details).
- Configure your agent – Pass the browser endpoint and any needed options (proxy, session ID, etc.) into the agent’s execution flow.
- Test and scale – Run a session, check the live viewer in your dashboard, then deploy with confidence.
No browser installation. No overnight debugging of Chrome flags. Just a fast, reliable browser runtime built for AI agents.
Next Steps
If you’re already using Bedrock AgentCore and hitting limitations with local browsers, we encourage you to try remote-browser.dev. Our free tier gives you enough to run a proof-of-concept.
For deeper reading, check out our related posts:
- Remote browsers for AI agents: the missing runtime layer – broader overview of why cloud browsers matter.
- Remote control browser: when code and agents need to drive the web – practical patterns for controlling browsers remotely.
- Pricing – current plans and usage-based costs.
Bedrock AgentCore gives your agents intelligence. remote-browser.dev gives them a place to act on the web. Together, they form a complete platform for autonomous web automation at scale.