An example agent demonstrating streaming, tool use, and interactivity from your terminal. This agent builder can help you to build your own agents and tools.
Documentation ◆ Samples ◆ Python SDK ◆ Tools ◆ Agent Builder ◆ MCP Server
An interactive Strands agent toolkit designed to help you build, test, and extend your own custom AI agents and tools. With the Strands Agent Builder, you can create specialized agents, develop custom tools, and compose complex AI workflows—all from your terminal.
# Install
pipx install strands-agents-builder
# Run interactive mode for agent development
strands
# Build a custom tool and use it immediately
strands "Create a tool named sentiment_analyzer that analyzes text sentiment and test it with some examples"
# Pipe content to build an agent based on specifications
cat agent-spec.txt | strands "Build a specialized agent based on these specifications"
# Use with knowledge base to extend existing tools
strands --kb YOUR_KB_ID "Load my previous calculator tool and enhance it with scientific functions"
Strands comes with a comprehensive set of built-in tools:
Strands Agent Builder leverages Amazon Bedrock Knowledge Bases to store and retrieve custom tools, agent configurations, and development history.
# Load and extend tools from your knowledge base
strands --kb YOUR_KB_ID "Load my data_visualizer tool and add 3D plotting capabilities"
# Or set a default knowledge base via environment variable
export STRANDS_KNOWLEDGE_BASE_ID="YOUR_KB_ID"
strands "Find my most recent agent configuration and make it more efficient"
Features:
Strands comes with optimized, maxed-out configuration settings for the Bedrock model provider:
{
"model_id": "us.anthropic.claude-sonnet-4-20250514-v1:0",
"max_tokens": 32767,
"boto_client_config": {
"read_timeout": 900,
"connect_timeout": 900,
"retries": {
"max_attempts": 3,
"mode": "adaptive"
}
},
"additional_request_fields": {
"anthropic_beta": ["interleaved-thinking-2025-05-14"],
"thinking": {
"type": "enabled",
"budget_tokens": 2048
}
}
}
These settings provide:
You can customize these values using environment variables:
# Maximum tokens for responses
export STRANDS_MAX_TOKENS=32000
# Budget for agent thinking/reasoning
export STRANDS_BUDGET_TOKENS=1024
You can configure strands to use a different model provider with specific settings by passing in the following arguments:
strands --model-provider <NAME> --model-config <JSON|FILE>
As an example, if you wanted to use the packaged Ollama provider with a specific model id, you would run:
strands --model-provider ollama --model-config '{"model_id": <ID>}'
Strands Agent Builder is packaged with bedrock
and ollama
.
If you have implemented a custom model provider (instructions) and would like to use it with strands, create a python module under the directory "$CWD/.models" and expose an instance
function that returns an instance of your provider. As an example, assume you have:
$ cat ./.models/custom_model.py
from mymodels import CustomModel
def instance(**config):
return CustomModel(**config)
You can then use it with strands by running:
$ strands --model-provider custom_model --model-config <JSON|FILE>
# Via environment variable
export STRANDS_SYSTEM_PROMPT="You are a Python expert."
# Or local file
echo "You are a security expert." > .prompt
Strands Agent Builder also provides customization through environment variables:
Environment Variable | Description | Default |
---|---|---|
STRANDS_MODEL_ID | Claude model ID to use for inference | us.anthropic.claude-sonnet-4-20250514-v1:0 |
STRANDS_MAX_TOKENS | Maximum tokens for agent responses | 32768 |
STRANDS_BUDGET_TOKENS | Token budget for agent thinking/reasoning | 2048 |
STRANDS_THINKING_TYPE | Type of thinking capability | enabled |
STRANDS_ANTHROPIC_BETA | Anthropic beta features (comma-separated) | interleaved-thinking-2025-05-14 |
STRANDS_CACHE_TOOLS | Tool caching strategy | default |
STRANDS_CACHE_PROMPT | Prompt caching strategy | default |
STRANDS_SYSTEM_PROMPT | Custom system prompt (overrides .prompt file) | None |
STRANDS_KNOWLEDGE_BASE_ID | Default Knowledge Base ID | None |
STRANDS_TOOL_CONSOLE_MODE | Enable rich console UI | enabled |
BYPASS_TOOL_CONSENT | Skip tool confirmation prompts | false |
Type exit
, quit
, or press Ctrl+C
/Ctrl+D
We welcome contributions! See our Contributing Guide for details on:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
See CONTRIBUTING for more information.
Strands Agents is currently in public preview. During this period:
{ "mcpServers": { "agent-builder": { "command": "strands", "args": [] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories