ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Agent Router

Route prompts to the optimal AI model based on task type, complexity, and cost constraints.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/sa9saq/agent-router
Or

Agent Router

Route prompts to the optimal AI model based on task characteristics.

What This Does

Analyzes a task/prompt and recommends the best model, considering task type, complexity, cost, speed, and context length.

Model Routing Table

Task TypeComplexityRecommendedFallback
Coding (generation)Highclaude-opus / gpt-5claude-sonnet
Coding (simple edits)Lowclaude-sonnet / gpt-4.1claude-haiku
Creative writingHighclaude-opusgpt-5
SummarizationLowclaude-haiku / gpt-4.1-minigemini-flash
Data analysisMediumclaude-sonnetgpt-4.1
Vision/ImageAnyclaude-sonnet / gpt-4.1gemini-pro
TranslationLowgpt-4.1-miniclaude-haiku
Long context (>100k)Anygemini-proclaude-sonnet
Real-time/fastAnyclaude-haiku / gpt-4.1-minigemini-flash
Math/reasoningHighclaude-opus / o3deepseek-r1

Instructions

  1. Analyze the task: Classify by type, complexity (low/medium/high), and constraints (cost, speed, context length).
  2. Check user preferences: Factor in model preferences, cost limits, or subscription tiers.
  3. Route decision: Using the table above, recommend primary + fallback model.
  4. For Codex CLI routing (local dev):
    • Heavy coding → codex exec (GPT-5.3-Codex, free via subscription)
    • Quick questions → current model
    • Cost-sensitive batch work → claude-haiku or gpt-4.1-mini
  5. Output format:
    🔀 Route: <task_type> | Complexity: <level>
    ✅ Recommended: <model>
    🔄 Fallback: <model>
    💰 Est. cost: <low/medium/high>
    💡 Reason: <why>
    
  6. Batch routing: For multiple tasks, create a routing plan table showing which model handles each task.

Edge Cases

  • Ambiguous tasks: Default to claude-sonnet as the best general-purpose choice
  • Multi-modal tasks (text + image): Ensure the chosen model supports vision
  • Context overflow: If input exceeds model's context window, suggest chunking or switching to a larger-context model
  • Rate limits: If primary model is rate-limited, auto-route to fallback

Requirements

  • No API keys or dependencies — this is a decision framework, not an API
  • Update routing table as model pricing/capabilities change

Metadata

Author@sa9saq
Stars1133
Views0
Updated2026-02-18
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-sa9saq-agent-router": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.