[`agentic_crew.runners.strands_runner`](#module-agentic_crew.runners.strands_runner)
AWS Strands runner implementation.
Strands is lightweight and AWS-native, good for:
- Simple agent workflows
- AWS Bedrock integration
- Minimal dependencies
- Plain Python function tools
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”StrandsRunner | Runner that uses AWS Strands for crew execution. |
|---|
class agentic_crew.runners.strands_runner.StrandsRunner
Section titled “class agentic_crew.runners.strands_runner.StrandsRunner”Bases: agentic_crew.runners.base.BaseRunner
Runner that uses AWS Strands for crew execution.
Initialization
Section titled “Initialization”Initialize Strands runner.
framework_name
Section titled “framework_name”‘strands’
build_crew(crew_config: dict[str, Any]) → Any
Section titled “build_crew(crew_config: dict[str, Any]) → Any”Build a Strands agent from configuration.
Strands uses a single-agent model, so we combine crew tasks into a system prompt for one capable agent.
Args: crew_config: Universal crew configuration.
Returns: Strands Agent object.
_get_model_provider(llm_config: dict | str | None) → str | None
Section titled “_get_model_provider(llm_config: dict | str | None) → str | None”Get Strands-compatible model provider from LLM config.
Args: llm_config: LLM configuration from crew config.
Returns: Model provider string for Strands, or None for default.
run(crew: Any, inputs: dict[str, Any]) → str
Section titled “run(crew: Any, inputs: dict[str, Any]) → str”Execute the Strands agent.
Args: crew: Strands Agent object. inputs: Inputs for the agent.
Returns: Agent output as string.
build_agent(agent_config: dict[str, Any], tools: list | None = None) → Any
Section titled “build_agent(agent_config: dict[str, Any], tools: list | None = None) → Any”Build a Strands agent.
Args: agent_config: Agent configuration. tools: Optional tools.
Returns: Strands Agent object.
build_task(task_config: dict[str, Any], agent: Any) → Any
Section titled “build_task(task_config: dict[str, Any], agent: Any) → Any”Build a task for Strands.
In Strands, tasks are prompts to the agent. Returns a dict that can be used to construct prompts.
Args: task_config: Task configuration. agent: Agent for the task.
Returns: Task configuration dict.
_build_system_prompt(crew_config: dict[str, Any]) → str
Section titled “_build_system_prompt(crew_config: dict[str, Any]) → str”Build a comprehensive system prompt from crew config.
Combines all agent roles, goals, and backstories into a single capable system prompt.
Args: crew_config: Crew configuration.
Returns: System prompt string.
_collect_tools(crew_config: dict[str, Any]) → list
Section titled “_collect_tools(crew_config: dict[str, Any]) → list”Collect tools from crew configuration.
Args: crew_config: Crew configuration.
Returns: List of tool functions.