Skip to content

Samples

Agent samples built using the Strands Agents SDK.

Install

$pip install strands-agents strands-agents-tools

Install command taken from the project's README or registry entry. Always review code before running it.

Strands Agents Samples

A model-driven approach to building AI agents in just a few lines of code.











Documentation
◆ Samples
◆ Python SDK
◆ TypeScript SDK 
◆ Tools
◆ Agent Builder
◆ MCP Server

Welcome to the Strands Agents Samples repository!

Explore easy-to-use examples to get started with Strands Agents.

The examples in this repository are for demonstration and educational purposes only. They demonstrate concepts and techniques but are not intended for direct use in production. Always apply proper security and testing procedures before using in production environments.

Quick Start

Python

Prerequisites:

  • Python 3.10 or higher
  • pip package manager (not required when using the uv alternative below)
    • Verify with: pip --version or pip3 --version
    • Usually comes bundled with Python 3.4+ installers from python.org
    • If pip is missing, install using one of these methods:
      # Method 1 - Use Python's built-in module
      python -m ensurepip --upgrade
      
      # Method 2 - Download and run the official installer
      curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
      python get-pip.py
      

Step 1: Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate

Step 2: Install

pip install strands-agents strands-agents-tools

Alternative: Use uv

If you prefer uv, install it using the official installation instructions and follow these steps instead of Steps 1 and 2 above.

Create a virtual environment:

uv venv

Activate it on macOS/Linux (bash or zsh):

source .venv/bin/activate

Or on Windows (PowerShell):

.\.venv\Scripts\Activate.ps1

If PowerShell blocks Activate.ps1, see Python's Windows execution policy guidance and follow any applicable organizational policies.

Then install the same packages:

uv pip install strands-agents strands-agents-tools

Your First Agent:

from strands import Agent

agent = Agent()
response = agent("Hello! Tell me a joke.")
print(response)

Explore Python tutorials →

TypeScript

Prerequisites:

  • Node.js 18 or higher
  • npm or yarn package manager

Install:

npm install @strands-agents/sdk

Your First Agent:

import { Agent } from "@strands-agents/sdk";

async function main() {
    const agent = new Agent({
        systemPrompt: "You are a helpful assistant."
    });

    const response = await agent.invoke("Hello! Tell me a joke.");
    console.log(response.toString());
}

main();

Explore TypeScript tutorials →

Model Provider Setup

Follow the instructions here to configure your model provider and model access.

Explore the Repository

Python Samples

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related