Skip to main content

Interface: StrandsPluginOptions

strands.StrandsPluginOptions

Options for StrandsPlugin.

  • models — name → factory map. Each factory is called lazily on first use and the constructed model is cached for the worker's lifetime. TemporalAgent({ model: 'name', ... }) selects which factory to invoke. If omitted, the plugin registers a single BedrockModel factory under the name 'bedrock' to match Strands' own implicit default.

  • mcpClients — name → MCP client factory map. Workflow-side TemporalMCPClient({ server: 'name' }) selects a factory by name; the per-server {name}-listTools and {name}-callTool activities reuse one lazily-opened worker-process connection. Tools are enumerated live on each listTools. By default (TemporalMCPClient's cacheTools: false) the agent re-lists on each turn, so it picks up MCP-server changes (including redeploys) mid-workflow without restarting the worker; set cacheTools: true to list once at the start of the workflow instead.

  • mcpConnectionIdleTimeout — how long a worker-process MCP connection is kept open between callTool activities before it's disconnected. The timer resets on every reuse. Accepts a millisecond number or a duration string (e.g. '5 minutes'), like startToCloseTimeout. Defaults to MCP_CONNECTION_IDLE_MS (5 minutes).

Properties

mcpClients

Optional mcpClients: Record<string, () => McpClient>


mcpConnectionIdleTimeout

Optional mcpConnectionIdleTimeout: Duration


models

Optional models: Record<string, () => Model<BaseModelConfig>>