TOOL WIKI · AGENT SDKS

Strands Agents

Provides an agent-building toolkit for models, tools, and application workflows.

Download example files Code + setup + checks in a ZIP
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

WHAT IT ISAgent toolkit
WHERE IT FITSAgent SDKs
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
taskinvokedecisiontool callresultstatemeasureApplicationTask + identityStrands AgentsAgent toolkitModel providerConfigured API modelTool serviceAuthorization + executionState storageRun and thread progressEvaluationOutcome + evidence
  1. Authenticate the request and define the goal before calling the framework.

  2. Building a tool-using agent with an SDK-managed loop. Test model and tool compatibility with the operations your task needs.

  3. The application supplies provider credentials, model selection, and budgets.

  4. Validate each operation and return authoritative observations.

  5. Choose the checkpoint or session store and its retention policy deliberately.

    Result or stopping point
  6. Check completion, cost, latency, and tool behavior against fixtures.

    Result or stopping point
Strands Agents

Building a tool-using agent with an SDK-managed loop. Test model and tool compatibility with the operations your task needs.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

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.
Shell
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

Python · 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

Shell
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

Workflow, single agent, or multiple agents?Build an explicit agent loop with LangGraph

Explore the same layer

OpenAI Agents SDKClaude Agent SDKGoogle ADKLangGraph

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.