agentic_fabric.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

Classes

StrandsRunner

Runner that uses AWS Strands for fabric agent execution.

API

class agentic_fabric.runners.strands_runner.StrandsRunner

Bases: agentic_fabric.runners.base.BaseRunner

Runner that uses AWS Strands for fabric agent execution.

Initialization

Initialize Strands runner.

framework_name = 'strands'
build_fabric_agent(fabric_agent_config: dict[str, Any]) Any

Build a Strands agent from configuration.

Strands uses a single-agent model, so we combine fabric agent tasks into a system prompt for one capable agent.

Args: fabric_agent_config: Universal fabric agent configuration.

Returns: Strands Agent object.

run(fabric_agent: Any, inputs: dict[str, Any]) str

Execute the Strands agent.

Args: fabric_agent: 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

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

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_and_run(fabric_agent_config: dict[str, Any], inputs: dict[str, Any] | None = None) str
get_llm(model: str | None = None) Any
agent_capabilities: ClassVar[collections.abc.Mapping[str, agentic_fabric.capabilities.AgentCapabilitySpec]] = None
agent_capability_methods: ClassVar[collections.abc.Mapping[str, str]] = None
classmethod list_capabilities(*, kind: str | None = None) tuple[agentic_fabric.capabilities.AgentCapabilitySpec, ...]
call_capability(name: str, *args: Any, **kwargs: Any) Any
capability_map() collections.abc.Mapping[str, agentic_fabric.capabilities.AgentCapabilitySpec]