0genlab

Agent Auto Router — AI skill for Claude Code

AI community

Evidence-driven role and model routing for coding agents.

How to install Agent Auto Router

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 0genlab/agent-auto-router and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Auto Router does

Evidence-driven role and model routing for coding agents.

Alternatives in AI

  • Create Module — Scaffold a fully-typed module with controller, service, router, schema, and model files 325 ★
  • Jev Router — Route to the cheapest model in claude code for your task using jev-router 54 ★
  • Claude Code Model Router — A lightweight API gateway that lets you switch to third-party AI models when using Claude Code 35 ★

README

agent-auto-router

An evidence-driven routing and evaluation tool that helps agents choose the right model for each task.

In one sentence: the agent submits a task, `agent-auto-router` selects a model; the agent executes the task, and the router records evidence to improve the next decision.

Overview / 简介

This is not a leaderboard or a request-only proxy. Model choices are traceable, and the default behavior is observe-and-recommend until there is enough evidence to justify a switch. Codex CLI is the first validated host. Claude Code and Hermes are integrated as preview host adapters for non-interactive execution and metadata-only session ingestion.

End-to-end loop

flowchart LR
    A[Agent submits task] --> B[Identify role and task type]
    B --> C[Load live model catalog]
    C --> D[Filter available models]
    D --> E[Apply quality and cost gates]
    E --> F[Recommend or select model]
    F --> G[Agent executes task]
    G --> H[Collect tests, tokens, cost, rework]
    H --> I[Create objective evaluation]
    I --> J[Update role-model statistics]
    J -. next task .-> E

Selection considers role, task type, tool requirements, model availability, historical quality, success rate, latency, rework, and cost. The default policy is `shadow`: the router explains candidates and switch reasons first; gray rollout or automatic promotion requires the configured admission gates.

How it works

`configs/role-policy.json`, `src/core/role-policy.mjs`, and `scripts/role-run.mjs` provide the model-selection layer used by an agent:

  • Role and task profile: identify the work stage, tools, language, risk, and expected outcome.
  • Candidate selection: load available models and remove candidates that fail capability or availability checks.
  • Quality gates: compare success rate, objective quality, regression results, latency, rework, and cost.
  • Evidence recording: persist the selected model, execution result, tests, tokens, cost,