Knowledge Router for Openclaw

A lightweight routing layer designed to classify query intent and direct AI agents to the most relevant knowledge source without redundant reading.

lethehades
v1.0.0
Mar 11, 2026
0
657
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install knowledge-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 knowledge-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 Knowledge Router?

Knowledge Router acts as a sophisticated traffic controller for your AI's information ecosystem. Instead of performing exhaustive searches across all available data, it builds a lightweight routing layer across existing sources like MEMORY.md, daily logs, and skill references. This tool is essential for managing Openclaw Skills by ensuring that the agent decides where a question should be answered from before consuming excessive tokens or processing time.

By unifying the knowledge index, it distinguishes between rules, facts, methods, and evidence. This results in a cleaner, faster, and more logical retrieval process that prevents the accumulation of redundant data and focuses on high-quality recommendations based on clearly justified sources.

Knowledge Router Use Cases

  • Deciding the optimal source for a complex query before initiating broad reading tasks.
  • Creating a unified index across disparate knowledge files such as memory logs and audit records.
  • Detecting when temporary knowledge has matured enough to be promoted into a durable layer.
  • Reducing search noise by identifying primary and secondary sources based on specific query intent.

How Knowledge Router Works

  1. Source Scanning: The tool scans all known knowledge sources and classifies them based on their predefined roles.
  2. Intent Inference: It analyzes the user query to determine if the intent is a rule, fact, method, evidence, or improvement.
  3. Source Recommendation: It generates a routing report recommending the most relevant primary and secondary sources.
  4. Knowledge Promotion: The system emits promotion hints when specific knowledge segments appear mature enough for long-term storage.
  5. Report Emission: A structured report is generated to guide the agent's next steps.

Knowledge Router Setup

To integrate this capability into your Openclaw Skills environment, ensure you have the necessary reference files and python environment ready.

# Navigate to your agent's skill directory
cd skills/knowledge-router

# Run the router script with a query
python3 scripts/knowledge_router.py "How do I handle state?" --scope general --output report.txt

Ensure that your references/ directory contains source-types.md and routing-rules.md to provide the logic for the classification engine.

Knowledge Router Data Schema & Taxonomy

The Knowledge Router organizes information through a strict taxonomy defined in the references/ directory:

File Purpose
source-types.md Defines the knowledge source model (e.g., Memory vs. Audit).
routing-rules.md Maps query intent (fact/method) to specific sources.
promotion-rules.md Criteria for moving data from logs to durable documentation.
report-format.md Standardizes the output structure of the routing report.

Data is treated hierarchically, where audit logs serve as evidence and MEMORY.md acts as a primary state layer.

Knowledge Router Advanced Features

  • Promotion Logic: Automatically identifies when transient information should be extracted and codified into permanent documentation.
  • Scoped Routing: Use the --scope flag to limit routing logic to specific domains or projects.
  • Evidence-Based Auditing: Treats audit logs as secondary evidence rather than primary answer sources to maintain technical accuracy.
  • Minimal Surface Release: Built-in support for release-minimal.md to ensure the public interface of your Openclaw Skills remains clean and focused.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*