Arya Model Router for Openclaw

A sophisticated token-saving router that intelligently switches between economical and high-performance models to optimize API costs.

staratheris
v0.1.0
Feb 5, 2026
0
2.3k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install arya-model-router

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 arya-model-router 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 Arya Model Router?

Arya Model Router is a dedicated token optimization layer designed for Openclaw Skills to manage LLM expenses efficiently. It allows developers to maintain a cost-effective workflow by keeping the main agent on an economical model, such as GPT-4o-mini, and only escalating to high-tier models like GPT-4 when task complexity demands it.

By implementing a strategy of context briefing and sub-agent delegation, this skill prevents the common pitfall of passing massive context windows to expensive models. This architecture ensures that you only pay for high-tier intelligence when it provides genuine value, making it a critical component for scaling Openclaw Skills projects without ballooning budgets.

Arya Model Router Use Cases

  • Optimizing daily interactive chat sessions by using the cheapest available models by default.
  • Automatically routing complex architectural decisions or deep logic tasks to high-reasoning models.
  • Compressing large context data into concise briefs before passing them to premium endpoints.
  • Enforcing specific model tiers for specific tasks via forced mode commands.

How Arya Model Router Works

  1. The user interacts with the main agent, which remains on a low-cost model tier.
  2. The system evaluates the prompt using the router.py classifier against logic defined in rules.json.
  3. If the task is classified as requiring higher intelligence, the router generates an optional context brief to save tokens.
  4. A sub-agent is triggered using the specified 'pro' or 'default' model tier to handle the heavy lifting.
  5. The output from the sub-agent is returned to the main conversation flow, maintaining the lean context of the primary model.

Arya Model Router Setup

To integrate Arya Model Router into your environment, ensure you have Python 3 and Bash available. Follow these steps:

# Navigate to your skills directory
cd skills/arya-model-router

# Install required Python dependencies
pip install -r requirements.txt

# Customize your model tiers and escalation rules
nano rules.json

Arya Model Router Data Schema & Taxonomy

The skill organizes its logic and configuration through a clean file structure that allows for easy customization of routing behavior:

File Role
router.py The main execution script containing the classification logic and model switching code.
rules.json The configuration file where users define thresholds for cheap, default, and pro tiers.
README.md Detailed technical documentation for extending the router's capabilities.

Arya Model Router Advanced Features

  • Dynamic Model Tiering: Support for cheap, default, and pro tiers based on task complexity.
  • Briefing Engine: Optional context compression to reduce token overhead in expensive models.
  • Sub-agent Orchestration: Ability to spawn specialized agents for specific parts of a workflow.
  • Editable Logic: Fully customizable routing rules via an external JSON configuration file.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*