diff --git a/src/strands/agent/agent.py b/src/strands/agent/agent.py index 232e2ca2a..68b1b979e 100644 --- a/src/strands/agent/agent.py +++ b/src/strands/agent/agent.py @@ -543,7 +543,7 @@ async def stream_async( Yields: An async iterator that yields events. Each event is a dictionary containing - information about the current state of processing, such as: + information about the current state of processing, such as: - data: Text content being generated - complete: Whether this is the final chunk diff --git a/src/strands/multiagent/swarm.py b/src/strands/multiagent/swarm.py index 6970e0426..0d4884c9e 100644 --- a/src/strands/multiagent/swarm.py +++ b/src/strands/multiagent/swarm.py @@ -233,7 +233,7 @@ def __init__( """Initialize Swarm with agents and configuration. Args: - id : Unique swarm id (default: None) + id: Unique swarm id (default: "default_swarm") nodes: List of nodes (e.g. Agent) to include in the swarm entry_point: Agent to start with. If None, uses the first agent (default: None) max_handoffs: Maximum handoffs to agents and users (default: 20) diff --git a/src/strands/tools/registry.py b/src/strands/tools/registry.py index c80b80f64..91f0bf870 100644 --- a/src/strands/tools/registry.py +++ b/src/strands/tools/registry.py @@ -17,10 +17,9 @@ from typing_extensions import TypedDict, cast -from strands.tools.decorator import DecoratedFunctionTool - from .._async import run_async from ..experimental.tools import ToolProvider +from ..tools.decorator import DecoratedFunctionTool from ..types.tools import AgentTool, ToolSpec from .loader import load_tool_from_string, load_tools_from_module from .tools import PythonAgentTool, normalize_schema, normalize_tool_spec @@ -49,16 +48,19 @@ def process_tools(self, tools: List[Any]) -> List[str]: imported modules, @tool decorated functions, or instances of AgentTool. Args: - tools: List of tool specifications. - Can be: - 1. Local file path to a module based tool: `./path/to/module/tool.py` - 2. Module import path - 2.1. Path to a module based tool: `strands_tools.file_read` - 2.2. Path to a module with multiple AgentTool instances (@tool decorated): `tests.fixtures.say_tool` - 2.3. Path to a module and a specific function: `tests.fixtures.say_tool:say` - 3. A module for a module based tool - 4. Instances of AgentTool (@tool decorated functions) - 5. Dictionaries with name/path keys (deprecated) + tools: List of tool specifications. Can be: + + 1. Local file path to a module based tool: `./path/to/module/tool.py` + 2. Module import path + + 2.1. Path to a module based tool: `strands_tools.file_read` + 2.2. Path to a module with multiple AgentTool instances (@tool decorated): + `tests.fixtures.say_tool` + 2.3. Path to a module and a specific function: `tests.fixtures.say_tool:say` + + 3. A module for a module based tool + 4. Instances of AgentTool (@tool decorated functions) + 5. Dictionaries with name/path keys (deprecated) Returns: