agentleFS
Hermes-brasilHermes-brasil/hermes-brasil/skills/sabi-routing/SKILL.md

sabi-routing

Skill159 starsChanged 3 months agoMITView on GitHub

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.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No chat com sabi-code, peça uma tarefa com leitura de arquivo + follow-up

    line 71
  2. Very specific:

    No log do Sabi confira client: hermes, sessionKnown: true, request-IDs únicos por inferência

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

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)

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)

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

# 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.