Build Custom Opal Agents
Why build custom agents
Section titled “Why build custom agents”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.
Agent types
Section titled “Agent types”Agent Directory agents
Section titled “Agent Directory agents”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.
Specialized agents
Section titled “Specialized agents”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
Section titled “Workflow agents”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.
Access your agents
Section titled “Access your agents”- Navigate to home.optimizely.com
- Select your organization
- Click Opal
- Click Agents
- Select the Your Agents tab to see agents you have created or installed
Create a specialized agent
Section titled “Create a specialized agent”- In the Opal app, navigate to Agents
- Click Create Agent and select Specialized Agent
- Configure the following:
Name and description
Section titled “Name and description”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.
Instructions
Section titled “Instructions”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)
Input variables
Section titled “Input variables”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.
Inference level
Section titled “Inference level”Control the reasoning depth for agent responses:
| Level | Best for |
|---|---|
| Quick | Simple questions, fast basic responses |
| Standard | Everyday tasks, reliable answers |
| Balanced | Everyday tasks needing additional reasoning |
| Complex | Advanced planning and analysis |
| Pro | Maximum depth for nuanced challenges |
| Code | Code writing, explaining, and debugging |
Output configuration
Section titled “Output configuration”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.
Preferred output examples
Section titled “Preferred output examples”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.
Create a workflow agent
Section titled “Create a workflow agent”- Navigate to Agents and click Create Agent
- Select Workflow Agent
- Define the trigger conditions — what events or requests activate this workflow
- Add steps that chain specialized agents, tools, or actions together
- Configure handoff logic between steps
- Test the full workflow end-to-end
Use agents in Opal Chat
Section titled “Use agents in Opal Chat”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.
Edit an agent
Section titled “Edit an agent”- Navigate to Opal > Agents > Your Agents
- Click the agent name or select More (…) > Edit Agent
- Modify instructions, tools, input variables, or creativity settings
- Save your changes
Monitor agent performance
Section titled “Monitor agent performance”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
Agent ideas by use case
Section titled “Agent ideas by use case”| Use case | Agent name | What it does |
|---|---|---|
| Content team | Blog Post Drafter | Generates blog drafts from a topic and keywords |
| Marketing | Campaign Brief Generator | Creates structured briefs from campaign goals |
| Product | Release Notes Writer | Generates customer-facing notes from development tickets |
| SEO | Meta Description Optimizer | Generates optimized meta descriptions for CMS pages |
| Compliance | Legal Review Agent | Reviews content against regulatory requirements |
| Social media | Social Adapter | Converts blog posts into platform-specific social content |