Zero infrastructure — No servers to provision, no containers to manage, no scaling to configure.
Session isolation — Each agent session runs in its own VM. No shared state, no noisy neighbors.
Long-lived sessions — Sessions persist across requests. Your agent maintains context without external storage.
Managed tools — Secure code execution and browser automation, ready to use.
Credential management — Centralized API keys and OAuth tokens, injected at runtime.
Framework Compatibility
The SDK is designed to work with any agent framework. Here’s how:
Runtime — Deploy agents built with any framework. The BedrockAgentCoreApp accepts any request handler — plug in Strands Agents, Vercel AI SDK, LangChain, or your own custom logic.
Tools — Code Interpreter and Browser tools include built-in integrations for Strands Agents and Vercel AI SDK, so tools can be passed directly to those frameworks’ agents. For other frameworks, use the core clients (CodeInterpreter, PlaywrightBrowser) directly and wire them into your own tool definitions.
Identity — Credential wrappers (withAccessToken, withApiKey) work with any async function, regardless of framework.
Quick Start
npm install bedrock-agentcore @strands-agents/sdk
import { BedrockAgentCoreApp } from 'bedrock-agentcore/runtime'
import { Agent, BedrockModel } from '@strands-agents/sdk'
import { z } from 'zod'
const agent = new Agent({
model: new BedrockModel({ modelId: 'global.amazon.nova-2-lite-v1:0' }),
})
const app = new BedrockAgentCoreApp({
invocationHandler: {
requestSchema: z.object({ prompt: z.string() }),
process: async function* (request) {
for await (const event of agent.stream(request.prompt)) {
if (event.type === 'modelContentBlockDeltaEvent' && event.delta?.type === 'textDelta') {
yield { event: 'message', data: { text: event.delta.text } }
}
}
},
},
})
app.run()
BedrockAgentCoreApp creates an AgentCore Runtime-compliant server—handling request parsing, streaming responses, and session management for seamless deployment.
Tools
Give your agent secure code execution with three lines:
import { CodeInterpreterTools } from 'bedrock-agentcore/experimental/code-interpreter/strands'
import { Agent, BedrockModel } from '@strands-agents/sdk'
const codeInterpreter = new CodeInterpreterTools({ region: 'us-east-1' })
const agent = new Agent({
model: new BedrockModel({ modelId: 'global.amazon.nova-2-lite-v1:0' }),
tools: codeInterpreter.tools,
})
// Agent can now execute code in a secure sandboxed environment
Bedrock AgentCore SDK for TypeScript
Deploy AI agents to AWS with VM-level isolation and zero infrastructure
Documentation | Samples | Python SDK
Why AgentCore?
Framework Compatibility
The SDK is designed to work with any agent framework. Here’s how:
BedrockAgentCoreAppaccepts any request handler — plug in Strands Agents, Vercel AI SDK, LangChain, or your own custom logic.CodeInterpreter,PlaywrightBrowser) directly and wire them into your own tool definitions.withAccessToken,withApiKey) work with any async function, regardless of framework.Quick Start
BedrockAgentCoreAppcreates an AgentCore Runtime-compliant server—handling request parsing, streaming responses, and session management for seamless deployment.Tools
Give your agent secure code execution with three lines:
Features
Installation
Prerequisites: Node.js 20+, AWS credentials, AgentCore access
Deployment
Resources
License
Apache 2.0 — see LICENSE
Contributing · Security