Skip to content

Examples Overview

The examples directory provides a collection of sample implementations to help you get started with building intelligent agents using Strands Agents. This directory contains two main subdirectories: /examples/python for Python-based agent examples and /examples/cdk for Cloud Development Kit integration examples.

Purpose

These examples demonstrate how to leverage Strands Agents to build intelligent agents for various use cases. From simple file operations to complex multi-agent systems, each example illustrates key concepts, patterns, and best practices in agent development.

By exploring these reference implementations, you'll gain practical insights into Strands Agents' capabilities and learn how to apply them to your own projects. The examples emphasize real-world applications that you can adapt and extend for your specific needs.

Prerequisites

  • Python 3.10 or higher
  • For specific examples, additional requirements may be needed (see individual example READMEs)

Getting Started

  1. Clone the repository containing these examples
  2. Install the required dependencies:
  3. strands-agents
  4. strands-agents-tools
  5. Navigate to the examples directory:
    cd /path/to/examples/
    
  6. Browse the available examples in the /examples/python and /examples/cdk directories
  7. Each example includes its own README or documentation file with specific instructions
  8. Follow the documentation to run the example and understand its implementation

Directory Structure

Python Examples

The /examples/python directory contains various Python-based examples demonstrating different agent capabilities. Each example includes detailed documentation explaining its purpose, implementation details, and instructions for running it.

These examples cover a diverse range of agent capabilities and patterns, showcasing the flexibility and power of Strands Agents. The directory is regularly updated with new examples as additional features and use cases are developed.

Available Python examples:

CDK Examples

The /examples/cdk directory contains examples for using the AWS Cloud Development Kit (CDK) with agents. The CDK is an open-source software development framework for defining cloud infrastructure as code and provisioning it through AWS CloudFormation. These examples demonstrate how to deploy agent-based applications to AWS using infrastructure as code principles.

Each CDK example includes its own documentation with instructions for setup and deployment.

Available CDK examples:

Example Structure

Each example typically follows this structure:

  • Python implementation file(s) (.py)
  • Documentation file (.md) explaining the example's purpose, architecture, and usage
  • Any additional resources needed by the example

To run any specific example, refer to its associated documentation for detailed instructions and requirements.