# strands-agents

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

- **URL**: https://www.freshcrate.ai/projects/strands-agents
- **Author**: pypi
- **Category**: AI Agents
- **Latest version**: `python/v1.42.0` (2026-06-01)
- **License**: Apache-2.0
- **Source**: https://github.com/strands-agents/sdk-python/issues
- **Homepage**: https://pypi.org/project/strands-agents/
- **Language**: Python
- **GitHub**: 5,677 stars, 794 forks
- **Registry**: pypi (`strands-agents`)
- **Tags**: `pypi`

## Description

<div align="center">
  <div>
    <a href="https://strandsagents.com">
      <img src="https://strandsagents.com/latest/assets/logo-github.svg" alt="Strands Agents" width="55px" height="105px">
    </a>
  </div>

  <h1>
    Strands Agents
  </h1>

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

  <div align="center">
    <a href="https://github.com/strands-agents/sdk-python/graphs/commit-activity"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/strands-agents/sdk-python"/></a>
    <a href="https://github.com/strands-agents/sdk-python/issues"><img alt="GitHub open issues" src="https://img.shields.io/github/issues/strands-agents/sdk-python"/></a>
    <a href="https://github.com/strands-agents/sdk-python/pulls"><img alt="GitHub open pull requests" src="https://img.shields.io/github/issues-pr/strands-agents/sdk-python"/></a>
    <a href="https://github.com/strands-agents/sdk-python/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/strands-agents/sdk-python"/></a>
    <a href="https://pypi.org/project/strands-agents/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/strands-agents"/></a>
    <a href="https://python.org"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/strands-agents"/></a>
  </div>
  
  <p>
    <a href="https://strandsagents.com/">Documentation</a>
    ◆ <a href="https://github.com/strands-agents/samples">Samples</a>
    ◆ <a href="https://github.com/strands-agents/sdk-python">Python SDK</a>
    ◆ <a href="https://github.com/strands-agents/tools">Tools</a>
    ◆ <a href="https://github.com/strands-agents/agent-builder">Agent Builder</a>
    ◆ <a href="https://github.com/strands-agents/mcp-server">MCP Server</a>
  </p>
</div>

Strands Agents is a simple yet powerful SDK that takes a model-driven approach to building and running AI agents. From simple conversational assistants to complex autonomous workflows, from local development to production deployment, Strands Agents scales with your needs.

## Feature Overview

- **Lightweight & Flexible**: Simple agent loop that just works and is fully customizable
- **Model Agnostic**: Support for Amazon Bedrock, Anthropic, Gemini, LiteLLM, Llama, Ollama, OpenAI, Writer, and custom providers
- **Advanced Capabilities**: Multi-agent systems, autonomous agents, and streaming support
- **Built-in MCP**: Native support for Model Context Protocol (MCP) servers, enabling access to thousands of pre-built tools

## Quick Start

```bash
# Install Strands Agents
pip install strands-agents strands-agents-tools
```

```python
from strands import Agent
from strands_tools import calculator
agent = Agent(tools=[calculator])
agent("What is the square root of 1764")
```

> **Note**: For the default Amazon Bedrock model provider, you'll need AWS credentials configured and model access enabled for Claude 4 Sonnet in the us-west-2 region. See the [Quickstart Guide](https://strandsagents.com/) for details on configuring other model providers.

## Installation

Ensure you have Python 3.10+ installed, then:

```bash
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate

# Install Strands and tools
pip install strands-agents strands-agents-tools
```

## Features at a Glance

### Python-Based Tools

Easily build tools using Python decorators:

```python
from strands import Agent, tool

@tool
def word_count(text: str) -> int:
    """Count words in text.

    This docstring is used by the LLM to understand the tool's purpose.
    """
    return len(text.split())

agent = Agent(tools=[word_count])
response = agent("How many words are in this sentence?")
```

**Hot Reloading from Directory:**
Enable automatic tool loading and reloading from the `./tools/` directory:

```python
from strands import Agent

# Agent will watch ./tools/ directory for changes
agent = Agent(load_tools_from_directory=True)
response = agent("Use any tools you find in the tools directory")
```

### MCP Support

Seamlessly integrate Model Context Protocol (MCP) servers:

```python
from strands import Agent
from strands.tools.mcp import MCPClient
from mcp import stdio_client, StdioServerParameters

aws_docs_client = MCPClient(
    lambda: stdio_client(StdioServerParameters(command="uvx", args=["awslabs.aws-documentation-mcp-server@latest"]))
)

with aws_docs_client:
   agent = Agent(tools=aws_docs_client.list_tools_sync())
   response = agent("Tell me about Amazon Bedrock and how to use it with Python")
```

### Multiple Model Providers

Support for various model providers:

```python
from strands import Agent
from strands.models import BedrockModel
from strands.models.ollama import OllamaModel
from strands.models.llamaapi import LlamaAPIModel
from strands.models.gemini import GeminiModel
from strands.models.llamacpp import LlamaCppModel

# Bedrock
bedrock_model = BedrockModel(
  model_id="us.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `python/v1.42.0` | 2026-06-01 | High | ## What's Changed  * fix(tests): fix flaky tests to accept string or number by @lizradway in https://github.com/strands-agents/sdk-python/pull/2319 * chore: prepare directory layout for monorepo convergence by @zastrowm in https://github.com/strands-agents/sdk-python/pull/2317 * feat: add endpoint_url parameter to S3SessionManager by @tealgreen0503 in https://github.com/strands-agents/sdk-python/pull/1934 * feat(gemini): plumb through cache tokens in metadata events by @yatszhash in https:/ |
| `v1.41.0` | 2026-05-21 | High | ## What's Changed * feat(plugins): add MultiAgentPlugin for Swarm and Graph orchestrators by @zastrowm in https://github.com/strands-agents/sdk-python/pull/2280 * feat: bump starlette dependency to 1.x by @pgrayy in https://github.com/strands-agents/sdk-python/pull/2297 * feat(bedrock): add TTL support to auto-injected tool and system/user cache points by @kpx-dev in https://github.com/strands-agents/sdk-python/pull/2232 * fix(tests): add use_native_token_count=True when expected by @lizradw |
| `v1.40.0` | 2026-05-14 | High | ## What's Changed * feat: add proactive context compression to conversation managers by @opieter-aws in https://github.com/strands-agents/sdk-python/pull/2239 * feat: cache AccessDenied error for count tokens by @opieter-aws in https://github.com/strands-agents/sdk-python/pull/2279 * fix(ollama): update return type of latencyMs metric for ollama model provider by @paliwalvimal in https://github.com/strands-agents/sdk-python/pull/2236 * feat: add official Discord link by @Albertozhao in https |
| `v1.39.0` | 2026-05-08 | High | ## What's Changed * feat: enable openai provider use aws profile by @JackYPCOnline in https://github.com/strands-agents/sdk-python/pull/2230 * fix: include root cause in MCPClientInitializationError message by @aidandaly24 in https://github.com/strands-agents/sdk-python/pull/2238 * feat: add context window limit lookup table by @opieter-aws in https://github.com/strands-agents/sdk-python/pull/2249 * fix: fix count tokens for bedrock models by @mehtarac in https://github.com/strands-agents/sd |
| `v1.38.0` | 2026-04-30 | High | ## What's Changed * feat(mcp): preserve CallToolResult.isError flag in MCPToolResult by @Zelys-DFKH in https://github.com/strands-agents/sdk-python/pull/2118 * feat: add `count_token` method to model with naive estimation using tiktoken by @lizradway in https://github.com/strands-agents/sdk-python/pull/2031 * chore(log): added warning for default model awareness and is subject to change by @poshinchen in https://github.com/strands-agents/sdk-python/pull/2164 * fix(litellm): forward ttl field |
| `v1.37.0` | 2026-04-22 | High | ## What's Changed * fix: add fallback trim point for tool-heavy conversations in SlidingWindowConversationManager by @lufecadu in https://github.com/strands-agents/sdk-python/pull/2174 * feat: introduce checkpoint in experimental by @JackYPCOnline in https://github.com/strands-agents/sdk-python/pull/2181 * feat: add context_window_limit to model configs by @opieter-aws in https://github.com/strands-agents/sdk-python/pull/2176 * fix(mcp): skip MCPClient cleanup during interpreter finalization |
| `1.36.0` | 2026-04-21 | Low | Imported from PyPI (1.36.0) |
| `v1.36.0` | 2026-04-17 | High | ## What's Changed * feat(hooks): accept callable hook callbacks in Agent constructor  by @agent-of-mkmeral in https://github.com/strands-agents/sdk-python/pull/1992 * fix: handle missing optional fields in non-streaming citation conversion by @agent-of-mkmeral in https://github.com/strands-agents/sdk-python/pull/2098 * fix(telemetry): add common gen_ai attributes to event loop cycle spans by @giulio-leone in https://github.com/strands-agents/sdk-python/pull/1973 * fix(telemetry): use per-inv |
| `v1.35.0` | 2026-04-08 | Medium | ## What's Changed   ### Features  #### Bedrock Service Tier Support — [PR#1799](https://github.com/strands-agents/sdk-python/pull/1799)  Amazon Bedrock now offers service tiers (Priority, Standard, Flex) that let you control the trade-off between latency and cost on a per-request basis. `BedrockModel` accepts a new `service_tier` configuration field, consistent with how other Bedrock-specific features like guardrails are exposed. When not set, the field is omitted and Bedrock uses its def |
| `v1.34.1` | 2026-04-01 | Medium | ## What's Changed * fix: fix type imcompatible by @JackYPCOnline in https://github.com/strands-agents/sdk-python/pull/2018 * fix: isolate langfuse env vars by @lizradway in https://github.com/strands-agents/sdk-python/pull/2022 * fix: restore explicit span.end() to fix span end_time regression by @zastrowm in https://github.com/strands-agents/sdk-python/pull/2032 * feat(context): track context tokens by @lizradway in https://github.com/strands-agents/sdk-python/pull/2009   **Full Changelo |

## Citation

- HTML: https://www.freshcrate.ai/projects/strands-agents
- Markdown: https://www.freshcrate.ai/projects/strands-agents.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/strands-agents/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
