Skip to content

Build Custom Opal Agents

⏱ 30 minutes advanced
📜AdvancedOpal

Without agents, you manually configure tools, write detailed prompts, and repeat context every time you need Opal to perform a task. Agents encode these workflows into reusable assistants. Build one once, and every team member benefits from consistent, optimized output.

Opal provides three types of agents, each suited to different levels of complexity.

Pre-built by Optimizely, these agents handle common tasks like content review, competitive analysis, and campaign summarization. Browse and install them from the Agent Directory tab in the Opal app.

Each directory agent includes a description, the tools it uses, and configuration options you can adjust after installation.

Custom-built for your organization, specialized agents control which tools they access and follow specific instructions you define. They operate in a single-shot model — you provide a request, and the agent delivers a result.

Use specialized agents when you need:

  • Fine-tuned workflows for unique business processes
  • Consistent output format across team members
  • Domain-specific context that general chat does not have

Workflow agents coordinate multi-step processes that may involve other specialized agents. They process natural language to accomplish complex sequences — for example, retrieving data, generating content, and scheduling publication in a single flow.

  1. Navigate to home.optimizely.com
  2. Select your organization
  3. Click Opal
  4. Click Agents
  5. Select the Your Agents tab to see agents you have created or installed
  1. In the Opal app, navigate to Agents
  2. Click Create Agent and select Specialized Agent
  3. Configure the following:

Give the agent a clear name that describes its function (for example, “Product Description Writer” or “Campaign Brief Generator”). The description helps team members understand when to use it.

Write detailed instructions that define the agent’s behavior. Think of these as guidance you would give a team member:

  • State the objective or goal
  • Describe the execution steps or process
  • Specify response format (prose, bullet points, structured fields)
  • Set constraints and safety measures (for example, never mention competitors by name)

Define placeholders for information that changes with each execution. For example, a product description agent might accept product_name, target_audience, and key_features as input variables.

Select which tools the agent can access. Limit tools to only what the agent needs — this follows the principle of least privilege and prevents unexpected behavior.

Control the reasoning depth for agent responses:

LevelBest for
QuickSimple questions, fast basic responses
StandardEveryday tasks, reliable answers
BalancedEveryday tasks needing additional reasoning
ComplexAdvanced planning and analysis
ProMaximum depth for nuanced challenges
CodeCode writing, explaining, and debugging

Define the expected output format: Text, Number, Boolean, Array, or JSON. For JSON output, provide a schema to ensure structured responses. Output configuration is especially important when the agent feeds into workflow agents.

After running your agent a few times, designate up to five execution outputs as preferred examples. Opal uses these benchmarks to generate a Quality Score (0-100) for subsequent runs, helping you measure and maintain output quality.

  1. Navigate to Agents and click Create Agent
  2. Select Workflow Agent
  3. Define the trigger conditions — what events or requests activate this workflow
  4. Add steps that chain specialized agents, tools, or actions together
  5. Configure handoff logic between steps
  6. Test the full workflow end-to-end

You can activate any agent through two methods:

  • Mention — Click “Mention Agent” in the chat interface or type @AGENT_ID
  • Automatic selection — For default agents, Opal automatically selects the appropriate one based on your request

The agent displays its execution steps and delivers results in canvas elements or inline text.

  1. Navigate to Opal > Agents > Your Agents
  2. Click the agent name or select More (…) > Edit Agent
  3. Modify instructions, tools, input variables, or creativity settings
  4. Save your changes

After publishing an agent:

  • Review execution logs under the agent’s Logs tab to see inputs, outputs, and quality scores
  • Track credit consumption per agent
  • Collect feedback from team members and refine instructions
  • Set up evaluations with preferred output examples to automate quality scoring
Use caseAgent nameWhat it does
Content teamBlog Post DrafterGenerates blog drafts from a topic and keywords
MarketingCampaign Brief GeneratorCreates structured briefs from campaign goals
ProductRelease Notes WriterGenerates customer-facing notes from development tickets
SEOMeta Description OptimizerGenerates optimized meta descriptions for CMS pages
ComplianceLegal Review AgentReviews content against regulatory requirements
Social mediaSocial AdapterConverts blog posts into platform-specific social content