Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Routed

The Universal Local Router for Agent Skills

License: MIT Latest Release Platforms


[!TIP] Download standalone installers directly from GitHub Releases: RoutedSetup.exe (Windows), RoutedSetup.pkg (macOS), and RoutedSetup.deb (Linux).


Overview

Routed is a universal, local, zero-token router for Agent Skills across AI coding environments. It automatically scans, indexes, and routes coding prompts to the most relevant skill using a local hybrid search engine combining Okapi BM25, exact matching, and local dense semantic embeddings.

  • Zero Token Cost: Eliminates costly LLM routing calls (saving 1,000+ prompt tokens per interaction).
  • Sub-20ms Latency: Local CPU-evaluated hybrid search responds instantly without network roundtrips.
  • Privacy First: Prompt routing is executed 100% locally; no user queries leave your machine.
  • Multi-Skill Dispatch: Decomposes compound prompts and activates multiple skills simultaneously.

Architecture

Routed evaluates queries using a multi-tier hybrid scoring pipeline running entirely on local CPU:

flowchart LR
    UserPrompt["User Prompt (/route)"] --> Engine["Routed Core Engine"]

    subgraph Engine["Hybrid Scoring Pipeline (Local CPU)"]
        Exact["Exact / Alias Match (10%)"]
        BM25["Okapi BM25 Lexical (25%)"]
        Semantic["Dense Vector Embeddings (60%)"]
        Meta["Metadata & Recency (5%)"]
    end

    Exact --> Scorer["Composite Hybrid Scorer"]
    BM25 --> Scorer
    Semantic --> Scorer
    Meta --> Scorer

    Scorer --> Selection["Top Skill(s) Resolved (< 20ms)"]
    Selection --> Agent["AI Host Agent (Antigravity / Claude / Cursor / OpenCode / Codex)"]
Loading

$$\text{Composite Score} = 0.60 \cdot \text{Semantic} + 0.25 \cdot \text{BM25} + 0.10 \cdot \text{Exact} + 0.05 \cdot \text{Metadata}$$


Comparison

Dimension Routed (Local) Traditional Cloud LLM Routing Manual Skill Selection
Token Cost $0.00 (Zero tokens) 500 to 2,000 paid tokens $0.00
Latency Under 20ms (Local CPU) 1,200ms to 3,500ms network API Manual human browsing
Privacy 100% Local (Air-gapped) Sends user prompts to cloud Local
Ranking Engine Deterministic Hybrid Non-deterministic prompt drift Memory or string grep
Multi-Agent Sync Automatic adapter synchronization Fragmented per-tool prompting Manual copy and paste

Installation

Platform Installer Package Format Quick Install
macOS RoutedSetup.pkg / RoutedSetup.dmg Apple Installer / Disk Image Run .pkg or mount .dmg
Linux RoutedSetup.deb / routed-linux-x64.tar.gz Debian Package / Tarball sudo dpkg -i RoutedSetup.deb
Windows RoutedSetup.exe / Install-Routed.ps1 NSIS Executable Installer Run RoutedSetup.exe

Build from Source

git clone https://github.com/bshea-1/Routed.git
cd Routed
npm install
npm run build
npm run setup

Quick Start

1. Interactive Setup Wizard

Run the setup wizard to detect installed AI coding tools and configure /route adapters:

routed setup

2. Discover & Index Skills

Scan local directories and build the hybrid index:

routed scan
routed skills

3. Route Prompts

Inside your AI agent chat (Antigravity, OpenCode, Claude Code, Cursor, Codex):

/route write a unit test for my authentication service using TDD

Or from your terminal:

routed route "audit accessibility and fix memory leaks" --explain

4. Diagnostics

Verify system health, SQLite indices, and embedding models:

routed doctor

Supported Environments

Environment Adapter Path Auto-Detection Integration Method
Antigravity ~/.gemini/config/skills/route/SKILL.md Supported Native skill dispatch & background router
OpenCode ~/.opencode/skills/route/SKILL.md Supported Local skill loader & interactive prompts
Claude Code ~/.claude/skills/route/SKILL.md Supported Slash command integration & terminal runner
Cursor .cursor/rules/routed.mdc Supported Rule-based automatic prompt interception
Codex .agents/skills/route/SKILL.md Supported Universal Agentic Skill schema

CLI Reference

Command Description Example
routed setup Run interactive setup wizard routed setup
routed route "<prompt>" Find matching skill(s) for a prompt routed route "write unit test with TDD"
routed scan Scan supported environments and update index routed scan
routed skills List all discovered and indexed skills routed skills
routed adapters Manage /route adapters across AI tools routed adapters --install
routed doctor Run diagnostics and self-repair routed doctor --fix
routed reindex Incrementally re-index and re-embed skills routed reindex
routed watch Continuously monitor skill dirs for changes routed watch
routed feedback Manage routing preferences and corrections routed feedback --list
routed status Display status and detected environments routed status
routed benchmark Run routing accuracy and latency benchmarks routed benchmark
routed uninstall Safely remove Routed and clean adapters routed uninstall --dry-run
Click to view full CLI options
Usage:
  routed <command> [arguments] [options]

Commands:
  setup               Run the interactive setup wizard
  route "<prompt>"    Find the best matching Agent Skill(s) for a prompt
  scan                Scan supported AI environments and update index
  skills              List all discovered and indexed skills
  adapters            Manage /route adapters across AI coding tools
  doctor              Run system, database, and model diagnostics (--fix to repair)
  reindex             Incrementally re-index and re-embed installed skills
  watch               Continuously monitor skill directories for file changes
  feedback            Manage local routing preferences and corrections
  uninstall           Safely uninstall Routed and remove adapters (--dry-run available)
  status              Display current system status and detected environments
  benchmark           Run routing benchmark suite and measure accuracy and latency
  version             Print version information
  help                Display help screen

FAQ

How does Routed operate with zero external API keys?

Routed runs quantized ONNX dense embedding models (Snowflake Arctic Embed S / all-MiniLM-L6-v2) directly on local CPU alongside Okapi BM25. Vector similarity and text indices are cached in a local SQLite database, requiring no internet connection or cloud tokens.

How are multiple skills selected simultaneously?

When a prompt contains compound intents or conjunctions (such as "and", "with", "as well as"), Routed decomposes the prompt into sub-clauses, scores candidates across all clauses, and returns all matching skills in selectedSkills for joint agent activation.

Does Routed introduce noticeable latency?

No. Benchmark execution times average under 20 milliseconds on local CPU, making routing practically instantaneous compared to remote cloud roundtrips (1,200ms to 3,500ms).

Where are skill embeddings and cache files stored?

Routed stores its index and database files in standard platform directories:

  • macOS: ~/Library/Application Support/Routed
  • Linux: ~/.local/share/routed
  • Windows: %LOCALAPPDATA%\Routed

Star History

Star History Chart


License

MIT License. Copyright (c) 2026 bshea-1.

See LICENSE for full details.

About

Universal local router for Agent Skills across AI coding environments

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages