Auto Agent Router for Openclaw

A sophisticated command-driven dispatcher that routes user prompts to specialized child agents for coding, writing, research, and analysis.

jiangzhiyu
v1.0.0
Mar 2, 2026
0
845
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install auto-agent-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 auto-agent-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 Auto Agent Router?

The Auto Agent Router is a foundational orchestration layer designed to enhance the modularity of your AI environment. By analyzing the start of every message for specific slash commands, it acts as a traffic controller that delegates tasks to the most qualified specialized model. This ensures that a coding request is handled by a dedicated coding model while a research task is routed to a high-reasoning LLM, maximizing the efficiency of your Openclaw Skills.

Built to support multi-agent workflows, this skill uses a strict trigger protocol to prevent accidental routing. It seamlessly integrates with the session spawning mechanism, allowing for parallel task execution and isolated execution environments. This approach transforms a single AI interaction into a collaborative team of experts tailored to your specific project needs.

Auto Agent Router Use Cases

  • Automatically spawning a dedicated coding session using the /coder command for software development tasks.
  • Routing documentation and creative content requests to optimized writing models via /writer.
  • Dispatching deep-dive research queries to specialized agents using /research.
  • Initiating automated data analysis and review workflows with the /analyze and /review triggers.
  • Implementing a smart fallback system where the /auto command intelligently selects the best agent based on prompt content.

How Auto Agent Router Works

  1. The system intercepts an incoming message and checks if it starts with a recognized command or a bot mention followed by a command.
  2. The auto-trigger.py script evaluates the message prefix against the strict routing rules defined in the configuration.
  3. If a match is found, the router.py module identifies the target agent and the specific LLM required for the task.
  4. The skill invokes the sessions_spawn utility to create a new child agent session, passing the task details to the specialized worker.
  5. The child agent processes the request independently and returns the formatted result to the primary interface, while the logger.py script tracks the entire lifecycle.

Auto Agent Router Setup

To deploy the Auto Agent Router within your Openclaw Skills workspace, ensure your environment supports Python 3 and configure the routing rules in the local config file.

# Navigate to the skill directory
cd ~/.openclaw/workspace/skills/auto-agent-router/

# Test the command trigger logic
python3 auto-trigger.py "/coder build a react component"

# Review the active agent routing configurations
cat config.json

# Monitor the routing logs for active sessions
tail -f /tmp/auto-route-handler.log

Auto Agent Router Data Schema & Taxonomy

The Auto Agent Router organizes its logic and configuration through a set of core files that define how Openclaw Skills interact with child agents.

Component Description
config.json Stores the routing table, including command mappings, model names, and priority levels.
auto-trigger.py The entry point script that validates message prefixes and handles @mentions.
router.py Logic for matching validated commands to specific child agent definitions.
logger.py Manages execution logs and performance metrics stored in the temporary system path.
rules (Array) A collection of JSON objects defining the relationship between keywords, agents, and priorities.

Auto Agent Router Advanced Features

  • Support for @mention routing, allowing the bot to parse commands even when prefixed with a specific user or bot handle.
  • Flexible rule-based configuration in config.json that allows users to add custom agents and specialized fine-tuned models.
  • Session isolation ensuring that child agents operate in independent contexts to prevent prompt injection or history leakage.
  • Real-time performance monitoring through a dedicated log file at /tmp/auto-route-handler.log for debugging complex Openclaw Skills workflows.
  • Intelligent fallback mechanism that defaults to a standard high-performance model if no explicit command is detected.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*