[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77VMYRX8Z0MA7F33AW9KZRV":3,"skill-same:01M77VMYRX8Z0MA7F33AW9KZRV":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M77VMYRX8Z0MA7F33AW9KZRV","strands",null,"Build and run Python-based AI agents using the AWS Strands SDK. Use when you need to create autonomous agents, multi-agent workflows, custom tools, or integrate with MCP servers. Supports Ollama (local), Anthropic, OpenAI, Bedrock, and other model providers. Use for agent scaffolding, tool creation, and running agent tasks programmatically.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fs\u002Fstrands\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: strands\nversion: 2.0.0\ndescription: Build and run Python-based AI agents using the AWS Strands SDK. Use when you need to create autonomous agents, multi-agent workflows, custom tools, or integrate with MCP servers. Supports Ollama (local), Anthropic, OpenAI, Bedrock, and other model providers. Use for agent scaffolding, tool creation, and running agent tasks programmatically.\nhomepage: https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python\nmetadata:\n  openclaw:\n    emoji: 🧬\n    requires:\n      bins: [python3]\n      packages: [strands-agents]\n---\n\n# Strands Agents SDK\n\nBuild AI agents in Python using the [Strands SDK](https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python) (Apache-2.0, from AWS).\n\nValidated against: `strands-agents==1.23.0`, `strands-agents-tools==0.2.19`\n\n## Prerequisites\n\n```bash\n# Install SDK + tools (via pipx for isolation — recommended)\npipx install strands-agents-builder  # includes strands-agents + strands-agents-tools + CLI\n\n# Or install directly\npip install strands-agents strands-agents-tools\n```\n\n## Core Concept: Bedrock Is the Default\n\n`Agent()` with no `model=` argument defaults to **Amazon Bedrock** — specifically `us.anthropic.claude-sonnet-4-20250514-v1:0` in `us-west-2`. This requires AWS credentials. To use a different provider, pass `model=` explicitly.\n\nDefault model constant: `strands.models.bedrock.DEFAULT_BEDROCK_MODEL_ID`\n\n## Quick Start — Local Agent (Ollama)\n\n```python\nfrom strands import Agent\nfrom strands.models.ollama import OllamaModel\n\n# host is a required positional argument\nmodel = OllamaModel(\"http:\u002F\u002Flocalhost:11434\", model_id=\"qwen3:latest\")\nagent = Agent(model=model)\nresult = agent(\"What is the capital of France?\")\nprint(result)\n```\n\n**Note:** Not all open-source models support tool-calling. Abliterated models often lose function-calling during the abliteration process. Test with a stock model (qwen3, llama3.x, mistral) first.\n\n## Quick Start — Bedrock (Default Provider)\n\n```python\nfrom strands import Agent\n\n# No model specified → BedrockModel (Claude Sonnet 4, us-west-2)\n# Requires AWS credentials (~\u002F.aws\u002Fcredentials or env vars)\nagent = Agent()\nresult = agent(\"Explain quantum computing\")\n\n# Explicit Bedrock model:\nfrom strands.models import BedrockModel\nmodel = BedrockModel(model_id=\"us.anthropic.claude-sonnet-4-20250514-v1:0\")\nagent = Agent(model=model)\n```\n\n## Quick Start — Anthropic (Direct API)\n\n```python\nfrom strands import Agent\nfrom strands.models.anthropic import AnthropicModel\n\n# max_tokens is Required[int] — must be provided\nmodel = AnthropicModel(model_id=\"claude-sonnet-4-20250514\", max_tokens=4096)\nagent = Agent(model=model)\nresult = agent(\"Explain quantum computing\")\n```\n\nRequires `ANTHROPIC_API_KEY` environment variable.\n\n## Quick Start — OpenAI\n\n```python\nfrom strands import Agent\nfrom strands.models.openai import OpenAIModel\n\nmodel = OpenAIModel(model_id=\"gpt-4.1\")\nagent = Agent(model=model)\n```\n\nRequires `OPENAI_API_KEY` environment variable.\n\n## Creating Custom Tools\n\nUse the `@tool` decorator. Type hints become the schema; the docstring becomes the description:\n\n```python\nfrom strands import Agent, tool\n\n@tool\ndef read_file(path: str) -> str:\n    \"\"\"Read contents of a file at the given path.\n\n    Args:\n        path: Filesystem path to read.\n    \"\"\"\n    with open(path) as f:\n        return f.read()\n\n@tool\ndef write_file(path: str, content: str) -> str:\n    \"\"\"Write content to a file.\n\n    Args:\n        path: Filesystem path to write.\n        content: Text content to write.\n    \"\"\"\n    with open(path, 'w') as f:\n        f.write(content)\n    return f\"Wrote {len(content)} bytes to {path}\"\n\nagent = Agent(model=model, tools=[read_file, write_file])\nagent(\"Read \u002Ftmp\u002Ftest.txt and summarize it\")\n```\n\n### ToolContext\n\nTools can access agent state via `ToolContext`:\n\n```python\nfrom strands import tool\nfrom strands.types.tools import ToolContext\n\n@tool\ndef stateful_tool(query: str, tool_context: ToolContext) -> str:\n    \"\"\"A tool that accesses agent state.\n\n    Args:\n        query: Input query.\n    \"\"\"\n    # Access shared agent state\n    count = tool_context.state.get(\"call_count\", 0) + 1\n    tool_context.state[\"call_count\"] = count\n    return f\"Call #{count}: {query}\"\n```\n\n## Built-in Tools (46 available)\n\n`strands-agents-tools` provides pre-built tools:\n\n```python\nfrom strands_tools import calculator, file_read, file_write, shell, http_request\nagent = Agent(model=model, tools=[calculator, file_read, shell])\n```\n\nFull list: `calculator`, `file_read`, `file_write`, `shell`, `http_request`, `editor`, `image_reader`, `python_repl`, `current_time`, `think`, `stop`, `sleep`, `environment`, `retrieve`, `search_video`, `chat_video`, `speak`, `generate_image`, `generate_image_stability`, `diagram`, `journal`, `memory`, `agent_core_memory`, `elasticsearch_memory`, `mongodb_memory`, `mem0_memory`, `rss`, `cron`, `batch`, `workflow`, `use_agent`, `use_llm`, `use_aws`, `use_computer`, `load_tool`, `handoff_to_user`, `slack`, `swarm`, `graph`, `a2a_client`, `mcp_client`, `exa`, `tavily`, `bright_data`, `nova_reels`.\n\nHot reload: `Agent(load_tools_from_directory=True)` watches `.\u002Ftools\u002F` for changes.\n\n## MCP Integration\n\nConnect to any Model Context Protocol server. MCPClient implements `ToolProvider` — pass it directly in the tools list:\n\n```python\nfrom strands import Agent\nfrom strands.tools.mcp import MCPClient\nfrom mcp import stdio_client, StdioServerParameters\n\n# MCPClient takes a callable that returns the transport\nmcp = MCPClient(lambda: stdio_client(StdioServerParameters(\n    command=\"uvx\",\n    args=[\"some-mcp-server@latest\"]\n)))\n\n# Use as context manager — MCPClient is a ToolProvider\nwith mcp:\n    agent = Agent(model=model, tools=[mcp])\n    agent(\"Use the MCP tools to do something\")\n```\n\nSSE transport:\n```python\nfrom mcp.client.sse import sse_client\nmcp = MCPClient(lambda: sse_client(\"http:\u002F\u002Flocalhost:8080\u002Fsse\"))\n```\n\n## Multi-Agent Patterns\n\n### Agents as Tools\n\nNest agents — inner agents become tools for the outer agent:\n\n```python\nresearcher = Agent(model=model, system_prompt=\"You are a research assistant.\")\nwriter = Agent(model=model, system_prompt=\"You are a writer.\")\n\norchestrator = Agent(\n    model=model,\n    tools=[researcher, writer],\n    system_prompt=\"You coordinate research and writing tasks.\"\n)\norchestrator(\"Research quantum computing and write a blog post\")\n```\n\n### Swarm Pattern\n\nSelf-organizing agent teams with shared context and autonomous handoff coordination:\n\n```python\nfrom strands.multiagent.swarm import Swarm\n\n# Agents need name + description for handoff identification\nresearcher = Agent(\n    model=model,\n    name=\"researcher\",\n    description=\"Finds and summarizes information\"\n)\nwriter = Agent(\n    model=model,\n    name=\"writer\",\n    description=\"Creates polished content\"\n)\n\nswarm = Swarm(\n    nodes=[researcher, writer],\n    entry_point=researcher,    # optional — defaults to first agent\n    max_handoffs=20,           # default\n    max_iterations=20,         # default\n    execution_timeout=900.0,   # 15 min default\n    node_timeout=300.0         # 5 min per node default\n)\nresult = swarm(\"Research AI agents, then hand off to writer for a blog post\")\n```\n\nSwarm auto-injects a `handoff_to_agent` tool. Agents hand off by calling it with the target agent's name. Supports interrupt\u002Fresume, session persistence, and repetitive-handoff detection.\n\n### Graph Pattern (DAG)\n\nDeterministic dependency-based execution via `GraphBuilder`:\n\n```python\nfrom strands.multiagent.graph import GraphBuilder\n\nbuilder = GraphBuilder()\nresearch_node = builder.add_node(researcher, node_id=\"research\")\nwriting_node = builder.add_node(writer, node_id=\"writing\")\nbuilder.add_edge(\"research\", \"writing\")\nbuilder.set_entry_point(\"research\")\n\n# Optional: conditional edges\n# builder.add_edge(\"research\", \"writing\",\n#     condition=lambda state: \"complete\" in str(state.completed_nodes))\n\ngraph = builder.build()\nresult = graph(\"Write a blog post about AI agents\")\n```\n\nSupports cycles (feedback loops) with `builder.reset_on_revisit(True)`, execution timeouts, and nested graphs (Graph as a node in another Graph).\n\n### A2A Protocol (Agent-to-Agent)\n\nExpose a Strands agent as an A2A-compatible server for inter-agent communication:\n\n```python\nfrom strands.multiagent.a2a import A2AServer\n\nserver = A2AServer(\n    agent=my_agent,\n    host=\"127.0.0.1\",\n    port=9000,\n    version=\"0.0.1\"\n)\nserver.start()  # runs uvicorn\n```\n\nConnect to A2A agents with the `a2a_client` tool from strands-agents-tools. A2A implements Google's Agent-to-Agent protocol for standardized cross-process\u002Fcross-network agent communication.\n\n## Session Persistence\n\nPersist conversations across agent runs:\n\n```python\nfrom strands.session.file_session_manager import FileSessionManager\n\nsession = FileSessionManager(session_file_path=\".\u002Fsessions\u002Fmy_session.json\")\nagent = Agent(model=model, session_manager=session)\n\n# Also available:\nfrom strands.session.s3_session_manager import S3SessionManager\nsession = S3SessionManager(bucket_name=\"my-bucket\", session_id=\"session-1\")\n```\n\nBoth Swarm and Graph support session managers for persisting multi-agent state.\n\n## Bidirectional Streaming (Experimental)\n\nReal-time voice\u002Ftext conversations with persistent audio streams:\n\n```python\nfrom strands.experimental.bidi.agent import BidiAgent\nfrom strands.experimental.bidi.models.nova_sonic import NovaSonicModel\n\n# Supports: NovaSonicModel, GeminiLiveModel, OpenAIRealtimeModel\nmodel = NovaSonicModel(region=\"us-east-1\")\nagent = BidiAgent(model=model, tools=[my_tool])\n```\n\nSupports interruption detection, concurrent tool execution, and continuous back-and-forth audio. Experimental — API subject to change.\n\n## System Prompts\n\n```python\nagent = Agent(\n    model=model,\n    system_prompt=\"You are Hex, a sharp and witty AI assistant.\",\n    tools=[read_file, write_file]\n)\n```\n\nStrands also supports `list[SystemContentBlock]` for structured system prompts with cache control.\n\n## Observability\n\nNative OpenTelemetry tracing:\n\n```python\nagent = Agent(\n    model=model,\n    trace_attributes={\"project\": \"my-agent\", \"environment\": \"dev\"}\n)\n```\n\nEvery tool call, model invocation, handoff, and lifecycle event is instrumentable.\n\n## Bedrock-Specific Features\n\n- **Guardrails**: `guardrail_id` + `guardrail_version` in BedrockModel config — content filtering, PII detection, input\u002Foutput redaction\n- **Cache points**: System prompt and tool definition caching for cost optimization\n- **Streaming**: On by default, disable with `streaming=False`\n- **Region**: Defaults to `us-west-2`, override via `region_name` param or `AWS_REGION` env\n- **Cross-region inference**: Model IDs prefixed with `us.` use cross-region inference profiles\n\n## Scaffolding a New Agent\n\n```bash\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider ollama --model qwen3:latest\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider anthropic\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider bedrock\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider openai --model gpt-4.1\n```\n\nCreates a ready-to-run agent directory with tools, config, and entry point.\n\n## Running an Agent\n\n```bash\npython3 {baseDir}\u002Fscripts\u002Frun-agent.py path\u002Fto\u002Fagent.py \"Your prompt here\"\npython3 {baseDir}\u002Fscripts\u002Frun-agent.py path\u002Fto\u002Fagent.py --interactive\n```\n\n## Model Providers Reference (11 total)\n\n| Provider | Class | Init | Notes |\n|----------|-------|------|-------|\n| Bedrock | `BedrockModel` | `BedrockModel(model_id=...)` | **Default**, eagerly imported |\n| Ollama | `OllamaModel` | `OllamaModel(\"http:\u002F\u002Fhost:11434\", model_id=...)` | `host` is positional |\n| Anthropic | `AnthropicModel` | `AnthropicModel(model_id=..., max_tokens=4096)` | `max_tokens` **required** |\n| OpenAI | `OpenAIModel` | `OpenAIModel(model_id=...)` | `OPENAI_API_KEY` |\n| Gemini | `GeminiModel` | `GeminiModel(model_id=...)` | `api_key` in client_args |\n| Mistral | `MistralModel` | `MistralModel(model_id=...)` | Mistral API key |\n| LiteLLM | `LiteLLMModel` | `LiteLLMModel(model_id=...)` | Meta-provider (Cohere, Groq, etc.) |\n| LlamaAPI | `LlamaAPIModel` | `LlamaAPIModel(model_id=...)` | Meta Llama API |\n| llama.cpp | `LlamaCppModel` | `LlamaCppModel(...)` | Local server, OpenAI-compatible |\n| SageMaker | `SageMakerAIModel` | `SageMakerAIModel(...)` | Custom AWS endpoints |\n| Writer | `WriterModel` | `WriterModel(model_id=...)` | Writer platform |\n\nAll non-Bedrock providers are **lazy-loaded** — dependencies imported only when referenced.\n\nImport pattern: `from strands.models.\u003Cprovider> import \u003CClass>` (or `from strands.models import \u003CClass>` for lazy-load).\n\n## Tips\n\n- `Agent()` without `model=` requires AWS credentials (Bedrock default)\n- `AnthropicModel` requires `max_tokens` — omitting it causes a runtime error\n- `OllamaModel` `host` is positional: `OllamaModel(\"http:\u002F\u002F...\", model_id=\"...\")`\n- Abliterated Ollama models often lose tool-calling support — use stock models for tool-using agents\n- Swarm agents need `name=` and `description=` for handoff routing\n- `Agent(load_tools_from_directory=True)` watches `.\u002Ftools\u002F` for hot-reloaded tool files\n- Use `agent.tool.my_tool()` to call tools directly without LLM routing\n- `MCPClient` is a `ToolProvider` — pass it directly in `tools=[mcp]`, don't call `list_tools_sync()` manually when using with Agent\n- Session managers work with Agent, Swarm, and Graph\n- Pin your `strands-agents` version — the SDK is young and APIs evolve between releases\n","# Strands Agents SDK\n\nBuild AI agents in Python using the [Strands SDK](https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python) (Apache-2.0, from AWS).\n\nValidated against: `strands-agents==1.23.0`, `strands-agents-tools==0.2.19`\n\n## Prerequisites\n\n```bash\n# Install SDK + tools (via pipx for isolation — recommended)\npipx install strands-agents-builder  # includes strands-agents + strands-agents-tools + CLI\n\n# Or install directly\npip install strands-agents strands-agents-tools\n```\n\n## Core Concept: Bedrock Is the Default\n\n`Agent()` with no `model=` argument defaults to **Amazon Bedrock** — specifically `us.anthropic.claude-sonnet-4-20250514-v1:0` in `us-west-2`. This requires AWS credentials. To use a different provider, pass `model=` explicitly.\n\nDefault model constant: `strands.models.bedrock.DEFAULT_BEDROCK_MODEL_ID`\n\n## Quick Start — Local Agent (Ollama)\n\n```python\nfrom strands import Agent\nfrom strands.models.ollama import OllamaModel\n\n# host is a required positional argument\nmodel = OllamaModel(\"http:\u002F\u002Flocalhost:11434\", model_id=\"qwen3:latest\")\nagent = Agent(model=model)\nresult = agent(\"What is the capital of France?\")\nprint(result)\n```\n\n**Note:** Not all open-source models support tool-calling. Abliterated models often lose function-calling during the abliteration process. Test with a stock model (qwen3, llama3.x, mistral) first.\n\n## Quick Start — Bedrock (Default Provider)\n\n```python\nfrom strands import Agent\n\n# No model specified → BedrockModel (Claude Sonnet 4, us-west-2)\n# Requires AWS credentials (~\u002F.aws\u002Fcredentials or env vars)\nagent = Agent()\nresult = agent(\"Explain quantum computing\")\n\n# Explicit Bedrock model:\nfrom strands.models import BedrockModel\nmodel = BedrockModel(model_id=\"us.anthropic.claude-sonnet-4-20250514-v1:0\")\nagent = Agent(model=model)\n```\n\n## Quick Start — Anthropic (Direct API)\n\n```python\nfrom strands import Agent\nfrom strands.models.anthropic import AnthropicModel\n\n# max_tokens is Required[int] — must be provided\nmodel = AnthropicModel(model_id=\"claude-sonnet-4-20250514\", max_tokens=4096)\nagent = Agent(model=model)\nresult = agent(\"Explain quantum computing\")\n```\n\nRequires `ANTHROPIC_API_KEY` environment variable.\n\n## Quick Start — OpenAI\n\n```python\nfrom strands import Agent\nfrom strands.models.openai import OpenAIModel\n\nmodel = OpenAIModel(model_id=\"gpt-4.1\")\nagent = Agent(model=model)\n```\n\nRequires `OPENAI_API_KEY` environment variable.\n\n## Creating Custom Tools\n\nUse the `@tool` decorator. Type hints become the schema; the docstring becomes the description:\n\n```python\nfrom strands import Agent, tool\n\n@tool\ndef read_file(path: str) -> str:\n    \"\"\"Read contents of a file at the given path.\n\n    Args:\n        path: Filesystem path to read.\n    \"\"\"\n    with open(path) as f:\n        return f.read()\n\n@tool\ndef write_file(path: str, content: str) -> str:\n    \"\"\"Write content to a file.\n\n    Args:\n        path: Filesystem path to write.\n        content: Text content to write.\n    \"\"\"\n    with open(path, 'w') as f:\n        f.write(content)\n    return f\"Wrote {len(content)} bytes to {path}\"\n\nagent = Agent(model=model, tools=[read_file, write_file])\nagent(\"Read \u002Ftmp\u002Ftest.txt and summarize it\")\n```\n\n### ToolContext\n\nTools can access agent state via `ToolContext`:\n\n```python\nfrom strands import tool\nfrom strands.types.tools import ToolContext\n\n@tool\ndef stateful_tool(query: str, tool_context: ToolContext) -> str:\n    \"\"\"A tool that accesses agent state.\n\n    Args:\n        query: Input query.\n    \"\"\"\n    # Access shared agent state\n    count = tool_context.state.get(\"call_count\", 0) + 1\n    tool_context.state[\"call_count\"] = count\n    return f\"Call #{count}: {query}\"\n```\n\n## Built-in Tools (46 available)\n\n`strands-agents-tools` provides pre-built tools:\n\n```python\nfrom strands_tools import calculator, file_read, file_write, shell, http_request\nagent = Agent(model=model, tools=[calculator, file_read, shell])\n```\n\nFull list: `calculator`, `file_read`, `file_write`, `shell`, `http_request`, `editor`, `image_reader`, `python_repl`, `current_time`, `think`, `stop`, `sleep`, `environment`, `retrieve`, `search_video`, `chat_video`, `speak`, `generate_image`, `generate_image_stability`, `diagram`, `journal`, `memory`, `agent_core_memory`, `elasticsearch_memory`, `mongodb_memory`, `mem0_memory`, `rss`, `cron`, `batch`, `workflow`, `use_agent`, `use_llm`, `use_aws`, `use_computer`, `load_tool`, `handoff_to_user`, `slack`, `swarm`, `graph`, `a2a_client`, `mcp_client`, `exa`, `tavily`, `bright_data`, `nova_reels`.\n\nHot reload: `Agent(load_tools_from_directory=True)` watches `.\u002Ftools\u002F` for changes.\n\n## MCP Integration\n\nConnect to any Model Context Protocol server. MCPClient implements `ToolProvider` — pass it directly in the tools list:\n\n```python\nfrom strands import Agent\nfrom strands.tools.mcp import MCPClient\nfrom mcp import stdio_client, StdioServerParameters\n\n# MCPClient takes a callable that returns the transport\nmcp = MCPClient(lambda: stdio_client(StdioServerParameters(\n    command=\"uvx\",\n    args=[\"some-mcp-server@latest\"]\n)))\n\n# Use as context manager — MCPClient is a ToolProvider\nwith mcp:\n    agent = Agent(model=model, tools=[mcp])\n    agent(\"Use the MCP tools to do something\")\n```\n\nSSE transport:\n```python\nfrom mcp.client.sse import sse_client\nmcp = MCPClient(lambda: sse_client(\"http:\u002F\u002Flocalhost:8080\u002Fsse\"))\n```\n\n## Multi-Agent Patterns\n\n### Agents as Tools\n\nNest agents — inner agents become tools for the outer agent:\n\n```python\nresearcher = Agent(model=model, system_prompt=\"You are a research assistant.\")\nwriter = Agent(model=model, system_prompt=\"You are a writer.\")\n\norchestrator = Agent(\n    model=model,\n    tools=[researcher, writer],\n    system_prompt=\"You coordinate research and writing tasks.\"\n)\norchestrator(\"Research quantum computing and write a blog post\")\n```\n\n### Swarm Pattern\n\nSelf-organizing agent teams with shared context and autonomous handoff coordination:\n\n```python\nfrom strands.multiagent.swarm import Swarm\n\n# Agents need name + description for handoff identification\nresearcher = Agent(\n    model=model,\n    name=\"researcher\",\n    description=\"Finds and summarizes information\"\n)\nwriter = Agent(\n    model=model,\n    name=\"writer\",\n    description=\"Creates polished content\"\n)\n\nswarm = Swarm(\n    nodes=[researcher, writer],\n    entry_point=researcher,    # optional — defaults to first agent\n    max_handoffs=20,           # default\n    max_iterations=20,         # default\n    execution_timeout=900.0,   # 15 min default\n    node_timeout=300.0         # 5 min per node default\n)\nresult = swarm(\"Research AI agents, then hand off to writer for a blog post\")\n```\n\nSwarm auto-injects a `handoff_to_agent` tool. Agents hand off by calling it with the target agent's name. Supports interrupt\u002Fresume, session persistence, and repetitive-handoff detection.\n\n### Graph Pattern (DAG)\n\nDeterministic dependency-based execution via `GraphBuilder`:\n\n```python\nfrom strands.multiagent.graph import GraphBuilder\n\nbuilder = GraphBuilder()\nresearch_node = builder.add_node(researcher, node_id=\"research\")\nwriting_node = builder.add_node(writer, node_id=\"writing\")\nbuilder.add_edge(\"research\", \"writing\")\nbuilder.set_entry_point(\"research\")\n\n# Optional: conditional edges\n# builder.add_edge(\"research\", \"writing\",\n#     condition=lambda state: \"complete\" in str(state.completed_nodes))\n\ngraph = builder.build()\nresult = graph(\"Write a blog post about AI agents\")\n```\n\nSupports cycles (feedback loops) with `builder.reset_on_revisit(True)`, execution timeouts, and nested graphs (Graph as a node in another Graph).\n\n### A2A Protocol (Agent-to-Agent)\n\nExpose a Strands agent as an A2A-compatible server for inter-agent communication:\n\n```python\nfrom strands.multiagent.a2a import A2AServer\n\nserver = A2AServer(\n    agent=my_agent,\n    host=\"127.0.0.1\",\n    port=9000,\n    version=\"0.0.1\"\n)\nserver.start()  # runs uvicorn\n```\n\nConnect to A2A agents with the `a2a_client` tool from strands-agents-tools. A2A implements Google's Agent-to-Agent protocol for standardized cross-process\u002Fcross-network agent communication.\n\n## Session Persistence\n\nPersist conversations across agent runs:\n\n```python\nfrom strands.session.file_session_manager import FileSessionManager\n\nsession = FileSessionManager(session_file_path=\".\u002Fsessions\u002Fmy_session.json\")\nagent = Agent(model=model, session_manager=session)\n\n# Also available:\nfrom strands.session.s3_session_manager import S3SessionManager\nsession = S3SessionManager(bucket_name=\"my-bucket\", session_id=\"session-1\")\n```\n\nBoth Swarm and Graph support session managers for persisting multi-agent state.\n\n## Bidirectional Streaming (Experimental)\n\nReal-time voice\u002Ftext conversations with persistent audio streams:\n\n```python\nfrom strands.experimental.bidi.agent import BidiAgent\nfrom strands.experimental.bidi.models.nova_sonic import NovaSonicModel\n\n# Supports: NovaSonicModel, GeminiLiveModel, OpenAIRealtimeModel\nmodel = NovaSonicModel(region=\"us-east-1\")\nagent = BidiAgent(model=model, tools=[my_tool])\n```\n\nSupports interruption detection, concurrent tool execution, and continuous back-and-forth audio. Experimental — API subject to change.\n\n## System Prompts\n\n```python\nagent = Agent(\n    model=model,\n    system_prompt=\"You are Hex, a sharp and witty AI assistant.\",\n    tools=[read_file, write_file]\n)\n```\n\nStrands also supports `list[SystemContentBlock]` for structured system prompts with cache control.\n\n## Observability\n\nNative OpenTelemetry tracing:\n\n```python\nagent = Agent(\n    model=model,\n    trace_attributes={\"project\": \"my-agent\", \"environment\": \"dev\"}\n)\n```\n\nEvery tool call, model invocation, handoff, and lifecycle event is instrumentable.\n\n## Bedrock-Specific Features\n\n- **Guardrails**: `guardrail_id` + `guardrail_version` in BedrockModel config — content filtering, PII detection, input\u002Foutput redaction\n- **Cache points**: System prompt and tool definition caching for cost optimization\n- **Streaming**: On by default, disable with `streaming=False`\n- **Region**: Defaults to `us-west-2`, override via `region_name` param or `AWS_REGION` env\n- **Cross-region inference**: Model IDs prefixed with `us.` use cross-region inference profiles\n\n## Scaffolding a New Agent\n\n```bash\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider ollama --model qwen3:latest\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider anthropic\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider bedrock\npython3 {baseDir}\u002Fscripts\u002Fcreate-agent.py my-agent --provider openai --model gpt-4.1\n```\n\nCreates a ready-to-run agent directory with tools, config, and entry point.\n\n## Running an Agent\n\n```bash\npython3 {baseDir}\u002Fscripts\u002Frun-agent.py path\u002Fto\u002Fagent.py \"Your prompt here\"\npython3 {baseDir}\u002Fscripts\u002Frun-agent.py path\u002Fto\u002Fagent.py --interactive\n```\n\n## Model Providers Reference (11 total)\n\n| Provider | Class | Init | Notes |\n|----------|-------|------|-------|\n| Bedrock | `BedrockModel` | `BedrockModel(model_id=...)` | **Default**, eagerly imported |\n| Ollama | `OllamaModel` | `OllamaModel(\"http:\u002F\u002Fhost:11434\", model_id=...)` | `host` is positional |\n| Anthropic | `AnthropicModel` | `AnthropicModel(model_id=..., max_tokens=4096)` | `max_tokens` **required** |\n| OpenAI | `OpenAIModel` | `OpenAIModel(model_id=...)` | `OPENAI_API_KEY` |\n| Gemini | `GeminiModel` | `GeminiModel(model_id=...)` | `api_key` in client_args |\n| Mistral | `MistralModel` | `MistralModel(model_id=...)` | Mistral API key |\n| LiteLLM | `LiteLLMModel` | `LiteLLMModel(model_id=...)` | Meta-provider (Cohere, Groq, etc.) |\n| LlamaAPI | `LlamaAPIModel` | `LlamaAPIModel(model_id=...)` | Meta Llama API |\n| llama.cpp | `LlamaCppModel` | `LlamaCppModel(...)` | Local server, OpenAI-compatible |\n| SageMaker | `SageMakerAIModel` | `SageMakerAIModel(...)` | Custom AWS endpoints |\n| Writer | `WriterModel` | `WriterModel(model_id=...)` | Writer platform |\n\nAll non-Bedrock providers are **lazy-loaded** — dependencies imported only when referenced.\n\nImport pattern: `from strands.models.\u003Cprovider> import \u003CClass>` (or `from strands.models import \u003CClass>` for lazy-load).\n\n## Tips\n\n- `Agent()` without `model=` requires AWS credentials (Bedrock default)\n- `AnthropicModel` requires `max_tokens` — omitting it causes a runtime error\n- `OllamaModel` `host` is positional: `OllamaModel(\"http:\u002F\u002F...\", model_id=\"...\")`\n- Abliterated Ollama models often lose tool-calling support — use stock models for tool-using agents\n- Swarm agents need `name=` and `description=` for handoff routing\n- `Agent(load_tools_from_directory=True)` watches `.\u002Ftools\u002F` for hot-reloaded tool files\n- Use `agent.tool.my_tool()` to call tools directly without LLM routing\n- `MCPClient` is a `ToolProvider` — pass it directly in `tools=[mcp]`, don't call `list_tools_sync()` manually when using with Agent\n- Session managers work with Agent, Swarm, and Graph\n- Pin your `strands-agents` version — the SDK is young and APIs evolve between releases\n",{"name":5,"version":24,"homepage":25,"metadata":26,"description":7},"2.0.0","https:\u002F\u002Fgithub.com\u002Fstrands-agents\u002Fsdk-python",{"openclaw":27},{"emoji":28,"requires":29},"🧬",{"bins":30,"packages":32},[31],"python3",[33],"strands-agents","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fs\u002Fstrands",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill strands",{"tool":49,"command":50},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill strands",{"tool":52,"command":53},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill strands","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fs\u002Fstrands\u002FSKILL.md",true,[],[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]