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:
- ✅ Keep your agent logic - Works with Strands, LangGraph, CrewAI, Autogen, custom frameworks
- ✅ Zero infrastructure management - No servers, containers, or scaling concerns
- ✅ Enterprise-grade platform - Built-in auth, memory, observability, security
- ✅ Production-ready deployment - Reliable, scalable, compliant hosting
- 🚀 Runtime - Secure and session isolated compute: Runtime Quick Start
- 🧠 Memory - Persistent knowledge across sessions: Memory Quick Start
- 🔗 Gateway - Transform APIs into MCP tools: Gateway Quick Start
- 💻 Code Interpreter - Secure sandboxed execution: Code Interpreter Quick Start
- 🌐 Browser - Cloud-based web automation: Browser Quick Start
- 📊 Observability - OpenTelemetry tracing: Observability Quick Start
- 🔐 Identity - AWS & third-party auth: Identity Quick Start
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, executeCommandAutomate 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, forwardIntegrate 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 playwrightPrerequisites:
- Node.js >= 20.0.0
- AWS credentials with Bedrock AgentCore access
- Access to any large language model like models available in AWS Bedrock
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.tsOr try the Next.js app with streaming UI:
cd examples/deep-research-ui && npm install && npm run devSee AWS setup guide for getting started with agentcore.
Production: AWS CDK.
- License: Apache 2.0 - see LICENSE
- Contributing: See CONTRIBUTING.md
- Security: See SECURITY.md