Skip to content

Routing & Experts

The assistant uses a multi-stage routing chain to match every message to the right specialist, tools, and model.

The orchestrator classifies incoming messages using keyword heuristics:

  1. Casual patterns — greetings, thanks, yes/no get a direct response (no agent spawned)
  2. Task keywords — matched against 12 categories with scoring (multi-word keywords get 1.5x weight, score >= 1.5 is high confidence)
  3. Ambiguous — falls through to LLM decision
User message
Classifier (keyword matching)
Role (determines tools + system prompt)
= Topic (determines which model)
Model Registry: getModelForTopic(topic)
Agent spawned with: role tools + topic model + expert prompt + skills

Topic = Role. Every role has a matching topic with the same name. Assigning a model to a topic means that model is used for all agents with that role.

Role / TopicToolsUse Case
generalfilesystem, browser-ext, websearch, messaging, knowledge, scheduling, profiles, email-processor, mcpMulti-purpose, browsing, messaging
codingfilesystem, shell, git, knowledge, mcpCode generation, debugging, git
researchbrowser, browser-ext, websearch, knowledge, filesystem, profiles, mcpWeb search, investigation
architecturefilesystem, shell, knowledge, websearch, mcpSystem design, specs
reviewfilesystem, shell, git, knowledgeCode review, linting (read-only)
qabrowser, browser-ext, shell, docker, filesystem, knowledgeTesting, bug reports
communicationgoogle-workspace, microsoft365, messaging, scheduling, profiles, email-processor, voiceEmail, calendar, calls
designbrowser, filesystemUI/UX design, mockups
devopsshell, docker, git, filesystem, mcpCI/CD, Docker, infrastructure
securityshell, filesystem, browser, browser-ext, websearch, knowledge, mcpVulnerability analysis
datashell, filesystem, knowledge, mcpDatabases, SQL, data pipelines
aishell, filesystem, browser, browser-ext, websearch, knowledge, mcpML/AI, RAG, model training
financebrowser, websearch, filesystemFinancial analysis
automationshell, docker, filesystem, scheduling, mcpCron tasks, hooks, workflows
pmfilesystem, messagingProject planning, tracking
writingfilesystem, browser, websearch, knowledge, messagingDocumentation, technical writing

These are used for model capability routing only:

TopicPurpose
chatCasual conversations (orchestrator direct response)
embeddingVector embeddings (knowledge base)
ocrText extraction from images
visionImage understanding
voicePhone call conversations (low latency)
"Fix the login bug in auth.ts"
→ coding role → filesystem, shell, git tools
"Search the web for React best practices"
→ research role → browser, websearch tools
"Deploy the Docker container to production"
→ devops role → shell, docker, git tools
"Check my Gmail inbox"
→ communication role → google-workspace tools
"Create a daily reminder at 9 AM"
→ automation role → scheduling tool
"Take a screenshot of my browser"
→ general role → browser-ext tool

These patterns override keyword classification:

PatternRoutes ToReason
”use my browser”, “check this website”generalHas browser-ext + messaging
”run tests”, “test suite”qaDiscovers and runs project tests
”review the code”reviewRead-only analysis + linters
”gmail”, “calendar”, “call me”communicationGoogle Workspace + voice
”who is my wife”, “my dog”generalHas profiles tool
”create a schedule”, “every morning”automationBuilt-in scheduling tool

Experts are pre-configured personas with structured prompts, critical rules, deliverable templates, and success metrics. Each expert maps to a role (which determines tools and topic).

ExpertRole/TopicSkills
Codercodingsoftware-architecture, data-structures, database-design, api-design, plugin-development
Reviewerreviewsoftware-architecture, test-automation, security-practices, performance-engineering
Researcherresearchtechnical-writing
UI/UX Designerdesigndesign-principles, design-frameworks
DevOps Engineerdevopsdevops-practices, container-orchestration, cloud-platforms, networking
Security Analystsecuritysecurity-practices, networking, cloud-platforms
Data Engineerdatadatabase-design, data-engineering, performance-engineering
AI Engineeraiai-engineering, machine-learning, data-structures
QA Engineerqatest-automation, performance-engineering
Financial Analystfinancefinancial-analysis
Automation Engineerautomationautomation-patterns, devops-practices
Project Managerpmproject-management, technical-writing
Technical Writerwritingtechnical-writing, api-design
Communicatorcommunication
Generalgeneral
/expert Coder "implement login"
1. Look up "Coder" in experts table → role: "coding"
2. getRoleConfig("coding") → tools: [filesystem, shell, git, ...]
3. getModelForTopic("coding") → model with coding topic assigned
4. Build prompt: security preamble + expert identity + role prompt + rules + skills
5. Spawn worker with role tools + topic model + expert prompt

Works in WebChat, TUI, Telegram, Slack, and Teams. The activeExpertId persists in the session until /expert reset.

Skills are domain knowledge documents (markdown with principles, best practices, anti-patterns) injected into the expert’s system prompt.

SkillUsed By
software-architectureCoder, Reviewer
data-structuresCoder, AI Engineer
test-automationReviewer, QA Engineer
design-principlesUI/UX Designer
design-frameworksUI/UX Designer
devops-practicesDevOps Engineer, Automation Engineer
container-orchestrationDevOps Engineer
security-practicesSecurity Analyst, Reviewer
cloud-platformsDevOps Engineer, Security Analyst
financial-analysisFinancial Analyst
ai-engineeringAI Engineer
automation-patternsAutomation Engineer
database-designData Engineer, Coder
api-designCoder, Technical Writer
project-managementProject Manager
technical-writingResearcher, Project Manager, Technical Writer
performance-engineeringData Engineer, Reviewer, QA Engineer
data-engineeringData Engineer
machine-learningAI Engineer
plugin-developmentCoder
networkingDevOps Engineer, Security Analyst

Pipeline stages specify a topic field that determines both the role (tools) and model:

PipelineStageTopic
Full Development CycleResearch & Discoveryresearch
Full Development CycleRequirements & Architecturearchitecture
Full Development CycleImplementationcoding
Full Development CycleTestingqa
Full Development CycleCode Reviewreview
Full Development CycleQA Validationqa
Full Development CycleSummary & Handoffgeneral
Research & AnalysisDeep Investigationresearch
Research & AnalysisAnalysis & Recommendationsgeneral
Bug FixReproduce & Diagnosecoding
Bug FixImplement Fixcoding
Bug FixVerify Fixcoding

To assign a model to a topic, use the Models page in the web UI:

  1. Click on a model and select Edit
  2. Select the topic(s) this model should handle
  3. The model will be used when agents with that role/topic are spawned

If no model is explicitly assigned to a topic, the default model is used as fallback.