Sabi Routing logo

Sabi Routing

Organization
Hermes-brasil
sabi-routing

Use quando quiser rotear cada inferência do Hermes pelo Sabi (alias sabi-code) em vez de um modelo fixo. Troca cheap/mid/strong por round mantendo o loop nativo, sem forkar o Hermes.

Overview

PublisherHermes-brasil
Repositoryhermes-brasil
Skill namesabi-routing
Stars
155
Forks
8
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Hermes-brasil on GitHub. Read the source before you install it.

Installation

Install the Sabi Routing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Hermes-brasil/hermes-brasil/tree/main/skills/sabi-routing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Hermes-brasil/hermes-brasil.git /tmp/hermes-brasil
mkdir -p .claude/skills
cp -r /tmp/hermes-brasil/skills/sabi-routing .claude/skills/sabi-routing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sabi Routing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sabi Routing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sabi Routing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Sabi Routing no Hermes

Sabi (https://github.com/vizuh/sabi) é um agendador de inferência: o Hermes mantém o loop nativo e o Sabi decide modelo/esforço/provider por request, atrás do alias sabi-code.

Caminho V1 suportado:

text
Hermes → custom:sabi / sabi-code → proxy Sabi 127.0.0.1:8787 → upstream

Quando carregar

  • Quer rotear sabi-code por trajetória (tool-result, falha, retomada) em vez de um modelo fixo
  • Vai operar Hermes + Sabi com HERMES_HOME isolado
  • Precisa de rollback rápido para o perfil Hermes original

Não use para: transferir assinatura (Nous / OpenCode Go / ChatGPT Plus) para outro provider, impor orçamento/permissão (middleware é fail-open), ou cobrir subagentes/compaction/gateway (não verificado).

Pré-requisitos

  • Hermes 0.21.3 (commit 01382698, NousResearch/hermes-agent). Verifique: hermes --version
  • Carga da skill verificada pelo mantenedor em 0.22.2 (HERMES_HOME isolado, hermes skills list → enabled). O roteamento em si segue testado só em 0.21.3
  • Checkout Sabi com npm install feito
  • Perfil Hermes novo e vazio — nunca instale no ~/.hermes pessoal
  • Modelo custom no Hermes exige contexto ≥ 64000 (ex.: Neste host qwen2.5-coder:7b tem 32768 e é rejeitado; use Nous ou local ≥64k)

Setup — rota Nous (padrão)

bash
npm run setup -- --harness=hermes --hermes-home="$HOME/.config/sabi/hermes" --no-jev
export HERMES_HOME="$HOME/.config/sabi/hermes"
hermes auth add nous --type oauth

# Terminal 1 — proxy Nous do Hermes
HERMES_HOME="$HERMES_HOME" hermes proxy start --provider nous --host 127.0.0.1 --port 8645

# Terminal 2 — proxy Sabi
SABI_CONFIG="$HERMES_HOME/sabi.config.json" npm start

# Terminal 3 — chat
export SABI_HERMES_BASE_URL="http://127.0.0.1:8787/v1"
HERMES_HOME="$HERMES_HOME" SABI_HERMES_BASE_URL="$SABI_HERMES_BASE_URL" hermes chat

Setup — OpenRouter uma chave (sem login Nous)

bash
npm run setup -- --harness=hermes --upstream=openrouter \
  --hermes-home="$HOME/.config/sabi/hermes" --no-jev

SABI_CONFIG="$HOME/.config/sabi/hermes/sabi.config.json" npm start
HERMES_HOME="$HOME/.config/sabi/hermes" hermes chat

Só pede OPENROUTER_API_KEY (TTY oculto). BYOK/prioridade/fallback ficam no OpenRouter. Sabi nunca recebe chaves de assinatura.

Como funciona

  • Plugin llm_request (zero-dependência) adiciona só X-Sabi-Client/Session/Turn no endpoint loopback exato com model sabi-code
  • Copia o request completo: tools, ids, ordem, argumentos, streaming. Não reescreve provider, não faz retry, não cria segundo loop
  • turn_id do Hermes agrupa um user-turn + tool-loop; Sabi cria request-ID próprio por inferência e decide por trajetória
  • Falha do middleware = fail-open (request segue sem atribuição)

Verificação observável

  1. No chat com sabi-code, peça uma tarefa com leitura de arquivo + follow-up
  2. No log do Sabi confira client: hermes, sessionKnown: true, request-IDs únicos por inferência
  3. Retome a sessão — deve gerar novo turn_id com mesma sessão
  4. hermes --version + base SABI_HERMES_BASE_URL loopback exata; outro host = request intocado (by design)

Rollback

bash
# voltar ao perfil original: pare de selecionar o HERMES_HOME isolado,
# ou no perfil isolado:
# remova `sabi-metadata` de `plugins.enabled`

Preserve o perfil. Não apague state do usuário nem mude outros providers.

Limites explícitos (não omitir no PR)

  • Roteamento fixado/testado em Hermes 0.21.3 / 01382698; em versão mais nova, o carregamento da skill já foi confirmado (0.22.2), o roteamento não
  • discover_models: false não suprime todos os GETs de metadata local (observado: 404s não quebram a tarefa)
  • Cobertura: conversa principal + resume com tool-loop limitado. Subagentes, compaction, MoA, gateway, desktop: não exercidos
  • Smoke pago / produção / economia medida: gates separados, não afirmados aqui
  • Sem segredos no repo: credencial fica no auth store do Hermes ou no ambiente do Sabi

Referências

Frequently asked questions

What does the Sabi Routing AI skill do?

Use quando quiser rotear cada inferência do Hermes pelo Sabi (alias sabi-code) em vez de um modelo fixo. Troca cheap/mid/strong por round mantendo o loop nativo, sem forkar o Hermes.

Why use Sabi Routing on TypingMind?

Because you install it once and use it with any model. Sabi Routing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sabi Routing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Hermes-brasil/hermes-brasil/tree/main/skills/sabi-routing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Sabi Routing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sabi Routing?

As many as you like. As long as a model supports skills, you can use Sabi Routing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sabi Routing AI skill free?

Yes. It is published on GitHub by Hermes-brasil under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇