bedrock-agentcore
Fast and secure cloud-based browser runtime for web automation. Fill forms, navigate websites, and extract information in managed environment.
by Amazon Web Services
Module not found "https://esm.sh/bedrock-agentcore@0.1.1".
Last checked: 12/29/2025, 3:52:32 AM
Test bedrock-agentcore (BrowserTools) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install bedrock-agentcorepnpm add bedrock-agentcoreimport { BrowserTools } from 'bedrock-agentcore';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { BrowserTools } from 'bedrock-agentcore';
const result = await generateText({
model: openai('gpt-4o'),
tools: { BrowserTools },
prompt: 'Your prompt here...',
});
console.log(result.text);How AI agents can use this tool
Use for browser automation and web interaction tasks
Available configuration options
No schema available for this tool.
Documentation ◆ Samples ◆ Discord ◆ AWS Boto3 SDK ◆ Python SDK ◆ TypeScript SDK ◆ Starter Toolkit
Amazon Bedrock AgentCore enables you to deploy and operate highly effective agents securely, at scale using any framework and model. With Amazon Bedrock AgentCore, developers can accelerate AI agents into production with the scale, reliability, and security, critical to real-world deployment. AgentCore provides tools and capabilities to make agents more effective and capable, purpose-built infrastructure to securely scale agents, and controls to operate trustworthy agents. Amazon Bedrock AgentCore services are composable and work with popular open-source frameworks and any model, so you don’t have to choose between open-source flexibility and enterprise-grade security and reliability.
What you get with Bedrock AgentCore:
This SDK currently provides Code Interpreter and Browser tools. Additional service integrations are on the roadmap.
Execute Python, JavaScript, or TypeScript in a secure AWS-managed sandbox:
// Core client (framework-agnostic) import { CodeInterpreterClient } from 'bedrock-agentcore/code-interpreter' // Methods: startSession, stopSession, executeCode, writeFiles, readFiles, // listFiles, deleteFiles, executeCommand
Automate web browsing with cloud-based browser automation (compatible with Playwright, Puppeteer, and other browser automation SDKs):
// Playwright client (framework-agnostic) import { PlaywrightBrowser } from 'bedrock-agentcore/browser/playwright' // Methods: startSession, stopSession, navigate, click, fill, type, getText, // getHtml, screenshot, evaluate, waitForSelector, back, forward
Integrate Code Interpreter and Browser capabilities into your AI agents using the Vercel AI SDK.
# Install the SDK npm install bedrock-agentcore # Install AI SDK v6 (required), use any model provider npm install ai@beta @ai-sdk/amazon-bedrock@beta # Install Playwright (optional, only for Browser tools) npm install playwright
Prerequisites:
import { bedrock } from '@ai-sdk/amazon-bedrock' import { ToolLoopAgent } from 'ai' import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai' import { BrowserTools } from 'bedrock-agentcore/browser/vercel-ai' const codeInterpreter = new CodeInterpreterTools() const browser = new BrowserTools() const agent = new ToolLoopAgent({ model: bedrock('global.anthropic.claude-sonnet-4-20250514-v1:0'), tools: { ...codeInterpreter.tools, ...browser.tools, }, }) // Invoke the agent with any prompt const result = await agent.run({ prompt: 'Visit news.ycombinator.com, scrape the top 5 stories, and analyze sentiment', }) console.log(result.text)
Note: If deploying to Vercel, use Vercel OIDC for secure AWS credentials.
Run the standalone example:
npx tsx examples/agent-with-code-interpreter.ts
Or try the Next.js app with streaming UI:
cd examples/deep-research-ui && npm install && npm run dev
See AWS setup guide for getting started with agentcore.
Production: AWS CDK.
Downloads/month
651
GitHub Stars
0
Quality Score