Strands Agents Builder

raw JSON →
0.1.10 verified Fri May 01 auth: no python

An example Strands agent demonstrating streaming, tool use, and interactivity from your terminal. This agent builder helps you build your own agents and tools. Current version: 0.1.10, release cadence: early development, updates as needed.

pip install strands-agents-builder
error ModuleNotFoundError: No module named 'strands-agents-builder'
cause Using hyphens in import statement instead of underscores.
fix
Use import strands_agents_builder (underscores) instead of import strands-agents-builder.
error AttributeError: module 'strands_agents_builder' has no attribute 'StrandsAgent'
cause The class might be renamed or not imported correctly; check documentation for exact class name.
fix
Verify that 'StrandsAgent' is the correct class name. Consult the library's source or issues.
gotcha Package name uses hyphens (strands-agents-builder) but import uses underscores (strands_agents_builder). Common pip install vs import mismatch.
fix Use `pip install strands-agents-builder` and `import strands_agents_builder`.
gotcha Version 0.1.x is in early development; API may change without notice. Pin your version in requirements.
fix Pin to exact version: `strands-agents-builder==0.1.10`

Basic usage: create an agent and run a query. Requires API key and Python 3.10+.

from strands_agents_builder import StrandsAgent

# Initialize with API key from environment or string
api_key = os.environ.get('STRANDS_API_KEY', 'your-api-key')
agent = StrandsAgent(api_key=api_key, model="gpt-4")

response = agent.run("What is the weather today?")
print(response)