Registry / llm-agents / strands-agents

strands-agents

JSON →
library1.54.0pypypi✓ verified 25d ago

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.

pip install strands-agents strands-agents-tools
INSTALL
IMPORT
SIG · STRANDS-AGENTS
S
strands-agents
llm-agentspythonv1.54.0
Install
16.5s avg
Import
2557ms
Disk
249MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.54.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 18.45s
py 3.11
✓ —
✓ 16.75s
py 3.12
✓ —
✓ 15.55s
py 3.13
✓ —
✓ 15.15s
py 3.9
✕ build_error
✕ build_error
249MB installed
● package 249MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Agent
from strands import Agent
tool
from strands import tool
Used as a decorator to define custom tools.
calculator
from strands_tools import calculator
Example tool from the 'strands-agents-tools' package.
BedrockModel
from strands.models.bedrock import BedrockModel
For explicit configuration of Amazon Bedrock models.

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())
Debug
Known issues
breakingA critical supply chain attack impacted 'litellm' (a dependency) versions 1.82.7 and 1.82.8, which contained malicious code. Strands Agents v1.33.0 (and later) hard-pinned `litellm<=1.82.6` to mitigate this. Users on older Strands versions or with unpinned `litellm` dependencies should immediately upgrade `strands-agents` and audit their environments.
fix
Upgrade `strands-agents` to `1.33.0` or higher. If affected, follow `litellm`'s security advice for credential rotation and system audit.
affects: <1.33.0 (if `litellm` was not explicitly pinned)
gotchaStrands Agents defaults to using Amazon Bedrock for models. This requires AWS credentials (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`) to be configured in your environment or AWS CLI, and model access to be enabled in your AWS account. Without proper configuration, agents may fail to initialize or execute.
fix
Ensure AWS credentials are correctly configured and the necessary Bedrock models are enabled in your AWS account. For non-Bedrock models, explicitly configure the desired `model` provider during `Agent` initialization.
affects: All versions
gotchaThe `pyaudio` dependency is optional and only included with the `bidi-io` extra. If you intend to use bidirectional streaming features requiring audio input/output, you must install `strands-agents` with this extra (e.g., `pip install strands-agents[bidi,bidi-io]`).
fix
Install the `bidi-io` extra: `pip install strands-agents[bidi,bidi-io]`.
affects: All versions
gotchaWhen using `BedrockModel`, specifying an unsupported `service_tier` (e.g., 'flex', 'priority') for a given model or region will result in a `ValidationException`. Not all models or AWS regions support all service tiers.
fix
Consult AWS Bedrock documentation for supported `service_tier` values per model and region, or omit the `service_tier` parameter to use the default behavior.
affects: >=1.35.0
gotchaWhen granting agents access to tools that perform sensitive actions (e.g., SQL execution, file system operations, API calls), implement robust input validation, output sanitization, and least-privilege IAM policies. Relying solely on system prompts for security is insufficient against prompt injection or unforeseen agent behavior in production environments, potentially leading to data leakage or destructive actions.
fix
Implement custom middleware or 'steering hooks' to inspect and validate tool inputs/outputs, use fine-grained IAM roles for tool execution, and thoroughly test agents in controlled environments.
affects: All versions
Upgrade
Version history
1.54.0latest on PyPI · released Aug 27, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or higher.
litellmrequiredUsed for unified access to various LLM providers; critical security patch in v1.33.0.
pyaudiooptionalRequired for 'bidi-io' extra for audio input/output functionality.
boto3requiredRequired for interacting with AWS services, especially Amazon Bedrock (default model provider).
Agent activity
28 hits · last 30 days
node
22
Bingbot
1
OpenAI (training)
1
Resources
strands-agents — pip install strands-agents · libregistry