Skip to main content

Interface: ActivityToolDefinition<TActivity>

openaiAgentsWorkflow.ActivityToolDefinition

Definition for wrapping a Temporal Activity as an agent tool. TActivity is the Activity function type (e.g. typeof activities.getWeather); its first argument shape types parameters.

Type parameters​

NameType
TActivityextends (input: any) => Promise<any>

Properties​

description​

• description: string

Tool description shown to the model.


name​

• name: string

Activity name — must match the registered Activity on the Worker.


parameters​

• parameters: JsonObjectSchema<ActivityInput<TActivity>>

Explicit JSON schema for the tool parameters (not Zod).