Skip to content

agent-router

CLI that filters coding-agent subscriptions by quota and policy, then asks TypeSafe to rank the rest and pick a reasoning effort.

Projectprototype

Overview

Agent Router is a local-first command-line tool for Herdr that picks an AI coding agent, model and reasoning effort for a task, then launches that agent in a Herdr pane. You run router run with a task description.

It first filters your subscriptions with fixed rules (enabled models, remaining quota, a 40% reserve on shared accounts), then asks TypeSafe to rank what is left and choose an effort level, and starts Cursor, Claude Code, Codex or OpenCode with the task. Routing always calls TypeSafe with no fallback, and recognizable credentials are rejected locally before the task text is sent. Configuration, usage snapshots, decisions and history stay on your machine. It is labelled pre-release.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich eligible agent and model should run this task?(inferred)Cursor · Claude Code · Codex · OpenCode models
ScoreWhat reasoning effort does this task need?(inferred)—

How it works

  1. User runs router run "<task>"
  2. Deterministic rules filter models by enablement, quota and reserve
  3. TypeSafe ranks remaining options and picks effort
  4. Router launches the chosen agent in a Herdr pane with the task

Strengths

  • Policy runs before semantic ranking
  • Local-first records
  • Uses existing CLI logins; no provider API keys

Caveats

  • Pre-release
  • No fallback if TypeSafe is unavailable
  • Task text is sent to TypeSafe

Getting started

git clone the repo, npm install && npm run build, then npm link -w @agent-router/router; requires a TypeSafe API key and Herdr.

At a glance

Type
Project
Status
prototype
Language
TypeScript
Runtime
Node CLI (Herdr)
Has code
yes

Use cases and integrations

How curated lists describe it

  • Pre-release Herdr integration that filters eligible coding models by quota and policy before Jev ranks them.

    cobanov/awesome-jev

Frequently asked questions

What does TypeSafe decide?

It ranks the agent/model options that passed quota and policy filters and chooses a reasoning effort.

Is there a fallback?

No, routing always calls TypeSafe.

Which agents can it launch?

Cursor, Claude Code, Codex and OpenCode.

Related projects

  • Cost-, cache- and quota-aware LLM router that classifies each turn with a Jev-class model, prices every route, and checks cheap answers.

    ProjectprototypePython
  • Local-first, outcome-aware model router for coding harnesses that picks a capability tier per task with Jev and learns from history.

    ProjectprototypeRust
  • jev-router★ 593

    Per-turn model routing for Claude Code and Codex: wraps the real CLI and lets Jev send simple turns to fast models and hard ones to strong.

    ProxybetaJavaScript
  • Local OpenAI/Anthropic-compatible proxy where one Jev call picks the model route and thinking level for each coding-agent turn.

    ProxybetaGo
  • Host-agnostic routing layer that picks model, effort and provider per round for coding harnesses from trajectory evidence.

    ProxybetaTypeScript
  • Local router for Claude Code and Codex that has Jev assess each new task, then pins a policy-chosen model and effort for the conversation.

    ProxybetaTypeScript