Add a Reference Block to a Reference Node of Workflows
Reference blocks define reusable logic in agentic workflows.
You can include artifacts such as agents, LLMs, tools, and other workflow nodes in a reference block, associate the block with a reference node, and reuse that logic multiple times in a workflow. When the workflow runs, the reference node uses the logic defined in the reference block.
Create a reference block
- Go to AI Agent Studio.
- From the Workflows tab, edit a workflow and add a Reference Block node to it.
- Enter a name and description for the reference block. The code is automatically populated based on the name.
- Select an error handler node to define failure handling.
- Add any required parameter names and their data types.
- Add the nodes and logic that you want to reuse within the workflow.
The reference block is now available for use by reference nodes in the workflow.
Associate a Reference block with a Reference Node
- From the Workflows tab of AI Agent Studio, edit a workflow and add a Reference node to it.
- Enter a name and description for the reference node. The code is automatically populated based on the name.
- Select an error handler node to define failure handling.
- From the Reference Block list, select the reference block that you want to use.
- Add the input values required by the reference block.
- Leave the output schema blank so that the node can use the output of the reference block.
- Publish the workflow.
When the workflow runs, the reference node runs the selected reference block and returns the output to the calling node.