Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build AI agents with the Strands Agents SDK, an open-source framework from AWS. Use when building autonomous agents, creating custom tools with @tool decorator, orchestrating multi-agent systems (swarm, graph, agents-as-tools), integrating MCP servers, or deploying agents to production. Supports Amazon Bedrock, Anthropic API, OpenAI, Ollama, and other model providers.
.claude/skills/majiayu000-strands-agents/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -2% | 0% |
Build AI agents using the model-driven Strands Agents SDK. Agents consist of three components: a model, tools, and a prompt.
bashpip install strands-agents strands-agents-tools --break-system-packages
pythonfrom strands import Agent agent = Agent(system_prompt="You are a helpful assistant.") response = agent("Hello, how can you help me?") print(response)
Use @tool decorator to convert Python functions into agent tools:
pythonfrom strands import Agent, tool @tool def calculate_area(length: float, width: float) -> float: """Calculate rectangle area. Args: length: Rectangle length width: Rectangle width Returns: Area of the rectangle """ return length * width agent = Agent(tools=[calculate_area]) agent("What is the area of a 5x3 rectangle?")
Key requirements for tools:
For tools that share state or resources:
pythonfrom strands import Agent, tool class DatabaseTools: def __init__(self, connection_string: str): self.conn = self._connect(connection_string) def _connect(self, conn_str): return {"connected": True, "db": conn_str} @tool def query(self, sql: str) -> dict: """Execute SQL query. Args: sql: SQL query to execute """ return {"results": f"Query: {sql}", "connection": self.conn} db = DatabaseTools("postgres://...") agent = Agent(tools=[db.query])
Default is Amazon Bedrock with Claude. Configure alternatives:
pythonfrom strands import Agent from strands.models import BedrockModel from strands.models.ollama import OllamaModel from strands.models.anthropic import AnthropicModel # Amazon Bedrock (default) agent = Agent(model=BedrockModel( model_id="us.anthropic.claude-sonnet-4-20250514-v1:0", region_name="us-west-2" )) # Anthropic API (set ANTHROPIC_API_KEY env var) agent = Agent(model=AnthropicModel( client_args={"api_key": "<KEY>"}, model_id="claude-sonnet-4-20250514", max_tokens=1028 )) # Ollama (local) agent = Agent(model=OllamaModel( host="http://localhost:11434", model_id="llama3.1" ))
Connect to Model Context Protocol servers for external tools:
pythonfrom strands import Agent from strands.tools.mcp import MCPClient # Stdio transport mcp = MCPClient(transport="stdio", command="npx", args=["-y", "@modelcontextprotocol/server-filesystem"]) agent = Agent(tools=[mcp]) agent("List files in the current directory")
Wrap specialized agents as tools for an orchestrator:
pythonfrom strands import Agent, tool @tool def research_assistant(query: str) -> str: """Research factual information. Args: query: Research question """ researcher = Agent(system_prompt="You are a research expert.") return str(researcher(query)) @tool def code_assistant(task: str) -> str: """Write and explain code. Args: task: Coding task description """ coder = Agent(system_prompt="You are a coding expert.") return str(coder(task)) orchestrator = Agent( system_prompt="Route tasks to the appropriate specialist.", tools=[research_assistant, code_assistant] )
Autonomous agent collaboration with shared context:
pythonfrom strands import Agent from strands.multiagent import Swarm researcher = Agent(name="researcher", system_prompt="You research topics thoroughly.") analyst = Agent(name="analyst", system_prompt="You analyze data and findings.") writer = Agent(name="writer", system_prompt="You write clear reports.") swarm = Swarm([researcher, analyst, writer]) result = swarm("Research AI trends and write a summary report")
Swarms enable emergent intelligence through:
Deterministic workflows with defined execution order:
pythonfrom strands import Agent from strands.multiagent import GraphBuilder researcher = Agent(name="researcher", system_prompt="Research the topic.") reviewer = Agent(name="reviewer", system_prompt="Review and fact-check.") writer = Agent(name="writer", system_prompt="Write the final output.") builder = GraphBuilder() builder.add_node(researcher, "research") builder.add_node(reviewer, "review") builder.add_node(writer, "write") builder.add_edge("research", "review") builder.add_edge("review", "write") builder.set_entry_point("research") graph = builder.build() result = graph("Write a report on quantum computing")
pythondef needs_revision(state): return "needs revision" in state.results.get("review", {}).get("output", "").lower() builder.add_edge("review", "research", condition=needs_revision) # Loop back builder.add_edge("review", "write", condition=lambda s: not needs_revision(s))
pythonfrom strands import Agent from strands.handlers import PrintingCallbackHandler agent = Agent(callback_handler=PrintingCallbackHandler()) agent("Tell me a story")
pythonimport asyncio from strands import Agent async def stream_response(): agent = Agent() async for event in agent.stream_async("Tell me a story"): if hasattr(event, 'data'): print(event.data, end="", flush=True) asyncio.run(stream_response())
Persist conversations across sessions:
pythonfrom strands import Agent from strands.session import FileSessionManager session_mgr = FileSessionManager(session_id="user-123", base_dir="./sessions") agent = Agent(session_manager=session_mgr) agent("Remember my name is Alice") # Later session... agent("What's my name?") # Recalls "Alice"
The strands-agents-tools package provides:
calculator - Math operationscurrent_time - Get current timehttp_request - Make HTTP requestsfile_read, file_write, editor - File operationspython_repl - Execute Python codeshell - Run shell commandsmemory - Store/retrieve informationretrieve - RAG retrievalmcp_client - Dynamic MCP server connectionspythonfrom strands import Agent from strands_tools import calculator, current_time, file_read agent = Agent(tools=[calculator, current_time, file_read])
| Pattern | Use When | |---------|----------| | Single Agent | Simple tasks, direct tool use | | Agents as Tools | Hierarchical delegation, clear specialist roles | | Swarm | Exploration, brainstorming, emergent solutions | | Graph | Deterministic workflows, conditional logic, loops |
For detailed API documentation and advanced patterns, see:
references/model-providers.md - Complete model provider configurationsreferences/multi-agent-patterns.md - Advanced multi-agent architectures| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | 21,601 | 8,094 | -63% | 1 | 1 | 0% | 2,989 | 3,425 | +15% | 0 | 0 | — |
case-01 | pass→pass | 27,589 | 13,997 | -49% | 1 | 1 | 0% | 4,108 | 3,978 | -3% | 0 | 0 | — |
case-03 | fail→pass | 17,937 | 6,175 | -66% | 1 | 1 | 0% | 2,319 | 3,050 | +32% | 0 | 0 | — |
case-04 | fail→pass | 13,425 | 7,470 | -44% | 1 | 1 | 0% | 1,355 | 2,308 | +70% | 0 | 0 | — |
case-05 | pass→pass | 13,141 | 8,109 | -38% | 1 | 1 | 0% | 1,417 | 2,485 | +75% | 0 | 0 | — |
case-06 | fail→pass | 16,751 | 5,199 | -69% | 1 | 1 | 0% | 1,718 | 2,912 | +69% | 0 | 0 | — |
case-07 | fail→pass | 38,453 | 4,316 | -89% | 1 | 1 | 0% | 2,783 | 2,732 | -2% | 0 | 0 | — |
case-08 | fail→pass | 22,085 | 11,554 | -48% | 1 | 1 | 0% | 3,238 | 4,022 | +24% | 0 | 0 | — |
case-09 | fail→pass | 18,718 | 14,902 | -20% | 1 | 1 | 0% | 3,381 | 3,613 | +7% | 0 | 0 | — |
case-10 | fail→pass | 11,298 | 11,171 | -1% | 1 | 1 | 0% | 2,111 | 2,426 | +15% | 0 | 0 | — |
case-11 | fail→pass | 19,536 | 6,246 | -68% | 1 | 1 | 0% | 2,582 | 3,053 | +18% | 0 | 0 | — |
case-12 | fail→pass | 16,874 | 8,097 | -52% | 1 | 1 | 0% | 2,357 | 2,442 | +4% | 0 | 0 | — |
case-13 | fail→pass | 18,075 | 19,174 | +6% | 1 | 1 | 0% | 3,480 | 4,599 | +32% | 0 | 0 | — |
case-14 | fail→pass | 16,481 | 9,835 | -40% | 1 | 1 | 0% | 2,168 | 2,847 | +31% | 0 | 0 | — |
case-15 | pass→pass | 18,253 | 10,292 | -44% | 1 | 1 | 0% | 2,020 | 2,781 | +38% | 0 | 0 | — |
case-16 | fail→pass | 18,579 | 6,377 | -66% | 1 | 1 | 0% | 2,431 | 3,182 | +31% | 0 | 0 | — |
case-17 | fail→pass | 8,467 | 3,398 | -60% | 1 | 1 | 0% | 1,568 | 2,524 | +61% | 0 | 0 | — |
case-18 | pass→pass | 19,811 | 9,989 | -50% | 1 | 1 | 0% | 2,546 | 2,829 | +11% | 0 | 0 | — |
case-19 | fail→pass | 17,059 | 8,663 | -49% | 1 | 1 | 0% | 2,271 | 3,583 | +58% | 0 | 0 | — |
case-20 | fail→fail | 13,072 | 11,245 | -14% | 1 | 1 | 0% | 1,546 | 3,064 | +98% | 0 | 0 | — |
case-21 | pass→pass | 13,826 | 11,923 | -14% | 1 | 1 | 0% | 2,665 | 4,179 | +57% | 0 | 0 | — |
case-22 | pass→pass | 16,329 | 7,542 | -54% | 1 | 1 | 0% | 2,142 | 3,297 | +54% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.