HiRoute AI Agent

by higress-group• 367•• Scanned•Claim this listing•Request removal
Data Science & MLai agentsai gatewayclaude codecodexcoding agent

Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.

HiRoute is an open-source ai agent by higress-group, written mainly in Rust, with 367 GitHub stars and the Apache-2.0 license. Its code was last updated Nov 1, 2026.

<p align="right"><a href="README.zh-CN.md">简体中文</a></p> <p align="center"> <a href="https://hiroute.ai/en/#tour"><img src="apps/website/public/media/hiroute-promo-en-readme.jpg" alt="Watch the 3-minute HiRoute tour: a real session where a new model handles routine turns and the primary model steps in after a low score" width="760"></a> </p> <p align="center"> <strong>Pay for your strongest model only where the work needs it.</strong><br> Economical models handle routine turns; your primary model takes the complex work<br> and steps in when an economical model falls short.<br> Keep using Codex, Claude Code and other Agents with your subscriptions, APIs and local models. </p> <p align="center"> <a href="https://hiroute.ai/en/download/">Download</a> · <a href="#get-started">Quickstart</a> · <a href="#real-world-cost-savings">Cost results</a> · <a href="#how-well-does-the-routing-policy-work">Experiments</a> · <a href="https://hiroute.ai/en/docs/">Documentation</a> · <a href="CONTRIBUTING.md">Contributing</a> </p> <p align="center"> <a href="https://github.com/higress-group/HiRoute/releases/latest"><img alt="Latest release" src="https://img.shields.io/github/v/release/higress-group/HiRoute?display_name=tag&amp;sort=semver&amp;style=flat-square"></a> <a href="LICENSE"><img alt="Apache-2.0 license" src="https://img.shields.io/badge/license-Apache--2.0-5A6FE8?style=flat-square"></a> <a href="https://hiroute.ai/en/download/"><img alt="macOS, Windows and Linux" src="https://img.shields.io/badge/platform-macOS%20%7C%20Windows%20%7C%20Linux-171A21?style=flat-square"></a> </p>

Real-world cost savings

In a real research and architecture-review task, Qwen 3.8 Flash did the research and GPT-6 Astra made the critical decision. At the same acceptance standard, the task cost about 90% less than running everything on Astra.

91% lower whole-task cost at the same acceptance standard: HiRoute with Qwen research and Astra decisions $0.150–0.162 versus all GPT-6 Astra $1.953–1.987, about one twelfth

<sub>API-equivalent estimates. Full case study</sub>

Switching models keeps the savings

HiRoute changes models only at clear boundaries: a new user message, or context compaction and rebuild. Tool calls within a turn stay on the same model. A switch misses the cache once, then later calls hit it again, so cache loss does not eat into the savings. Switching Models Loses Cache, Not the Savings

Familiar Agents, more model choices

Keep working in Codex, Claude Code, Qoder, Pi, OpenCode, Hermes or DeepSeek Harness. HiRoute runs locally and brings supported subscriptions, API connections and local models into one place. For example, combine an economical API model with your Codex subscription, or use a smaller and a stronger model from the same supported source.

What you wantWhat HiRoute provides
Spend less on your strongest modelRoute routine work to economical models and keep the primary model for complex stages and low-score protection.
Keep your workflowContinue in your familiar Agent while models share the work within a session.
Try a new model graduallyStart at a trust level you choose, keep a familiar primary model as backup and adjust with evidence from your own tasks.
Understand each decisionInspect the actual models, routing reasons, stage performance, usage and cost estimates.

One task, the right model for each stage

Each new message gets a fresh decision. A decision model answers three independent questions anchored on the task's timeline, and HiRoute combines the answers with your plan:

<p align="center"><img src="decision-extensions/assets/three-questions-en.svg" alt="Look back, size up, look ahead: how did the last step go (competence score), how hard is this step (simple probability), and will the last step's problem carry into the next (earlier problem relevance). A decision model answers the three questions independently in one request; HiRoute applies your plan's thresholds to pick the economical or primary model" width="760"></p>
  • Previous: how did the last step go? A competence score, also used for model performance reports and trust suggestions.
  • Current: how hard is this step? A simple probability. Only simple-enough work can go to the economical model.
  • Next: will the last step's problem carry into the next? When a step scored below the competence floor and its problem still applies to the work ahead, low-score protection hands the next turn to your primary model. Once it no longer applies, protection is released.

The decision model only answers; thresholds, model choice and execution stay in HiRoute, so you can retune routing without rewriting prompts. The first turn has no previous step, so only difficulty applies.

<p align="center"> <img src="decision-extensions/assets/readme-session-en.png" alt="HiRoute session timeline: a DeepSeek V4.1 Flash stage scores 0.24 and protects the next turn; the selected turn runs on the primary model GPT-6 Astra under low-score protection and scores 0.73; the following turns return to Flash, and the next one scores 0.94" width="760"> </p> <p align="center"><sub>A real session: after a Flash stage scores 0.24, the primary model takes the next turn under low-score protection; once that turn scores 0.73, the work returns to Flash.</sub></p>

Keep asking follow-up questions or let your Agent advance a long task. HiRoute can reassess at supported new-input and context-reconstruction boundaries; tool continuations normally reuse the stage's decision. See routing behavior and supported-client limits.

Explore routing modes

Try new models with a primary model ready to help

Start from New models on Home. Instead of switching everything at once, HiRoute rolls a new model out by task difficulty.

  • Trust sets a difficulty bar. System One estimates how simple each turn is. Turns that clear the bar go to the new model; harder work stays with your primary model.
  • Open up gradually. Move from Trial to Familiar, Trusted or Hands-off as the new model proves itself, and it takes on more of your work.
  • Primary still backs it up. If a new-model stage scores below the competence floor and the problem still matters, low-score protection hands the next turn to your primary model.
<p align="center"><img src="decision-extensions/assets/readme-trial-en.png" alt="Trust slider from Cautious to Entrusted with Trial, Familiar, Trusted, Hands-off and Entrusted presets; Trusted is selected at a simple-probability threshold of 0.65, and simpler tasks go to the regular model first" width="760"></p> <p align="center"><sub>Further right, more of the simpler work goes to the new model.</sub></p>

Adjust with evidence from your own tasks

The session timeline shows which model actually ran and why. Model performance reports bring together stage scores, the share handled by the regular group and available cost estimates. When there is enough evidence, a report suggests a step up or step down; replay the setting on your own records, inspect the changes and choose whether to publish.

<p align="center"><img src="decision-extensions/assets/readme-report-en.png" alt="Model performance report: 77 stages from 9 sessions, a step-up suggestion to Trusted, 75% of stages on Regular at 90% competence, 3 low-score protections, an estimated Regular cost of $3.42 against a $11.86 primary reference, and per-model competence for Qwen3-Coder-Plus and GPT-5.6-Sol" width="760"></p> <p align="center"><sub>A model performance report suggests a step up once the regular model clears the bar. Costs are API-equivalent estimates.</sub></p>

You can also tailor the judgment criteria to your own tasks and compare prompt changes using the published evaluation method.

How well does the routing policy work?

Both approaches receive the same task context and complete routing policy. One selects a model group directly; the other answers three questions and lets HiRoute combine the answers. The comparison uses engineering workflows and mathematical dependency states.

Final group-selection accuracy on the reviewed subset: Jev 1.14 engineering 67.31% to 96.15% and mathematics 54.86% to 100.00%; OpenAI Decisions engineering 50.00% to 91.35% and mathematics 65.97% to 88.89%

ScenarioDecision modelFull-policy direct selectionThree-question routing
EngineeringJev 1.1467.31%96.15%
EngineeringOpenAI Decisions / gpt-6-luna50.00%91.35%
Mathematical dependency statesJev 1.1454.86%100.00%
Mathematical dependency statesOpenAI Decisions / gpt-6-luna65.97%88.89%

Metric: final group-selection accuracy, averaged equally across workflow families. Engineering has 80 determinate cases across 26 workflows; mathematics has 40 across six. This is a post-hoc reviewed subset, with the same exclusions applied to every model and both formats after inspecting outputs. Original labels and full-population results remain available. Jev calls ran on 28 October 2026 and OpenAI calls on 29 October; inputs and policy match, but the calls were not contemporaneous.

The results measure conformance to the stated routing policy, not task completion or realized savings. The OpenAI results come from the study's research adapter, not from HiRoute's built-in OpenAI connection. Use the study and cases to evaluate decision prompts against your own tasks.

Comparison, exclusions and saved responses · Dataset construction and review

Get started

Download HiRoute · Installation guides · Latest release

HiRoute provides macOS, Windows x64, and Omarchy desktop apps, plus a Linux Web UI and CLI. The download page lists published packages.

Version 0.6.2 restores the Windows diagnostic log path, adds detail to decision connection failure logs, and reduces decision timeouts on requests with large tool schemas.

  1. Connect your models. Add a supported subscription or API connection and choose an economical model plus a primary model.
  2. Set the division of work. Connect a decision model in Models → Decision models, choose a trust level, then publish and map the plan to your Agent. Built-in connections support Bailian, OpenAI, OpenRouter Jev, TypeSafe and compatible endpoints without self-hosting Jev.
  3. Work as usual. Continue in your Agent, then inspect model switches and execution reports in HiRoute.
<details> <summary>Install on macOS, Windows or Linux</summary>

macOS: download the DMG, drag HiRoute into Applications, and follow the self-signed package instructions if macOS asks for approval. Supports macOS 15+ on Apple silicon and Intel.

Windows: use the x64 Desktop installer. It installs for the current user and includes the background service, WebView2 bootstrapper and CLI; no Python or administrator privileges are required. See the Windows installation guide for checksum verification, first launch and recovery.

Omarchy users can verify the signed Arch package, install it with pacman, and open HiRoute from the launcher. Follow the Omarchy installation guide.

Linux standalone installs the current-user CLI and daemon on x86_64 or ARM64 without sudo.

curl -fsSL https://hiroute.ai/install.sh | sh
hiroute service start --output json
hiroute system status --output json

Open the Web UI to connect models, configure routes and Agents, and inspect sessions in your browser:

hiroute console init --mode loopback --port 5838
hiroute service restart --output json
hiroute console open

Open the printed single-use login URL. For a remote host, use the remote-access or SSH-tunnel instructions. The CLI remains available for terminal and automation workflows. The installer verifies the published manifest and checksums; service startup is explicit. See the Linux Web UI and CLI guide and CLI reference.

</details>

Go further

  • Other routing modes: fixed model, custom branches and free first, alongside difficulty routing. Model routing
  • Agent collaboration: expose Worker plans for delegated tasks. Task routing
  • Your own decision service: configure criteria or implement the optional decision extension API.
  • Detailed behavior: candidate fallback, scoring eligibility, recovery and client limits are documented in the routing guide.

News

Contribute

Start with the contributing guide for setup and validation, and the code map to find each capability's implementation. HiRoute uses Apache License 2.0. Report bugs and feature requests through GitHub Issues; follow SECURITY.md for security reports and crash-report handling.

Community link: LINUX DO (technical discussion community).

HiRoute alternatives

View more →

Similar ai agents in Data Science & ML, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.

NameStarsLicenceLast updatedScan
HiRoute (this page)
higress-group
367Apache-2.0Nov 1, 2026Scanned, no flagged issues
Ragflow
infiniflow
93kApache-2.0Oct 31, 2026Scanned, no flagged issues
Cherry Studio
CherryHQ
53kAGPL-3.0Nov 1, 2026Scanned, no flagged issues
PageIndex
VectifyAI
40kMITOct 29, 2026Scanned, no flagged issues
Graphiti
getzep
32kApache-2.0Nov 1, 2026Scanned, no flagged issues
Cua
trycua
31kMITNov 1, 2026Scanned, no flagged issues