Skip to content

About

Intelligent model router for Hermes Agent — task-based classification, capability matching, and feedback learning

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Hermes Switchboard

Intelligent model router for Hermes Agent.

Routes incoming prompts to the best available model using task classification, capability matching, and feedback learning — so you don't manually pick models or maintain ordered failover lists.

How It Works

User Prompt → Classify Task Type → Score Models → Pick Best → Record Outcome
  1. Classify — Local LLM (Qwen3.5-4b) determines the task type (coding, research, chat, math, etc.)
  2. Score — Each model is scored on capability for that task, adjusted for live state (rate limits, latency, failures)
  3. Select — Highest-scoring model wins; free models preferred unless paid is significantly better
  4. Learn — Outcomes recorded to SQLite; empirical success rates override static scores over time

Install

Via Hermes Skills (recommended)

hermes skills install sannidhyas/hermes-switchboard/hermes-switchboard

Manual

# Clone
git clone https://github.com/sannidhyas/hermes-switchboard.git

# Install to Hermes skills directory
cp -r hermes-switchboard/hermes-switchboard ~/.hermes/skills/productivity/

# Setup (verifies Ollama + classifier model)
python3 ~/.hermes/skills/productivity/hermes-switchboard/scripts/setup.py

Prerequisites

  • Ollama installed
  • Pull the classifier model: ollama pull huihui_ai/qwen3.5-abliterated:4b

Quick Start

# Route a prompt
python3 ~/.hermes/skills/productivity/hermes-switchboard/scripts/hermes-switchboard.py route "Write a Python API"

# Classify only
python3 ~/.hermes/skills/productivity/hermes-switchboard/scripts/hermes-switchboard.py classify "Debug this error"

# Record feedback (after a model call)
python3 ~/.hermes/skills/productivity/hermes-switchboard/scripts/hermes-switchboard.py feedback "Write a Python API" "nvidia/nemotron-3-ultra" 3.2 --task-type coding --success

# View statistics
python3 ~/.hermes/skills/productivity/hermes-switchboard/scripts/hermes-switchboard.py stats coding

Task Types

Type Description Best Free Model
coding Software development nemotron-3-ultra
debugging Bug fixing nemotron-3-ultra
research Information synthesis nemotron-3-ultra
summarization Condensing text solar-pro4
creative Writing, brainstorming longcat-2.0
math Calculations, proofs nemotron-3-ultra
qa_simple Quick questions longcat-2.0
qa_complex Deep analysis nemotron-3-ultra
multimodal Images, vision gpt-6-astra
translation Language translation nemotron-lightning
reasoning Logic, decisions nemotron-3-ultra
chat Casual conversation longcat-2.0

Architecture

See references/architecture.md for full design docs.

Files

hermes-switchboard/
├── SKILL.md                         # Hermes skill definition
├── scripts/
│   ├── hermes-switchboard.py        # CLI tool
│   └── setup.py                     # Setup verification
├── templates/
│   └── model_config.yaml            # Config template
└── references/
    └── architecture.md              # Detailed architecture docs

Configuration

Edit ~/.hermes/routing/model_config.yaml:

classifier:
  model: "huihui_ai/qwen3.5-abliterated:4b"
  ollama_url: "http://localhost:11434"

router:
  prefer_free: true
  premium_threshold: 0.15    # Higher = more conservative about paid models

models:
  gpt-6-astra:
    provider: openai-codex
    context_length: 872000
    is_free: false
    task_scores:
      coding: 0.95
      reasoning: 0.95
      # ... etc

Add your own models, adjust scores, or change the classifier model.

Comparison with Existing Tools

Tool Cloud-locked Local Classifier Feedback Loop Free-first
Hermes Switchboard ❌ ✅ Qwen3.5-4b ✅ SQLite ✅
Amazon Bedrock Routing ✅ AWS ❌ ❌ ❌
NVIDIA NeMo Switchyard ✅ Enterprise ❌ ❌ ❌
OpenRouter ✅ ❌ ❌ ❌
LLMRouter (UIUC) ❌ ❌ ❌ ❌

License

MIT

Author

Sannidhya (@wolfsandheer)

About

Intelligent model router for Hermes Agent — task-based classification, capability matching, and feedback learning

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages