class documentation

Temporal Worker plugin for the Strands Agents SDK.

When models is supplied, registers a single pair of model invocation activities; each call carries the chosen model_name in its input and the worker resolves it against the factories. Factories are called lazily on first use, then cached for the worker's lifetime. Use the same name in TemporalAgent(model=...) inside the workflow.

When mcp_clients is supplied, registers per-server {server}-call-tool and {server}-list-tools activities for each entry. Workflow-side TemporalMCPClient(server="...") discovers tools by running {server}-list-tools; whether it lists once per workflow or once per agent turn is controlled by its cache_tools option.

mcp_connection_idle_timeout controls how long a worker-process MCP connection is kept open between call-tool activities before it is disconnected; the timer resets on every reuse. Defaults to 5 minutes.

Method __init__ Build the plugin from optional model and MCP transport factories.

Inherited from SimplePlugin:

Method configure_client See base class.
Method configure_replayer See base class.
Method configure_worker See base class.
Async Method connect_service_client See base class.
Method name See base class.
Async Method run_replayer See base class.
Async Method run_worker See base class.
Instance Variable activities Undocumented
Instance Variable data_converter Undocumented
Instance Variable interceptors Undocumented
Instance Variable nexus_service_handlers Undocumented
Instance Variable run_context Undocumented
Instance Variable workflow_failure_exception_types Undocumented
Instance Variable workflow_runner Undocumented
Instance Variable workflows Undocumented
Instance Variable _name Undocumented
def __init__(self, *, models: dict[str, Callable[[], Model]] | None = None, mcp_clients: dict[str, Callable[[], MCPClient]] | None = None, mcp_connection_idle_timeout: timedelta | None = None): (source) ΒΆ

Build the plugin from optional model and MCP transport factories.

If models is omitted, registers a single BedrockModel() factory under the name "bedrock", matching Strands' own implicit default.