hermes - 💡(How to fix) Fix feat: Topic-Aware Subagent Routing — Right Model for the Right Job

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Currently, Hermes uses one model for everything — conversation, research, coding, finance analysis, etc. This means users pay top-tier model costs for simple tasks, and the model may not be the best at that specific domain.

This feature request proposes Topic-Aware Subagent Routing: detect the conversation topic, then delegate research/data-gathering to a specialized subagent using the optimal model for that dimension — while the main agent continues the conversation in the user's preferred language.

Root Cause

Currently, Hermes uses one model for everything — conversation, research, coding, finance analysis, etc. This means users pay top-tier model costs for simple tasks, and the model may not be the best at that specific domain.

This feature request proposes Topic-Aware Subagent Routing: detect the conversation topic, then delegate research/data-gathering to a specialized subagent using the optimal model for that dimension — while the main agent continues the conversation in the user's preferred language.

Code Example

topic_detect:
  enabled: true
  default: openrouter/owl-alpha
  topics:
    finance:
      model: tencent/hy3-preview:free
      keywords: [stock, finance, investment, trading, ...]
    programming:
      model: tencent/hy3-preview:free
      keywords: [code, bug, debug, deploy, ...]
    science:
      model: tencent/hy3-preview:free
      keywords: [science, research, experiment, ...]

---

Normal conversation:
  "Hey! How's it going?"  (no tag)

Topic detected, subagent used:
  "SOUN is currently at $X.XX... Technical indicators show..."
  
  by subagent model tencent/hy3-preview:free
RAW_BUFFERClick to expand / collapse

Summary

Currently, Hermes uses one model for everything — conversation, research, coding, finance analysis, etc. This means users pay top-tier model costs for simple tasks, and the model may not be the best at that specific domain.

This feature request proposes Topic-Aware Subagent Routing: detect the conversation topic, then delegate research/data-gathering to a specialized subagent using the optimal model for that dimension — while the main agent continues the conversation in the user's preferred language.

The Core Idea

"You don't talk to a gardener about stocks. You don't talk to NASA about building a house."

Different models excel at different things. Instead of using one expensive model for all tasks:

  • Main agent (e.g., owl-alpha) handles conversation in the user's language
  • Subagent with a domain-specific model handles research and data gathering
  • Results are translated back to the user seamlessly

Proof of Concept

We've implemented this as a skill (model-switch-by-topic) and it works today:

Config (config.yaml)

topic_detect:
  enabled: true
  default: openrouter/owl-alpha
  topics:
    finance:
      model: tencent/hy3-preview:free
      keywords: [stock, finance, investment, trading, ...]
    programming:
      model: tencent/hy3-preview:free
      keywords: [code, bug, debug, deploy, ...]
    science:
      model: tencent/hy3-preview:free
      keywords: [science, research, experiment, ...]

Behavior

  1. User asks about stocks → topic detected → subagent (hy3) researches → main agent summarizes
  2. User chats normally → no subagent → main agent responds directly
  3. User asks a simple question → no subagent → answer directly

Response Format

Normal conversation:
  "Hey! How's it going?"  (no tag)

Topic detected, subagent used:
  "SOUN is currently at $X.XX... Technical indicators show..."
  
  by subagent model tencent/hy3-preview:free

Memory Integration

The system also reads MEMORY.md to boost topic detection:

  • User interests (e.g., "interested in stocks")
  • User context (e.g., "holds EOSE")
  • Learned lessons (e.g., "panic sold NVTS before")

This helps when keyword match is borderline — memory context tips the scale.

Benefits

  1. Cost savings — Use cheap/free models for domain-specific research instead of expensive models
  2. Better quality — Each model does what it's best at (hy3 #1 in Programming, #2 in Science)
  3. Language preservation — Main agent always converses in user's preferred language
  4. Seamless UX — User doesn't feel like talking to different models
  5. Extensible — Users can add custom topics, change models, adjust keywords

Proposed Implementation

Option A: Native Config Support

Add topic_detect as a native config section

Option B: Built-in Topic Routing via Auxiliary

Integrate with existing auxiliary infrastructure

Option C: Skill-Based (Current)

Keep as a skill for now, gather community feedback, then promote to a native feature.

Open Questions

  1. Should topic detection use keyword matching only, or also LLM-based classification?
  2. Should subagent results be shown inline or as a separate message?
  3. How to handle topic changes mid-conversation?
  4. Should there be a topic_detect.priority config for tie-breaking?

References

  • OpenRouter model rankings by category: https://openrouter.ai/rankings
  • Related issue: #5997 (LLM model switch by skill)
  • Related issue: #5999 (/model command in session)

I believe this would be a game-changer for Hermes users. Instead of one model trying to do everything, we let each model shine in its specialty — while keeping the conversation natural and seamless.

Looking forward to feedback from the community! 🙏

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat: Topic-Aware Subagent Routing — Right Model for the Right Job