The world of AI agents is exploding, and while frameworks like LangChain and AutoGen have been dominating the conversation, there’s a new player in town that’s worth your attention: Strands Agents.
Strands Agents is an open-source framework developed by AWS, designed to help developers build production-ready, multi-agent AI systems with minimal code. Unlike some heavier frameworks, Strands focuses on providing simple primitives for complex orchestration patterns like handoffs, swarms, and graph workflows.
In this post, we’ll walk through what makes Strands special and how to get your first agent running in minutes.
Why Strands Agents?
While you can build agents with just raw LLM calls, things get messy quickly when you need multiple agents to coordinate. Strands solves this by offering:
- Model-Driven Orchestration: Agents decide how to interact based on the model’s reasoning capabilities.
- Model Agnostic: While it integrates seamlessly with Amazon Bedrock, it supports other providers like OpenAI and Anthropic.
- Type Safety: If you are using the TypeScript SDK, you get first-class type support. The Python SDK is equally robust.
Installation
Getting started is straightforward. We’ll use the Python SDK for this guide.
First, ensure you have Python 3.10+ installed. Then, install the core package and standard tools:
pip install strands-agents strands-agents-tools
Your First Agent: Hello World
Let’s build a simple agent that can perform a basic task. We’ll define a tool and give it to an agent.
Create a file named agent.py:
from strands import Agent, tool
# 1. Define a tool
@tool
def word_count(text: str) -> int:
"""Count words in text. Useful for checking length constraints."""
return len(text.split())
# 2. Initialize the Agent
# Note: Ensure you have your AWS credentials or other provider API keys configured.
# By default, Strands looks for Amazon Bedrock configuration.
agent = Agent(
name="Editor",
instructions="You are a helpful editor. Use tools to analyze text.",
tools=[word_count]
)
# 3. Run the agent
response = agent("How many words are in this sentence?")
print(response)
Running the Code
Before running the script, make sure you have your model provider configured. If you are using AWS Bedrock (the default), you’ll need standard AWS credentials set up in your environment.
python agent.py
The agent will analyze your prompt, realize it needs to count words, call the word_count tool, and return the result naturally.
Next Steps
This is just the tip of the iceberg. Strands Agents really shines when you have multiple agents interacting—for example, a “Researcher” agent handing off findings to a “Writer” agent.
If you are looking to build scalable AI systems on AWS, Strands is definitely a framework to keep on your radar.
Check out the official documentation for more advanced patterns and examples.