Agent Roles
Roles define an agent's purpose and influence how the gateway routes messages. Hybrix ships with several built-in roles, and you can define custom ones.
Built-in roles
| Role ID | Label | Description |
|---|---|---|
| general-assistant | General Assistant | All-purpose helper for Q&A, conversation, and everyday tasks |
| code-reviewer | Code Reviewer | Analyzes code for bugs, security issues, and style improvements |
| researcher | Researcher | Deep web research, summarization, and fact-checking |
| writer | Writer | Creative and technical writing, editing, and formatting |
| devops | DevOps Engineer | Infrastructure, deployment, CI/CD, and monitoring tasks |
| data-analyst | Data Analyst | Data processing, visualization suggestions, and insights |
| tutor | Tutor | Patient explanations, step-by-step walkthroughs, and learning guidance |
| project-manager | Project Manager | Task coordination, scheduling, and status updates |
How roles affect behavior
Each built-in role comes with a default system prompt optimized for that function. When you assign a role, the agent automatically gets tone, formatting preferences, and behavioral guidelines suited to its job.
Roles also influence routing priority. When using role-based routing, the gateway matches incoming message keywords against role descriptions to find the best agent. A question about “pull request review” naturally routes to a code-reviewer.
You can override the default system prompt by setting a custom one in the agent config. The role still affects routing even with a custom prompt.
Custom roles
Define custom roles by using any string as the role ID along with a systemPrompt and routingKeywords:
{
"name": "Finn",
"role": "finance-advisor",
"systemPrompt": "You are Finn, a finance-focused agent. You help with budgeting, expense tracking, and financial planning. Always disclaim that you are not a licensed financial advisor.",
"routingKeywords": ["budget", "expense", "invoice", "payment", "finance"],
"provider": "anthropic",
"model": "claude-sonnet-4-20250514"
}routingKeywords array helps the role-based router match messages to your custom role. Include 5-10 representative keywords for best results.