{"id":2791,"library":"strands-agents","title":"Strands Agents SDK","description":"Strands Agents is a Python SDK for building and running AI agents with a model-driven approach. It simplifies the development of conversational assistants, autonomous agents, and multi-agent workflows by handling orchestration, tool invocation, and interaction with various large language models. The library is actively maintained, frequently updated, and currently at version 1.35.0.","status":"active","version":"1.35.0","language":"en","source_language":"en","source_url":"https://github.com/strands-agents/sdk-python","tags":["AI Agents","LLM","AWS","Bedrock","Agent Framework","Tools","Multi-Agent","Python"],"install":[{"cmd":"pip install strands-agents strands-agents-tools","lang":"bash","label":"Core SDK and recommended tools"},{"cmd":"pip install strands-agents[bidi,bidi-io]","lang":"bash","label":"For bidirectional streaming with audio I/O (includes PyAudio)"}],"dependencies":[{"reason":"Requires Python 3.10 or higher.","package":"python","optional":false},{"reason":"Used for unified access to various LLM providers; critical security patch in v1.33.0.","package":"litellm","optional":false},{"reason":"Required for 'bidi-io' extra for audio input/output functionality.","package":"pyaudio","optional":true},{"reason":"Required for interacting with AWS services, especially Amazon Bedrock (default model provider).","package":"boto3","optional":false}],"imports":[{"symbol":"Agent","correct":"from strands import Agent"},{"note":"Used as a decorator to define custom tools.","symbol":"tool","correct":"from strands import tool"},{"note":"Example tool from the 'strands-agents-tools' package.","symbol":"calculator","correct":"from strands_tools import calculator"},{"note":"For explicit configuration of Amazon Bedrock models.","symbol":"BedrockModel","correct":"from strands.models.bedrock import BedrockModel"}],"quickstart":{"code":"import os\nfrom strands import Agent\nfrom strands_tools import calculator\n\n# Configure AWS credentials for Bedrock (if not already set via environment variables)\n# For example, by setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY\n# Or ensure your AWS CLI is configured with a default region and profile\n\nagent = Agent(tools=[calculator])\n\nasync def run_agent():\n    print(\"Agent initialized. Asking a question...\")\n    response = await agent(\"What is the square root of 1764?\")\n    print(f\"Agent response: {response.content}\")\n\nif __name__ == \"__main__\":\n    import asyncio\n    asyncio.run(run_agent())","lang":"python","description":"This quickstart demonstrates creating a basic Strands agent with a pre-built tool (`calculator`) from `strands-agents-tools` and querying it. Ensure AWS credentials are configured as Strands uses Amazon Bedrock as the default model provider."},"warnings":[{"fix":"Upgrade `strands-agents` to `1.33.0` or higher. If affected, follow `litellm`'s security advice for credential rotation and system audit.","message":"A critical supply chain attack impacted 'litellm' (a dependency) versions 1.82.7 and 1.82.8, which contained malicious code. Strands Agents v1.33.0 (and later) hard-pinned `litellm<=1.82.6` to mitigate this. Users on older Strands versions or with unpinned `litellm` dependencies should immediately upgrade `strands-agents` and audit their environments.","severity":"breaking","affected_versions":"<1.33.0 (if `litellm` was not explicitly pinned)"},{"fix":"Ensure AWS credentials are correctly configured and the necessary Bedrock models are enabled in your AWS account. For non-Bedrock models, explicitly configure the desired `model` provider during `Agent` initialization.","message":"Strands Agents defaults to using Amazon Bedrock for models. This requires AWS credentials (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`) to be configured in your environment or AWS CLI, and model access to be enabled in your AWS account. Without proper configuration, agents may fail to initialize or execute.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install the `bidi-io` extra: `pip install strands-agents[bidi,bidi-io]`.","message":"The `pyaudio` dependency is optional and only included with the `bidi-io` extra. If you intend to use bidirectional streaming features requiring audio input/output, you must install `strands-agents` with this extra (e.g., `pip install strands-agents[bidi,bidi-io]`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult AWS Bedrock documentation for supported `service_tier` values per model and region, or omit the `service_tier` parameter to use the default behavior.","message":"When using `BedrockModel`, specifying an unsupported `service_tier` (e.g., 'flex', 'priority') for a given model or region will result in a `ValidationException`. Not all models or AWS regions support all service tiers.","severity":"gotcha","affected_versions":">=1.35.0"},{"fix":"Implement custom middleware or 'steering hooks' to inspect and validate tool inputs/outputs, use fine-grained IAM roles for tool execution, and thoroughly test agents in controlled environments.","message":"When granting agents access to tools that perform sensitive actions (e.g., SQL execution, file system operations, API calls), implement robust input validation, output sanitization, and least-privilege IAM policies. Relying solely on system prompts for security is insufficient against prompt injection or unforeseen agent behavior in production environments, potentially leading to data leakage or destructive actions.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}