Docs/Agent Roles

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 IDLabelDescription
general-assistantGeneral AssistantAll-purpose helper for Q&A, conversation, and everyday tasks
code-reviewerCode ReviewerAnalyzes code for bugs, security issues, and style improvements
researcherResearcherDeep web research, summarization, and fact-checking
writerWriterCreative and technical writing, editing, and formatting
devopsDevOps EngineerInfrastructure, deployment, CI/CD, and monitoring tasks
data-analystData AnalystData processing, visualization suggestions, and insights
tutorTutorPatient explanations, step-by-step walkthroughs, and learning guidance
project-managerProject ManagerTask 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:

json
{
  "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"
}
The routingKeywords array helps the role-based router match messages to your custom role. Include 5-10 representative keywords for best results.