An SDK for using Bedrock AgentCore
Project description
Bedrock AgentCore SDK
Deploy your local AI agent to Bedrock AgentCore with zero infrastructure
Documentation ◆ Samples ◆ Discord ◆ Boto3 Python SDK ◆ Runtime Python SDK ◆ Starter Toolkit
Overview
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.
🚀 From Local Development to Bedrock AgentCore
from bedrock_agentcore import BedrockAgentCoreApp
app = BedrockAgentCoreApp()
from strands import Agent # or bring your agent.
@app.entrypoint
async def handler(request):
prompt = request.get("prompt")
agent = Agent()
async for event in agent.stream_async(prompt):
yield (event)
app.run()
What you get with Bedrock AgentCore:
- ✅ Keep your agent logic - Works with Strands, LangGraph, CrewAI, Autogen, or 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
Amazon Bedrock AgentCore services
- 🚀 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
AG-UI Protocol Support
Deploy agents using the AG-UI protocol with zero boilerplate. A single entrypoint handler is served over both SSE (POST /invocations) and WebSocket (/ws).
from bedrock_agentcore.runtime import serve_ag_ui
# Framework agent with a .run() method — one line
serve_ag_ui(agui_agent)
Or write a custom agent with the decorator form:
from bedrock_agentcore.runtime import AGUIApp
from ag_ui.core import RunAgentInput, RunStartedEvent, RunFinishedEvent
app = AGUIApp()
@app.entrypoint
async def my_agent(input_data: RunAgentInput):
yield RunStartedEvent(thread_id=input_data.thread_id, run_id=input_data.run_id)
# ... your agent logic, yield AG-UI events ...
yield RunFinishedEvent(thread_id=input_data.thread_id, run_id=input_data.run_id)
app.run()
Install with: pip install "bedrock-agentcore[ag-ui]"
See the AG-UI protocol contract for full details.
🏗️ Deployment
Quick Start: Use the Bedrock AgentCore Starter Toolkit for rapid prototyping.
Production: AWS CDK.
A2A Protocol Support
Serve your agent using the A2A (Agent-to-Agent) protocol on Bedrock AgentCore Runtime. Works with any framework that provides an a2a-sdk AgentExecutor (Strands, LangGraph, Google ADK, or custom).
pip install "bedrock-agentcore[a2a]"
from strands import Agent
from strands.a2a import StrandsA2AExecutor
from bedrock_agentcore.runtime import serve_a2a
agent = Agent(model="us.anthropic.claude-sonnet-4-20250514", system_prompt="You are a helpful assistant.")
serve_a2a(StrandsA2AExecutor(agent))
See A2A Protocol Examples for LangGraph, Google ADK, and advanced usage.
📝 License & Contributing
- License: Apache 2.0 - see LICENSE.txt
- Contributing: See CONTRIBUTING.md
- Security: Report vulnerabilities via SECURITY.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bedrock_agentcore-1.7.0.tar.gz.
File metadata
- Download URL: bedrock_agentcore-1.7.0.tar.gz
- Upload date:
- Size: 540.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf632892f6bd055ce047eb91fe4d72f86569234faf3eb5cd1b2b614261a77d7f
|
|
| MD5 |
5ab3ed41ebad43f23f196e1d6a79df43
|
|
| BLAKE2b-256 |
016569a66d812c5f86b902234fe91146004efcea907444a60f024f9afe13d150
|
Provenance
The following attestation bundles were made for bedrock_agentcore-1.7.0.tar.gz:
Publisher:
release-publish.yml on aws/bedrock-agentcore-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bedrock_agentcore-1.7.0.tar.gz -
Subject digest:
cf632892f6bd055ce047eb91fe4d72f86569234faf3eb5cd1b2b614261a77d7f - Sigstore transparency entry: 1397751178
- Sigstore integration time:
-
Permalink:
aws/bedrock-agentcore-sdk-python@17e748fcda851e49c140837afa0323fe03cedda1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@17e748fcda851e49c140837afa0323fe03cedda1 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file bedrock_agentcore-1.7.0-py3-none-any.whl.
File metadata
- Download URL: bedrock_agentcore-1.7.0-py3-none-any.whl
- Upload date:
- Size: 179.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee49695e613973baf01b4be400d3bc4b20ddedf3638765fb3bc6931a87fa0cd9
|
|
| MD5 |
c32a9ccbb9cb1a319d7aaac2e70b2eeb
|
|
| BLAKE2b-256 |
ba9d5f590afd5351e206d9a02f96777a69d1fc3edecfaa39bbba310248f21ea9
|
Provenance
The following attestation bundles were made for bedrock_agentcore-1.7.0-py3-none-any.whl:
Publisher:
release-publish.yml on aws/bedrock-agentcore-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bedrock_agentcore-1.7.0-py3-none-any.whl -
Subject digest:
ee49695e613973baf01b4be400d3bc4b20ddedf3638765fb3bc6931a87fa0cd9 - Sigstore transparency entry: 1397751235
- Sigstore integration time:
-
Permalink:
aws/bedrock-agentcore-sdk-python@17e748fcda851e49c140837afa0323fe03cedda1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@17e748fcda851e49c140837afa0323fe03cedda1 -
Trigger Event:
pull_request
-
Statement type: