Class: TemporalActivityTool
strands.TemporalActivityTool
A Strands Tool whose body dispatches a Temporal activity via workflow.executeActivity.
When the activity fails with an ApplicationFailure whose type
matches STRANDS_INTERRUPT_TYPE — see StrandsFailureConverter —
stream() re-throws an InterruptError so the agent loop handles
the interrupt the same way as a hook- or tool-body interrupt. Other
failures are converted to an error ToolResultBlock.
Hierarchy
-
Tool↳
TemporalActivityTool
Constructors
constructor
• new TemporalActivityTool(activityName, options): TemporalActivityTool
Parameters
| Name | Type |
|---|---|
activityName | string |
options | Object |
options.activityOptions? | ActivityOptions |
options.description? | string |
options.inputSchema? | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | JSONSchema7 |
options.name? | string |
Returns
Overrides
Tool.constructor
Properties
description
• Readonly description: string
Overrides
Tool.description
name
• Readonly name: string
Overrides
Tool.name
toolSpec
• Readonly toolSpec: ToolSpec
Overrides
Tool.toolSpec
Methods
stream
▸ stream(toolContext): ToolStreamGenerator
Parameters
| Name | Type |
|---|---|
toolContext | ToolContext |
Returns
ToolStreamGenerator
Overrides
Tool.stream