prepareStep
A hook function in AI SDK Agent workflows that allows developers to dynamically adjust the configuration of each step before it executes, including model parameters, tool sets, and runtime context.
Timeline (last 90 days)
After the fix f3d7a10, WorkflowAgent passes the runtimeContext returned by prepareStep to that step's approval policy, instead of continuing to use the context from when the call started.
prepareStep is a hook for Agent workflows in the AI SDK that allows developers to dynamically adjust a step's configuration before each step executes, including model parameters, tool sets, and runtimeContext.
The semantics of WorkflowAgent's prepareStep return value have been aligned: the returned instructions (or the deprecated system) replace the current step's instructions and propagate onward, providerOptions are merged with the agent options, and headers override the call's own headers.
All Facts (3)
After the fix f3d7a10, WorkflowAgent passes the runtimeContext returned by prepareStep to that step's approval policy, instead of continuing to use the context from when the call started.
50%UnverifiedprepareStep is a hook for Agent workflows in the AI SDK that allows developers to dynamically adjust a step's configuration before each step executes, including model parameters, tool sets, and runtimeContext.
50%UnverifiedThe semantics of WorkflowAgent's prepareStep return value have been aligned: the returned instructions (or the deprecated system) replace the current step's instructions and propagate onward, providerOptions are merged with the agent options, and headers override the call's own headers.
50%