Skip to content

TriRouter

Prompt router for Claude Code, Codex and Antigravity that picks model, effort, skill and language per request via Jev.

Projectbeta

Overview

trirouter (formerly jev-router) runs before every prompt sent to Claude Code, OpenAI Codex or Google Antigravity, across projects, desktop apps and remote sessions. For each request it decides which model and reasoning effort to use, how many parallel agents are allowed under a token budget, which skill from a shared folder fits, whether the request is irreversible (so the agent must ask first), and which language to reply in.

It also protects running work: a prompt sent while an earlier one is still processing is queued instead of interrupting it. Decisions come from Jev via a TypeSafe token or an OpenRouter key; without either, a built-in local classifier with the same answer format is used. An installer detects the tools, sets up hooks and an MCP server, a shared skill folder and a trirouter command.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich model and reasoning effort should handle this prompt?—
ChoiceWhich skill fits this request?—
Yes / noIs this request irreversible?yes · no
ChoiceHow many extra agents may work in parallel?—

How it works

  1. A prompt is sent to Claude Code, Codex or Antigravity.
  2. A hook passes it to trirouter, which asks Jev (or the local classifier).
  3. Model, effort, agent count, skill, irreversibility and language are set.
  4. If an earlier prompt is still running, the new one is queued.

Strengths

  • Works out of the box with a local classifier; Jev optional.
  • Covers three coding tools from one setup.
  • Queuing prevents prompts overwriting running work.
  • Irreversible requests require the agent to ask first.

Caveats

  • Installer modifies hooks, MCP config and PATH across tools.
  • Accuracy of routing is not reported in the excerpt.

Getting started

git clone https://github.com/hajdu-patrik/trirouter.git && cd trirouter && python install.py

At a glance

Type
Project
Status
beta
Language
Python
Runtime
agent hooks + MCP server + CLI
Has code
yes

Use cases and integrations

How curated lists describe it

  • Routes each request across Claude, Codex and other agents, and queues a prompt sent while an earlier one is still running instead of overwriting it.

    MrJev/awesome-jev

Frequently asked questions

What does trirouter decide?

Model, reasoning effort, parallel agents, skill, reply language and whether a request is irreversible.

Do I need a TypeSafe key?

No; a TypeSafe token or OpenRouter key enables Jev, otherwise a local classifier is used.

Which tools does it support?

Claude Code, OpenAI Codex and Google Antigravity.

Related projects

  • Orchestrator that probes which coding agents are installed and logged in, then has Jev pick the best one for a task.

    Agent skillbetaPython
  • Hooks for Claude Code, Codex and pi that use Jev to suggest a skill each turn, plus a rule gate for subagent model routing.

    HookbetaJavaScript
  • Agent toolkit for Claude Code and Codex whose optional /d router uses Jev to pick agents, skills and workflows and gate dispatch on intent.

    ProjectbetaPython
  • Guide and small prototype for using Jev with Herdr to route tasks to coding agents like Claude, Codex and Hermes under code-owned policy.

    Projectprototype
  • Chooses the model tier, skills and MCP servers for each coding-agent session with two Jev requests, then launches Claude Code or Codex.

    MCP serverbetaPython
  • Claude Code hook that decides which agent or skill should handle a request using YAML rulebooks plus one Jev Choice with confidence bands.

    HookbetaPython