Skip to content

awslabs/agentcore-samples

Amazon Bedrock AgentCore Samples

Deploy and operate AI agents securely at scale - using any framework and model

GitHub commit activity GitHub open issues GitHub open pull requests License

DocumentationPython SDKAgentCore CLIDiscord

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. See MIGRATION.md for 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

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

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

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.

Connect AgentCore to Your Stack

Deployment Automation

Production-ready templates for provisioning AgentCore resources with CloudFormation, AWS CDK, or Terraform.

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:
    • BedrockAgentCoreFullAccess managed policy
    • AmazonBedrockFullAccess managed 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:

  1. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Export/Activate required AWS Credentials for the notebook to run

  2. 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
  1. 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 KernelChange kernel → select "Python (notebook-venv)" to ensure your virtual environment packages are available.

🔗 Related Links

🤝 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.

Contributors

About

Amazon Bedrock Agentcore accelerates AI agents into production with the scale, reliability, and security, critical to real-world deployment.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors