TOOL WIKI · AGENT SDKS
Strands Agents
Provides an agent-building toolkit for models, tools, and application workflows.
Jump to a section 10 sections
EXAMPLE USE CASE
Connect a provider-backed tool-use support agent
A developer needs a small, observable agent or retrieval step before connecting real business services.
- Input
- Anthropic model configuration and one order_status function.
- Expected output
- A packed status obtained through the tool.
- Success check: The answer uses the fixture result for A104: packed. Ask about A999 to verify the missing-record path.
- Try a failure: Unknown orders must preserve not_found and must not acquire a delivery date.
Example scope: Actual Strands agent using Anthropic and a local order fixture.
Official reference · Strands Agents
Authenticate the request and define the goal before calling the framework.
Building a tool-using agent with an SDK-managed loop. Test model and tool compatibility with the operations your task needs.
invokeTo 03 · Model providertool callTo 04 · Tool servicemeasureTo 06 · EvaluationThe application supplies provider credentials, model selection, and budgets.
decisionBack to 02 · Strands AgentsValidate each operation and return authoritative observations.
Choose the checkpoint or session store and its retention policy deliberately.
Result or stopping pointCheck completion, cost, latency, and tool behavior against fixtures.
Result or stopping point
Building a tool-using agent with an SDK-managed loop. Test model and tool compatibility with the operations your task needs.
When to consider it
- Building a tool-using agent with an SDK-managed loop.
A design decision to make
- Test model and tool compatibility with the operations your task needs.
Prerequisites and setup
- Python 3.11+ in an empty directory. A compatible model and provider credentials are required.
- Running the model-backed example can incur API charges; this website displays it without calling a provider.
python3 -m venv .venv
source .venv/bin/activate
pip install strands-agents anthropic
export ANTHROPIC_API_KEY="YOUR_API_KEY"
export ANTHROPIC_MODEL="YOUR_ENABLED_MODEL"Try a small integration
example.py
import os
from strands import Agent, tool
from strands.models.anthropic import AnthropicModel
@tool
def order_status(order_id: str) -> str:
"""Read one order status from the demo fixture."""
return {"A104":"packed"}.get(order_id,"not_found")
model = AnthropicModel(client_args={"api_key":os.environ["ANTHROPIC_API_KEY"]},
model_id=os.environ["ANTHROPIC_MODEL"])
agent = Agent(model=model, tools=[order_status],
system_prompt="Read the status with the tool; report no unsupported dates.")
print(agent("Check order A104."))Run and check the result
python example.py- The answer uses the fixture result for A104: packed. Ask about A999 to verify the missing-record path.
- Inspect the tool invocation or trace; a correct-looking sentence alone does not prove the tool ran.
Common failures
- 401 or model-not-found: verify the provider key, project and configured model identifier.
- A repeated tool call needs a bounded loop and a clear not-found result; do not raise limits blindly.
Production decisions
- Bind tool execution to the authenticated user and resource permissions. Keep keys in server environment variables.
- Add deadlines, a turn budget, redacted traces, regression fixtures and explicit handling for refused or incomplete runs.
- Model-provider choice determines credentials and request configuration. The default Bedrock path uses AWS identity rather than an Anthropic API key.
Keep exploring
Explore the same layer
Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.