Octopus
Specialist Agents
Specialist agents are domain-focused Octopus agents designed to handle a narrow class of requests with deep expertise. Each specialist has a tightly scoped system prompt, a focused tool set, and a domain-specific knowledge base.
What Defines a Specialist?
A specialist agent is an ordinary AgentComposite configured for depth, not breadth:
- Narrow system prompt: Only describes the agent's specific domain. No routing instructions.
- Focused tool set: Only the MCP tools relevant to the domain (e.g., HR agent gets HR system tools, not finance tools).
- Domain knowledge base: The semantic memory store is populated only with domain-relevant documents.
- Capability declaration: A structured list of what the agent can and cannot do — used by the orchestrator for routing decisions.
Capability Declaration
Each specialist agent declares its capabilities as structured metadata on the AgentComposite. The orchestrator uses this at routing time:
public class AgentCapabilityDeclaration
{
public List<string> Handles { get; set; } // what this agent handles
public List<string> DoesNotHandle { get; set; } // explicit exclusions
public List<string> IntentExamples { get; set; } // example phrases for embedding routing
public string DomainKeywords { get; set; } // comma-separated keywords for keyword routing
}
// Example: HR Specialist
new AgentCapabilityDeclaration
{
Handles = new() { "leave requests", "payroll queries", "benefits enrollment", "employee onboarding" },
DoesNotHandle = new() { "expense reports", "IT issues", "contract questions" },
IntentExamples = new()
{
"How do I request annual leave?",
"What is my remaining PTO balance?",
"I need to update my bank account for payroll",
"When is the next benefits enrollment window?"
}
}
Example Specialist Configurations
| Specialist | Tools | Knowledge Base | LLM Model |
|---|---|---|---|
| HR Agent | HRSystem MCP tools, Calendar MCP | HR policies, leave guides, payroll docs | claude-sonnet-4-6 |
| Finance Agent | ERP MCP tools, PDF generator | Finance policies, expense guides | claude-sonnet-4-6 |
| IT Support | ServiceDesk MCP, AD MCP | IT runbooks, KB articles | gpt-4o |
| Legal Agent | Document storage MCP | Contract templates, compliance docs | claude-opus-4 |
Specialist System Prompt Structure
// HR Specialist system prompt template
You are Aria, the HR specialist for {{company.name}}.
Your domain: Human Resources — leave management, payroll, benefits, and onboarding.
You have access to the following tools:
- hr_lookup_employee: Look up employee details
- hr_request_leave: Submit a leave request on behalf of an employee
- hr_get_payslip: Retrieve the employee's latest payslip
- hr_benefits_info: Get benefits enrollment information
Do not assist with topics outside HR. If the user's request is outside your scope,
say: "For that topic, please speak with a different specialist."
Always confirm before submitting any data-changing request (leave, payroll updates).
Specialist Design Principle
A well-designed specialist should be able to handle its domain without ever needing to route further. If your specialist is regularly routing elsewhere, its scope boundary is too wide. Narrow it down with more explicit out-of-scope declarations.