Smart Model Router for Openclaw

An intelligent, intent-based model router that automatically detects your prompt's context and routes it to the optimal AI agent.

wizelements
v1.0.0
May 25, 2026
0
652
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install smart-router-ai

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install smart-router-ai using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Smart Model Router?

The Smart Model Router is an advanced, automated utility designed to eliminate the friction of manually selecting AI models during development workflows. Built to integrate seamlessly with Openclaw Skills, this router analyzes natural language prompts to determine if you are trying to fix a bug, plan system architecture, or engage in creative conversational flow. By auto-detecting intent through keyword and pattern matching, it ensures your queries are routed to the most capable local or cloud-based model instantly.

Using this capability allows developers to maintain a single interface while benefitting from specialized LLMs. Rather than manually switching agents, you simply type your command. This skill increases task efficiency, drastically reduces cognitive offload, and helps teams maximize the utility of their Openclaw Skills infrastructure.

Smart Model Router Use Cases

  • Automatically directing runtime errors, crashes, and debugging prompts directly to specialized coding models like cloud-code.
  • Routing system design queries, database schemas, and architectural plans to deep-reasoning models like deepseek-r1.
  • Engaging in general conversation, brainstorming sessions, or writing creative content using default conversational models without manual configuration.
  • Standardizing AI routing across team environments using predefined keywords and intent matching to optimize model utilization.

How Smart Model Router Works

  1. The user inputs a prompt or command via the terminal using the Smart Model Router CLI aliases.
  2. The router analyzes the natural language prompt using a built-in intent detection engine that scans for specific keywords, phrases, and pattern rules.
  3. The engine calculates a confidence score to classify the intent into one of three primary categories: fix, plan, or flow.
  4. Based on the classified intent, the router automatically targets and forwards the payload to the optimal configured agent (e.g., cloud-code for bugs, deepseek-r1 for architecture, or kimi-k2.5:cloud for general queries).
  5. The response streams back to the console, while the query metadata is logged to the router dashboard for analytics.

Smart Model Router Setup

Ensure you have a working OpenClaw agent system on Linux or Termux (Android) with at least two configured agents. Follow these commands to set up this Openclaw Skills add-on:

# Run the automated setup script
bash scripts/setup.sh

# Append the router aliases to your shell configuration
echo 'source ~/.openclaw/workspace/intent-router-aliases.sh' >> ~/.zshrc
source ~/.zshrc

# Verify your intent detection setup
router-test "my app keeps crashing with null pointer"

Smart Model Router Data Schema & Taxonomy

The Smart Model Router organizes its configuration, aliases, and logging history in the following schema:

File / Resource Location / Command Description
Router Aliases ~/.openclaw/workspace/intent-router-aliases.sh Bash/Zsh shell aliases (fix, plan, flow, ask) for direct command-line execution
Analytics Export report.json Generated JSON report detailing routing distribution, hits, and confidence scores
History Logs router-history Internal database tracking recent intent classifications and model destinations

Intent Rules Table

Intent Trigger Words Default Targeted Agent
fix bug, error, crash, broken, exception, fail, debug, issue, problem, stuck cloud-code (CodeLLaMA)
plan design, architect, structure, how should, approach, strategy, pattern deepseek-r1 (Architect)
flow Default / Fallback kimi-k2.5:cloud (main)

Smart Model Router Advanced Features

  • Interactive Router Dashboard: Run router-dashboard to view detailed real-time routing statistics and model usage analytics.
  • Manual Intent Overrides: Override the automated router at any time using the --intent and --model CLI flags (e.g., ask --intent fix --model deepseek-r1 \"Debug this race condition\").
  • Historical Analytics Tracking: Access and audit recent model selections using the router-history --last 20 command.
  • Custom Data Exports: Easily export routing reports to JSON format using the --export flag for team performance monitoring or auditing within your Openclaw Skills suite.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*