Create a specialized agent

  • Updated

Specialized agents are custom agents you configure to perform specific tasks in Optimizely Opal. An agent's behavior is determined by its prompt template (instructions it follows), tools (actions it can take), and variables (inputs provided at runtime). 

Create a specialized agent when you want something that completes a single, well-defined task. For information on each component and when to use each option, see Specialized agents fundamentals and best practices.

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 specialized agent from scratch

Initial configuration

Complete the following steps to name and describe your specialized agent.

  1. Follow the steps in the Access your agents section.
  2. Click Add Agent.
  3. Select Specialized Agent.Screenshot of the Add Agent menu in Optimizely Opal where Specialized Agent is selected as the agent type
  4. Enter a Name.
  5. Enter a unique Id. The Id (prefixed with @) invokes the specialized agent. Ensure the Id displays as Available. If the Id is already in use, Opal suggests a few available options instead. Click a suggestion to autofill the Id field.

    Screenshot of the Id field in a specialized agent showing the Available status
  6. Add a Description.

Configure interaction mode

Specialized agents support two interaction modes, single-shot and multi-turn, each described in the following configuration steps:

  1. Toggle Support multi-turn conversation on or off. Default is Off. Single-shot agents run once and return a result. Multi-turn agents remain active for continued back-and-forth conversation.
    • On – Multi-turn mode. The agent stays active in Opal Chat for follow-up conversation.
    • Off – Single-shot mode. The agent runs once and returns a final result.
  2. Toggle Trigger from Chat on or off. Default is On.
    • On – The agent is visible in Opal Chat and available to invoke.
    • Off – The agent does not display in Opal Chat and users cannot invoke it from there. It is still available in workflow agents.
Screenshot of the interaction mode toggles in a specialized agent

Configure the prompt template

The prompt template defines the instruction set the specialized agent applies every time it runs.

  1. Enter your Prompt Template. For guidance on structuring your prompt, see Write prompts for specialized agents.

    Screenshot of the Prompt Template field filled out in a specialized agent
  2. If you toggled Support multi-turn conversation on, expand Multi-turn Conversation Settings.

    1. (Optional) Update the System Prompt.
    2. Set the Memory Token Limit (the maximum amount of conversation history the agent retains) by moving the slider or entering a value. For guidance on which limit to choose, see Specialized agents fundamentals and best practices.
    Screenshot of the System Prompt and Memory Token Limit fields in a multi-turn specialized agent

Define input variables (optional)

When you invoke a multi-turn agent in chat, Opal collects your Variables first. Opal then injects those values into your prompt template to start the conversation.

For information on variables, see Specialized agents fundamentals and best practices. To create variables, complete the following:

  1. Click Add Variable.

    Screenshot of the Add Variable option in the Variables section of a specialized agent
  2. Select the Type (String, Boolean, Number, Datetime, Object, or File).
  3. Toggle Accept multiple values on to let users add multiple values for a single variable. This is helpful for batch operations or multi-file workflows.
    • Enter or use the arrows to select the Minimum items. If you select Required?, the Minimum items must be at least one.
    • (Optional) Enter or use the arrows to select the Maximum items. Leave this empty for no upper limit.
  4. Enter a Name. Variable names are case-insensitive and cannot be duplicated.
  5. Add a Description.
  6. (Optional) Select Required? if users must provide this variable each time the specialized agent runs.
  7. Click Save variable.

    Screenshot of the Add variable screen with an example csv_files variable configured.

Variables not referenced in the prompt display a Not in use message.

Screenshot of the Variables section in a specialized agent showing a Not in use warning beside an unreferenced variable

If you try to Save the specialized agent with variables still not in use, an alert displays. Save the specialized agent anyway, or return to the prompt and add the variable.

Screenshot of the unused variable confirmation dialog in a specialized agent prompting the user to save anyway or return and add the variable to the prompt

Define tools (optional)

If you referenced tools in the prompt without adding them to the agent, add them automatically or manually.

Automatically

Select Enable automatic tool prediction to let Opal predict and add relevant tools based on user queries and conversation history.

Screenshot of creating a specialized agent in the tools section with Enable automatic tool prediction highlighted

Opal merges predicted tools with manually configured tools.

Manually

To manually select which tools the agent can use, complete the following steps:

  1. Click Add tool.
  2. (Optional) Click a tool to see its description.

    Screenshot of the tool selection panel in a specialized agent showing available tools organized by section with checkboxes
  3. Select the checkboxes for the tools you referenced.
  4. (Optional) Select the checkbox next to a section heading to add all tools in that section.
  5. Click Add selected.

    Screenshot of the tool selection panel in a specialized agent with tools selected and the Add selected button highlighted

For information on tools, see Tools overview.

Select the inference level

The inference level controls how extensively Opal reasons through the prompt before generating a response. Higher levels improve output quality for complex tasks but takes longer to complete.

  1. Click the Inference Level drop-down list.
  2. Select an Inference Level.
  3. (Optional) Filter the list.

    Screenshot of the Inference Level drop-down list in a specialized agent showing the available inference level options.

Add files (optional)

Upload files in the Files section for the specialized agent to reference each time you invoke it. For example, files can include an output template or data the specialized agent needs to reference.

  1. Expand the Files section.
  2. Click Add File.

    Screenshot of the Files section in a specialized agent showing the Add File option
  3. Select the relevant files from your computer.
  4. Click Upload.
Multi-turn specialized agents support one file in the Files section.

See Supported file types in Optimizely Opal.

Configure output

Specify the format of the output the specialized agent returns.

  1. Expand the Output section.
  2. Select the Output Data Type.
  3. (Optional) Enter a Description explaining the expected output of the prompt. The output description is useful when you use this agent within a workflow agent.
  4. (Optional) Enter the JSON schema for the output in the Output Schema field, if you selected JSON as the Data Type in step 2.

Save and test

Save the agent to finish creating it, then run an optional test to verify the configuration.

  1. Click Save to create your specialized agent.
  2. (Optional) Click Test Run to test your specialized agent. See Test an agent.

Your specialized agent is ready to use.

Add preferred output examples (optional)

After running your specialized agent, add examples as preferred outputs to help Opal evaluate its responses. Add up to five examples. For details on adding and managing examples, see Preferred output examples.

Next steps

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.