←Back/Product/OpenClaw/ElevenLabs
AdvancedProduct

Improve AI Agent Reliability by Creating Narrowly-Scoped Specialists

When an agent repeatedly confuses contexts, create a specialist with a narrow role and test whether the orchestrator delegates the right tasks.

Improve AI Agent Reliability by Creating Narrowly-Scoped Specialists
Source episode · 10:22How I Built a Personal AI Chief of Staff With OpenClaw

with Claire Vo

It will keep apologizing to me, but it will keep making the mistake. That is when I said, 'Okay, this is a separate thing.' One person who just knows how to do voice calling great, know how different personas, put easier into the different categories who they are calling and basis who they are calling, they will get that kind of a persona out.

Before you start

About 90 minutes

What you need

  • A general-purpose agent that is demonstrably failing at a recurring, context-dependent task.
  • A clear definition of the task, its various contexts, and the desired behaviors for each context.

What you’ll make

A new, specialist agent that performs the specific task more reliably. An orchestrator agent that correctly routes relevant tasks to the new specialist.

Tools used

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

5 steps

Step 01

Step 1: Identify a Recurring Failure Pattern

Observe where your main agent repeatedly fails at a specific task despite corrections. The source example is an agent using the wrong persona for different types of phone calls (e.g., calling a restaurant vs. a coworker).

This pattern is common for tasks that require different tones, personas, or rule sets depending on the context.

Step 02

Step 2: Create a New Specialist Agent

In your agent framework (e.g., OpenClaw), create a new, separate agent instance that will be dedicated to the single, problematic task.

Give the agent a descriptive name, like 'Voice Call Specialist' or 'Email Triage Agent'.

Step 03

Step 3: Write a Narrowly-Scoped 'Soul File'

Write a new set of core instructions for the specialist. This 'soul file' should be hyper-focused on its one job. For a voice-calling agent, define the different personas it must adopt.

Example prompt
You are a voice calling specialist. When calling a restaurant for a reservation, be polite and formal. When calling a coworker for a status update they missed on Slack, be brief, professional, and direct.

The source describes this as creating categories for who the agent is calling and defining a persona for each.

Step 04

Step 4: Update the Orchestrator Agent

Modify the instructions of your main (orchestrator) agent to delegate the specific task to the new specialist, rather than attempting it itself.

Example prompt
When I ask you to make a phone call or 'call someone', you must route this request to the 'Voice Call Specialist' agent and await its summary.

This turns your main agent into a router for complex tasks, improving overall system design.

Step 05

Step 5: Test the Full Loop

Give the main orchestrator a command that should be routed to the specialist. Verify that the task is delegated correctly and that the specialist performs it according to its specific instructions.

Test all contexts defined in the specialist's soul file (e.g., test a restaurant call and a coworker call) to ensure it switches personas correctly.

What good looks like

  • The specialist agent successfully performs the task without the context-confusion errors exhibited by the general agent.
  • The main orchestrator agent correctly routes the task to the specialist.
  • The overall system reliability for the specific task is measurably improved.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

Runbook notes

How to recover when the loop fails and where human judgment helps.

If it goes sideways

The orchestrator agent fails to route the task to the new specialist and attempts to do it itself.
Review and refine the orchestrator's 'master soul file' to make the routing rules more explicit. Ensure it understands which trigger phrases or task types belong to the specialist.
The specialist agent still performs poorly or confuses contexts.
The instructions ('soul file') for the specialist may still be too broad. Refine its instructions to be even more specific about its role, persona, and boundaries for each sub-task.

Human checkpoints

Let routine work keep moving.

  1. Before deployment, thoroughly review the specialist agent's core instructions ('soul file') to ensure its defined personas, rules, and boundaries are correct and safe for its intended task.

Start shipping better products.

Join 250,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start · 14-day Pro trial · SOC 2 Type II