* Delete .bedrock_agentcore.yaml file during clean up to allow for consequtive notebook executions * Remove -rf from !rm command
Amazon Bedrock AgentCore Samples
Deploy and operate AI agents securely at scale - using any framework and model
Welcome to the Amazon Bedrock AgentCore Samples repository!
Amazon Bedrock AgentCore is both framework-agnostic and model-agnostic, giving you the flexibility to deploy and operate advanced AI agents securely and at scale. Whether you’re building with Strands Agents, CrewAI, LangGraph, LlamaIndex, or any other framework—and running them on any Large Language Model (LLM)—Amazon Bedrock AgentCore provides the infrastructure to support them. By eliminating the undifferentiated heavy lifting of building and managing specialized agent infrastructure, Amazon Bedrock AgentCore lets you bring your preferred framework and model, and deploy without rewriting code.
This collection provides examples and tutorials to help you understand, implement, and integrate Amazon Bedrock AgentCore capabilities into your applications.
Migrating from the Starter Toolkit? This repository is transitioning from the Bedrock AgentCore Starter Toolkit to the new AgentCore CLI. Samples that still depend on the Starter Toolkit are in
legacy/and will be updated over the coming weeks. SeeMIGRATION.mdfor the full old-path to new-path mapping.
🎥 Video
Build your first production-ready AI agent with Amazon Bedrock AgentCore. We’ll take you beyond prototyping and show you how to productionize your first agentic AI application using Amazon Bedrock AgentCore.
📁 Repository Structure
🚀 getting-started/
Your First Agent in Minutes
Get up and running with the AgentCore CLI — the fastest way to create, develop, and deploy agents on Amazon Bedrock AgentCore.
python/— Python agent samples (Code Interpreter, Gateway, Memory, Identity, and more)typescript/— TypeScript agent samples
🧩 features/
AgentCore Capabilities Deep Dives
Focused examples for individual AgentCore capabilities:
- Runtime — Secure, serverless runtime for deploying agents and tools at scale
- Gateway — Convert APIs, Lambda functions, and services into MCP-compatible tools
- Identity — Agent identity and access management across AWS and third-party apps
- Memory — Managed memory infrastructure for personalized agent experiences
- Tools — Built-in Code Interpreter and Browser Tool
- Observability — Trace, debug, and monitor agent performance with OpenTelemetry
- Evaluation — Built-in and custom evaluators for on-demand and online evaluation
- Policy — Fine-grained access control with Cedar policies
💡 end-to-end/
Complete Applications
Production-ready use cases that combine multiple AgentCore capabilities to solve real business problems. Each includes deployment instructions, architecture diagrams, and testing guides.
🔌 integrations/
Connect AgentCore to Your Stack
identity-providers/— Okta, Entra, Cognito, and other IdP integrationsobservability/— Grafana, Datadog, Dynatrace, and other monitoring platformsdata-platforms/— Data lake, warehouse, and analytics integrationsux-examples/— Streamlit, AG-UI, and other frontend patterns
🏗️ infrastructure-as-code/
Deployment Automation
Production-ready templates for provisioning AgentCore resources with CloudFormation, AWS CDK, or Terraform.
🚀 blueprints/
Full-Stack Reference Applications
Complete, deployment-ready agentic applications with integrated services, authentication, and business logic you can customize for your use case.
📦 legacy/
Starter Toolkit Samples (Pending Migration)
Samples that still depend on the Bedrock AgentCore Starter Toolkit CLI. These will be migrated to the AgentCore CLI as SDK support rolls out. See MIGRATION.md for status.
Quick Start with the AgentCore CLI
The AgentCore CLI is the recommended way to create, develop, and deploy agents on Amazon Bedrock AgentCore. It replaces the previous Starter Toolkit with a streamlined project-based workflow.
Step 1: Prerequisites
- An AWS account with credentials configured (
aws configure) - Node.js 20.x or later
uv(for Python agents) or Node.js (for TypeScript agents)- Model Access: Anthropic Claude 4.0 enabled in Amazon Bedrock console
- AWS Permissions:
BedrockAgentCoreFullAccessmanaged policyAmazonBedrockFullAccessmanaged policy
Step 2: Install the CLI and Create a Project
# Install the AgentCore CLI
npm install -g @aws/agentcore
# Create a new project (interactive wizard)
agentcore create
cd my-agent
The create wizard scaffolds a ready-to-run project with your choice of framework (Strands Agents, LangGraph, Google ADK, OpenAI, and more) and language (Python or TypeScript).
Step 3: Develop Locally
# Start the local development server
agentcore dev
Your agent is now running locally. The CLI watches for file changes and provides a local invocation endpoint for testing.
Step 4: Deploy to AWS
# Deploy to Amazon Bedrock AgentCore
agentcore deploy
# Test your deployed agent
agentcore invoke
Add More Capabilities
agentcore add memory # Add managed memory
agentcore add identity # Add identity provider
agentcore add evaluator # Add LLM-as-a-Judge evaluation
agentcore add online-eval # Enable continuous evaluation
agentcore deploy # Sync changes to AWS
Congratulations! Your agent is now running on Amazon Bedrock AgentCore Runtime.
For the full CLI reference, see the AgentCore CLI documentation.
Running a Notebook
Some samples in this repository are provided as Jupyter notebooks:
- Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
- Install dependencies
pip install -r requirements.txt
-
Export/Activate required AWS Credentials for the notebook to run
-
Register your virtual environment as a kernel for Jupyter notebook to use
python -m ipykernel install --user --name=notebook-venv --display-name="Python (notebook-venv)"
You can list your kernels using:
jupyter kernelspec list
- Run the notebook and ensure the correct kernel is selected
jupyter notebook path/to/your/notebook.ipynb
Important: After opening the notebook in Jupyter, make sure to select the correct kernel by going to Kernel → Change kernel → select "Python (notebook-venv)" to ensure your virtual environment packages are available.
🔗 Related Links
- AgentCore CLI
- Amazon Bedrock AgentCore Documentation
- Getting started with Amazon Bedrock AgentCore - Workshop
- Diving Deep into Bedrock AgentCore - Workshop
- Amazon Bedrock AgentCore pricing
- Amazon Bedrock AgentCore FAQs
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details on:
- Adding new samples
- Improving existing examples
- Reporting issues
- Suggesting enhancements
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.