HiRoute AI 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.
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.
<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 want | What HiRoute provides |
|---|---|
| Spend less on your strongest model | Route routine work to economical models and keep the primary model for complex stages and low-score protection. |
| Keep your workflow | Continue in your familiar Agent while models share the work within a session. |
| Try a new model gradually | Start at a trust level you choose, keep a familiar primary model as backup and adjust with evidence from your own tasks. |
| Understand each decision | Inspect 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.
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.
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.
| Scenario | Decision model | Full-policy direct selection | Three-question routing |
|---|---|---|---|
| Engineering | Jev 1.14 | 67.31% | 96.15% |
| Engineering | OpenAI Decisions / gpt-6-luna | 50.00% | 91.35% |
| Mathematical dependency states | Jev 1.14 | 54.86% | 100.00% |
| Mathematical dependency states | OpenAI Decisions / gpt-6-luna | 65.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.
- Connect your models. Add a supported subscription or API connection and choose an economical model plus a primary model.
- 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.
- Work as usual. Continue in your Agent, then inspect model switches and execution reports in HiRoute.
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
- Latest stable release and release notes
- 2026-10-14 — Switching Models Loses Cache, Not the Savings
- All news and case studies · Experiments
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.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| HiRoute (this page) higress-group | 367 | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| Ragflow infiniflow | 93k | Apache-2.0 | Oct 31, 2026 | Scanned, no flagged issues |
| Cherry Studio CherryHQ | 53k | AGPL-3.0 | Nov 1, 2026 | Scanned, no flagged issues |
| PageIndex VectifyAI | 40k | MIT | Oct 29, 2026 | Scanned, no flagged issues |
| Graphiti getzep | 32k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| Cua trycua | 31k | MIT | Nov 1, 2026 | Scanned, no flagged issues |