Optimizely Opal administrators can create specialized agents using Opal. Specialized agents are purpose-built AI agents you create that complete a single, well-defined task. See Specialized agents overview for information.
Access your agents
- Go to home.optimizely.com
- Select your organization.
-
Select Opal.
-
Click Agents.
-
Select the Your Agents tab.
Create a specialized agent from scratch
Initial configuration
- Follow the steps in the Access your agents section.
-
Click Add Agent and select Specialized Agent.
- Enter a Name.
-
Enter a unique Id. The Id (prefixed with @) invokes the specialized agent. Users in Opal Chat or within a workflow agent invoke the specialized agent using the Id. Ensure the Id is unique and displays as Available. If the Id is already in use, Opal suggests a few available options instead. Click on a suggestion to auto-fill the Id field.
- Add a Description. The description explains what the specialized agent is designed to do and when collaborators should use it. This helps others understand the specialized agent's purpose at a glance.
- (Optional) Toggle Enabled in Chat on or off. Default is On.
- On means the agent displays and users can call it in Opal Chat.
- Off means the agent does not display nor can users call it in Opal Chat. The agent is still available to be added to a workflow agent.
Configure the prompt template
Enter your Prompt Template. The prompt template defines how the specialized agent behaves and responds. When entering your Prompt Template in the WYSIWYG editor, keep the following in mind:
- Write in clear, direct language.
- Build a clear information hierarchy to help the specialized agent follow your instructions accurately.
-
Use proper structure (headers, bold, and lists) to outline information.
-
Double click on text to bring up the text editor.
-
Drag and drop text items to rearrange your prompt.
Additional prompt template configuration
You can add additional information to your prompt template to help Opal create output.
- (Optional) Specify input variables in double square brackets, such as
[[WEBSITE_URL]]or[[COMPANY_NAME]].- Variables are input parameters that the specialized agent references each time it runs.
- Each variable must be defined in the Variables section. See Define input variables
- You can add variables by entering / or [ in the prompt template and selecting variables already defined in the Variables section or click Create variable to create one.
- (Optional) Declare tools using backticks, for example,
`TOOL_NAME`or`search_web`. Tools are optional, but for a more deterministic and controlled output, you should explicitly define when and how the tool should be used in the prompt template.- Tools extend what Opal can do, such as executing actions or pulling information from other services.
- Each tool must be defined in the Tools section. See Define tools (optional).
-
You can add tools by entering / or ` in the prompt template and selecting tools already defined in the Tools section or click Add tool to add them.
-
(Optional) Specify instructions using curly braces and a description of which instructions Opal should call. Instructions are repeatable context and guidelines to tailor Opal's responses to your organization. For example,
{instruction: description of which instruction to use}{instruction: tell me about the company, its products, target personas, key competitors, existing keywords}
You can add instructions by entering / or { in the prompt template and clicking Add instructions. This prepends
{instruction: }in the prompt template where you can easily add your instruction.The specialized agent then leverages the corresponding instructions that have a matching when to use field.
-
(Optional) Reference data through Retrieval-Augmented Generation (RAG). RAG lets Opal access and query connected knowledge sources. For a list of available RAG sources, see Retrieval-Augmented Generation (RAG) overview.
Optimizely Opal RAG is available upon request. Contact your Customer Success Manager for information.To include data from a connected RAG system in your specialized agent, complete one of the following:
- Inject the data and context directly into the prompt template.
-
{retrieval: query of data to retrieve}– Returns text information from RAG. -
{retrieval+: query of data to retrieve}– Returns text and file information from RAG.
-
- Retrieve the data through a tool call. See RAG tools for information.
- Add the
search_application_datatool to the agent. See the Define tools (optional) section. - Specify how the tool should be used in the prompt template using
`search_application_data`. See the previous step two.
- Add the
- Inject the data and context directly into the prompt template.
Define input variables (optional)
Variables are placeholders for input provided by the user when the specialized agent runs. They let you reuse the same specialized agent with different inputs. For example, for a specialized agent named SEO Keyword Research, define a variable, such as topic, to research different topics without recreating the agent.
To create variables complete the following:
-
Click Add Variable.
- Select the Type (String, Boolean, Number, Datetime, Object, or File).
- Enter a Name. You reference this name in the Prompt Template. Variable names are case-insensitive and cannot be duplicated.
- Add a Description. A simple description of the variable helps Opal understand how it works.
-
(Optional) Select Required? if the variable must be provided each time the specialized agent runs.
If you add variables to the Variables section, but do not reference them in the prompt template, a message saying, Not in use displays:
If you try to Save the specialized agent with variables still not in use, an alert displays. You can decide to save the specialized agent anyway or go back and add the variable in the prompt template.
Define tools (optional)
Tools extend what Opal can do, such as executing actions or pulling information from other services.
If you referenced tools in the Additional configurations in the prompt template section without adding them, complete the following in the Tools section:
- Click Add tool.
-
(Optional) Click on a tool to see its description.
- Select the checkboxes for the tools you referenced. You can also select the textbox for a section to add all of those tools.
-
Click Add selected.
Select the inference level
The Inference Level setting controls how much reasoning or "brainpower" Opal applies. Each level has varying budgets for thinking, meaning how much effort Opal spends reasoning before giving you an answer. High levels take more time, but provide deeper reasoning and detail. Select one of the following options:
| Inference level | Best for | Response style | Example user prompt |
|---|---|---|---|
| Quick | Simple questions or tasks. | Fast, basic responses. | Give me a short headline variation for this landing page. |
| Standard | Everyday tasks. | Reliable answers. | Summarize last week's web analytics report for the team newsletter. |
| Balanced | Everyday tasks needing more reasoning. | Reliable answers with additional reasoning. | Summarize last week's web analytics reports for the team newsletter. |
| Complex | Advanced planning and analysis. | Advanced reasoning and detail. | Build a step-by-step plan for A/B testing our checkout flow, including metrics to track and rollout strategy. |
| Pro | Toughest or most nuanced challenges. | Maximum reasoning depth. | Evaluate whether to run personalization or multivariate testing for our product recommendation carousel, taking into account traffic volume, statistical significance, and long-term revenue impact. |
| Code | Writes, explains, and debugs code. | Technical output (code or explanations). | Write a JavaScript snippet to trigger an Optimizely experiment on product detail pages when users scroll 50% down. |
Set the creativity (deprecated)
The Creativity setting has been removed from the specialized agent configuration. Newer AI models no longer support user-configuration of this.
To control how creative or predictable your agent's responses are, use your agent's Prompt Template. For example,
- For predictable, consistent output – Include prompts like Respond in a factual, concise tone. Avoid speculation.
- For more creative, varied output – Include prompts like Be creative and exploratory in your responses. Offer multiple perspectives.
Add files (optional)
Upload files in the Files section for the specialized agent to reference each time you invoke it. For example, the files could include an output template or contain data that the specialized agent needs to reference. The files can include anything you want to feed for the logic of the agent.
- Expand the Files section.
-
Click Add File.
- Select the relevant files from your computer.
- Click Upload.
See Supported file types in Optimizely Opal.
Configure output
You can specify the format of the output after the specialized agent executes.
- Expand the Output section.
- Select the Output Data Type. This specifies the format of the output after the agent executes.
- Text
- Number
- Boolean
- Array
- JSON
- (Optional) Enter a Description explaining the expected output of the prompt. This is helpful when specialized agents are used within workflow agents.
- (Optional) Enter the JSON schema for the output in the Output Schema field, if you selected JSON as the Data Type in step two.
Save and test
- Click Save to create your specialized agent.
- (Optional) Click Test Run to try out your specialized agent. See Test an agent.
Your specialized agent is created.
Add preferred output examples (optional)
After running your specialized agents a few times, you can add good examples as preferred outputs to help Opal evaluate its responses. You can add up to five examples. See Preferred output examples for information on what they are and how to add them.
You can also add example shots to your prompt template after running your agents and gathering good output. Example shots are a package of input, output, and optionally tool calls, derived from preferred outputs and formatted in XML, directly within your prompt template. This technique injects these structured examples when the agent runs, influencing its output toward the provided examples.
Configure a specialized agent from JSON
Create a specialized agent by pasting its JSON configuration. Use this when you need the same agent across multiple Opal instances or want to share it with other teams.
Export a specialized agent as JSON
See the Export an agent as JSON section in the Manage installed agents documentation.
Import a specialized agent from JSON
- Follow the steps in the Access your agents section.
- Click Add Agent and select Import Agent.
- Paste the agent's JSON from the Export a specialized agent as JSON section.
- (Optional) Toggle Overwrite existing agents on to replace specialized agents with matching names, or off to keep the current agents and create new ones instead.
-
Click Import Agent.
Next steps
- See Manage specialized agents for information on editing and deleting agents.
- See Default agents overview for a list of agents automatically available in your Opal instance.
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.
Article is closed for comments.