Create a workflow agent from scratch

  • Updated

Workflow agents in Optimizely Opal connect multiple specialized agents into a single automated process.

Access your agents

  1. Go to home.optimizely.com.
  2. Select your organization.
  3. Click Opal.

    Screenshot of the Optimizely home page showing the Opal option in the navigation
  4. Click Agents.

    Screenshot of the Agents page in Opal where the list of agents is displayed
  5. Click the Your Agents tab.

    Screenshot of the Agents page in Opal where the Your Agents tab is selected

Create a workflow agent from scratch

  1. Follow the steps in the Access your agents section.
  2. Click Add Agent > Workflow Agent.

    Screenshot of the Add Agent menu in Opal showing the Workflow Agent option
  3. Enter a Name.
  4. (Optional) Toggle Active on or off. 
    • On – The workflow agent can be executed.
    • Off – The workflow agent cannot be executed. This is helpful while you are still developing the agent.
  5. Enter a unique Id. The field displays Available to confirm the Id is not already in use.
  6. Add a Description. The description explains what the workflow agent does and when collaborators should use it.
  7. Click Apply.

    Screenshot of the new workflow agent configuration screen in Opal showing the Name, Active toggle, Id, and Description fields after clicking Apply

Configure your workflow agent

The following example shows how to connect a simple trigger and a specialized agent. A trigger is an event or condition that starts the workflow agent. See Workflow triggers for information.

  1. Drag and drop a Scheduler trigger into the workspace.
  2. Configure the Scheduled Trigger as needed. See Workflow agent triggers for information. 
  3. Click Save.
  4. Drag and drop a specialized agent from the Agents section into the workspace or click Create new specialized agent. See Create a specialized agent.

    Specialized agents run in single-turn mode when used in a workflow agent, regardless of how they are configured. Workflow agents do not support multi-turn conversation. See Specialized agents overview for information on interaction modes.
    Screenshot of the workflow agent builder in Opal showing a specialized agent added to the workspace
  5. (Conditional) Decide how every input variable gets its value for every specialized-agent step in a workflow (if the agent has input variables):

    File variables are automatic. The workflow agent determines them at runtime, so you cannot set a fixed value.
    1. Fixed – You provide the value, and the step uses it on every run.
    2. Automatic – The workflow agent determines the value at runtime from the conversation and prior step outputs.

      Screenshot of a specialized agent details in a workflow agent with the input variables highlighted.
  6. Click the Scheduler trigger's connector circle. Screenshot of the workflow agent builder in Opal showing the connector circle on the Scheduler trigger selected
  7. Drag the connector to the Agent.

    Screenshot of the workflow agent builder in Opal showing the connector being dragged from the Scheduler trigger to the specialized agent
  8. Click Update.

    Screenshot of the workflow agent builder in Opal showing the Scheduler trigger connected to the specialized agent after saving
  9. Repeat steps 4–8 to build out your workflow agent, but link each agent instead of the trigger. See Add logic to your workflow agent and Add a nested workflow for how to add additional features to your workflow agent.

Add logic to your workflow agent

Logic elements, such as Conditions and Loops, let you build dynamic and automated workflows. These optional elements let workflows adapt to conditions and repeat actions.

Screenshot of the workflow agent builder in Opal showing the Logic section with Condition and Loop elements available to add to the workspace

Opal has the following Logic elements:

  • Condition – Make decisions based on specific criteria, directing the workflow down different paths.
  • Loop – Repeat a series of actions for each item in a specified collection, automating repetitive tasks.

To incorporate conditions or loops into your workflow, drag and drop the desired logic element from the workflow builder Components. For instructions, see conditions and loops.

Add a workflow agent as a step

Add a workflow agent as a step inside another workflow agent. Nesting lets you build small, focused workflows and combine them into larger ones. Reuse a common sub-flow, such as content review or approval routing, instead of rebuilding it in every workflow.

Add a nested workflow

Complete the following steps in Opal:

  1. Follow the steps in the Access your agents section and open the workflow agent you want to edit in the workflow builder. 
  2. Drag and drop a workflow agent as a step, the same way you add a specialized-agent step. See step 4 in the Configure your workflow agent section.

The step's Details tab shows read-only information about the selected workflow. The View Agent link opens the full workflow in a new tab.

Any workflow agent in your instance is eligible. The nested workflow needs no special trigger or configuration. When the parent workflow reaches the step, Opal runs the selected workflow directly. Opal passes the step's message and the parent's context to that workflow, and the nested workflow's output returns to the parent.

How nested runs display in the execution logs

Keep the following in mind when nesting workflow agents:

  • The nested workflow displays as a step in the parent's execution log, with its name and status. 
  • The step links to the nested workflow's own execution log, so you can open it for full details.
  • If the nested workflow fails, the parent step shows as failed with the nested workflow's error message.
  • The nested run also displays in the nested workflow's own run history, tagged Started by [PARENT_WORKFLOW_NAME].

See Workflow agent logs.

Limits and safeguards

  • A workflow cannot reference itself, and a chain of workflows cannot loop back to its first workflow. Opal blocks these configurations when you save.
  • Workflows can be nested up to three levels deep (a parent, its child, and a grandchild).
  • A workflow used as a step in other workflows cannot be deleted until you remove it from them.

View an agent's details from the workflow agent builder

Click an individual agent to view its details directly from the workflow agent builder.

Screenshot of the workflow agent builder in Opal showing an individual agent selected with its details panel open

Select the Agent Details tab to view the agent's information. Click View Agent to open a new window with the agent details where you can edit your agent.

Screenshot of the agent details panel in the workflow agent builder showing the Agent Details tab and View Agent option

If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See Turn generative AI off across Optimizely applications.