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

  1. Go to AI Agent Studio.
  2. From the Workflows tab, edit a workflow and add a Reference Block node to it.
  3. Enter a name and description for the reference block. The code is automatically populated based on the name.
  4. Select an error handler node to define failure handling.
  5. Add any required parameter names and their data types.
  6. 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

  1. From the Workflows tab of AI Agent Studio, edit a workflow and add a Reference node to it.
  2. Enter a name and description for the reference node. The code is automatically populated based on the name.
  3. Select an error handler node to define failure handling.
  4. From the Reference Block list, select the reference block that you want to use.
  5. Add the input values required by the reference block.
  6. Leave the output schema blank so that the node can use the output of the reference block.
  7. Publish the workflow.

When the workflow runs, the reference node runs the selected reference block and returns the output to the calling node.