Strands Agents SDK

1.35.0 · active · verified Fri Apr 10

Strands Agents is a Python SDK for building and running AI agents with a model-driven approach. It simplifies the development of conversational assistants, autonomous agents, and multi-agent workflows by handling orchestration, tool invocation, and interaction with various large language models. The library is actively maintained, frequently updated, and currently at version 1.35.0.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates creating a basic Strands agent with a pre-built tool (`calculator`) from `strands-agents-tools` and querying it. Ensure AWS credentials are configured as Strands uses Amazon Bedrock as the default model provider.

import os
from strands import Agent
from strands_tools import calculator

# Configure AWS credentials for Bedrock (if not already set via environment variables)
# For example, by setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
# Or ensure your AWS CLI is configured with a default region and profile

agent = Agent(tools=[calculator])

async def run_agent():
    print("Agent initialized. Asking a question...")
    response = await agent("What is the square root of 1764?")
    print(f"Agent response: {response.content}")

if __name__ == "__main__":
    import asyncio
    asyncio.run(run_agent())

view raw JSON →