agentCLAWHUBUnverified

Super Router

LangGraph task router for OpenClaw that decomposes complex work into dependency-aware subtasks, routes each branch to PRO or FLASH models, retries or escalat... Skill: Super Router Owner: fanyadan Summary: LangGraph task router for OpenClaw that decomposes complex work into dependency-aware subtasks, routes each branch to PRO or FLASH models, retries or escalat... Tags: latest:0.1.5, openclaw:0.1.5 Version history: v0.1.5 | 2026-06-30T07:36:35.571Z | user Document dependency DAG handling and runtime dependencies in SKILL.md. v0.1.4 | 2026-06-30T06:29:44.925Z | user Improve t

OpenClaw

Rank

62

Safety

84

Downloads

962

Updated

Oct 12, 2026

Version

0.1.5

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 962 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 12, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 12, 2026
Adoption signal
962 downloadsadoption · observed Oct 12, 2026
Latest release
0.1.5release · observed Jun 30, 2026
Handshake status
UNKNOWNsecurity

What changed

Newest first. Only changes that point at a source are listed.

  • Release 0.1.5release

    Document dependency DAG handling and runtime dependencies in SKILL.md.

    Observed Jun 30, 2026 · source

Install and run

Setup complexity: low.

clawhub skill install s179ht9jn7zkzxwewsg4b9ztw585qv9t:super-router
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-fanyadan-super-router/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

144,345 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: super-router
description: "LangGraph task router for OpenClaw that decomposes complex work into dependency-aware subtasks, routes each branch to PRO or FLASH models, retries or escalates failures, and records token usage for auditable runs."
version: 1.0.0
author: Yadan Fan
license: MIT
metadata:
  openclaw:
    tags: [model-routing, langgraph, task-decomposition, multi-model, complexity-scoring]
    requires:
      bins: [python]
  related_skills: [btc_analyzer, api-tester, ddg-search]
---

# Super Router (LangGraph Edition)

Super Router decomposes complex work into dependency-aware subtasks, scores each branch for complexity and risk, and executes it on the right model role. It combines PRO/FLASH routing, provider fallback, FLASH retry and escalation, metadata extraction, LangSmith tracing, and token usage accounting into one auditable LangGraph workflow.

## Mandatory OpenClaw Invocation

For any request to use `super-router`, `super_router`, or `走 super-router`, do this exact workflow:

1. Use the OpenClaw `exec` tool to run:
   `/opt/homebrew/Caskroom/miniforge/base/bin/python /Users/fanyadan/.openclaw/skills/super-router/scripts/router.py '<task>'`
2. If `exec` returns `Command still running`, call the OpenClaw `process` tool with `action="poll"` on the returned `sessionId` until the process exits.
3. The next assistant message after completion must start with `Router result:` or `Router failed:` and must include a concrete detail from the router output.

Do not run `openclaw super_router`, `openclaw super-router`, `openclaw skill`, `openclaw skills`, or a nested `openclaw agent` command to satisfy this skill. Those are not the router.

## When to Use This Skill

Use super-router when you need:
- **Intelligent model routing** — automatically choose between heavy (PRO) and fast (FLASH) models per subtask
- **Task decomposition** — break complex tasks into structured subtasks with independent routing
- **Cost optimization** — use fast models for simple work, heavy models only when needed
- **Configurable models** — use deterministic defaults, with environment-variable overrides for each role
- **Failure escalation** — FLASH retry on infra failures, escalate to PRO on capability failures
- **Audit trail** — full logging of planned vs actual routes, retries, and failure classifications

**Not needed for:** Simple single-turn tasks, tasks where you already know which model to use, or when you want manual control over every routing decision.

## Optimization for Parallelism

To achieve true parallel execution (when `ROUTER_MAX_CONCURRENCY > 1`), the Planner must be instructed to use **Atomic Decomposition**. 

- **Atomic Decomposition**: Breaking a task into the smallest possible independent units rather than grouped phases.
- **Pitfall: Planner Grouping**: The Planner may occasionally group multiple entities into a single subtask, which kills true parallelism.
- **Verification**: Always verify the `planned_subtasks` count matches the 

README.md

# Super Router

Super Router is a LangGraph-based task router that decomposes a user request,
judges each subtask, and executes ready subtasks across PRO and FLASH model
roles. It is built for workloads where some branches need stronger reasoning
while others are simple reporting, formatting, or low-risk IO.

The current implementation supports planner and dependency fallback paths,
dependency-aware executor fanout, provider fallback lists, FLASH retry and
FLASH-to-PRO escalation, embedded technical metadata extraction, LangSmith
tracing, and token usage accounting.

## Workflow

![Super-Router LangGraph Architecture](super-router.png)

## What It Does

- Compacts long task text into deterministic context manifests before planning,
  judging, executing, metadata extraction, and finalization.
- Plans atomic subtasks with stable IDs and optional `depends_on` edges.
- Verifies and corrects the dependency DAG before execution.
- Scores each subtask on reasoning depth, code-change scope, ambiguity, risk,
  and IO heaviness.
- Routes subtasks to `PRO` or `FLASH` using model scores plus deterministic
  risk, summary, and confidence guards.
- Schedules only dependency-ready subtasks, fans them out with LangGraph
  `Send(...)`, joins completed waves, and repeats until the DAG is complete.
- Executes model calls through Codex CLI, Gemini CLI, Claude Code CLI, or
  Ollama, selected by model name.
- Retries FLASH on transient infrastructure failures and escalates to PRO on
  quality or capability failures.
- Extracts compact "technical gold" metadata from successful executor outputs
  inside each executor branch.
- Produces the final report through a FLASH finalizer, then a PRO finalizer,
  then a deterministic fallback report if model finalization fails.
- Tracks provider token usage per run, prints an aggregate summary, and can
  persist append-only JSONL records.

## Repository Layout

```text
.
|-- README.md
|-- SKILL.md
|-- super-router.png
|-- references/
|-- scripts/
|   |-- render_super_router_diagram.py
|   `-- router.py
|-- templates/
`-- tests/
    |-- __init__.py
    `-- test_router.py
```

| Path | Purpose |
| --- | --- |
| `SKILL.md` | OpenClaw skill contract, usage notes, architecture summary, and environment reference. |
| `scripts/router.py` | Main LangGraph router, provider dispatch, fallback logic, telemetry, token accounting, and CLI. |
| `scripts/render_super_router_diagram.py` | Deterministic diagram renderer; verifies the diagram node set against `build_router_graph()`. |
| `super-router.png` | Current architecture diagram used by this README. |
| `tests/test_router.py` | Offline regression tests using `unittest` and mocks. |
| `references/` | Supplemental operational notes. |
| `templates/` | Shell helper templates. |

## Requirements

- Python 3.10+.
- `langgraph` for the runtime graph.
- `langsmith` only when optional telemetry is enabled.
- `Pillow` only when regenerating `super-router.png`.
- At least one usable model provider:
  

_meta.json

{
  "ownerId": "kn71hy12wp4z8b19wb103v938d81yez7",
  "slug": "super-router",
  "version": "0.1.5",
  "publishedAt": 1782804995571
}

references/background-artifact-launches.md

# Background Router Artifact Launches

Use this pattern when a user asks to run super-router in background mode and produce a durable artifact such as an HTML report.

## Pattern

1. Build small, auditable support files before launching:
   - a source/context collection script, if the task depends on local code or data;
   - a router prompt file for complex/multiline task text;
   - a wrapper script that records `run_dir`, status, router stream log, final artifact path, and verification results.
2. Launch the wrapper with `exec(background=true, notify_on_complete=true)`.
3. If the launch succeeds, immediately poll once to verify the process is actually running or completed with useful output.
4. The wrapper should tee router stdout/stderr to a log and preserve the exact prompt/context used for the run.
5. For artifact-producing jobs, generate or finalize the artifact only from real collected context and router output. If router/provider execution fails, the artifact may still be created only if it truthfully records the failure/log tail and uses verified local context; never hide a failed router run behind a polished report.
6. Verify the final artifact directly before claiming success, e.g. `wc -c`, section/card counts, and any required source-derived sections.
7. If the command guard blocks the launch, do not retry, rephrase, or work around it. Report the prepared files and the exact blocked launch scope, then wait for user approval.

## Wrapper skeleton

```bash
#!/usr/bin/env bash
set -u
SRC="$HOME/path/to/source"
RUN_DIR="$HOME/.openclaw/logs/task_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$RUN_DIR"
CTX="$RUN_DIR/source_context.md"
PROMPT="$RUN_DIR/router_prompt.txt"
LOG="$RUN_DIR/super_router_stream.log"
OUT="$HOME/path/to/output.html"
STATUS="$RUN_DIR/status.txt"

python3 collect_context.py "$SRC" "$CTX" 2>&1 | tee -a "$STATUS"
{
  /bin/cat prompt_base.txt
  printf '\n\n# Source-derived context\n\n'
  /bin/cat "$CTX"
} > "$PROMPT"

ROUTER_EXIT=0
(
  export ROUTER_TASK="$(/bin/cat "$PROMPT")"
  /opt/homebrew/Caskroom/miniforge/base/bin/python \
    "$HOME/.openclaw/skills/super-router/scripts/router.py" --stream
) 2>&1 | tee "$LOG" || ROUTER_EXIT=${PIPESTATUS[0]}

python3 generate_artifact.py "$SRC" "$CTX" "$LOG" "$OUT" 2>&1 | tee -a "$STATUS"
BYTES=$(wc -c < "$OUT" | tr -d ' ')
SECTIONS=$(grep -Eo '<section id="[^"]+"' "$OUT" | wc -l | tr -d ' ')
printf '[verify] html=%s bytes=%s sections=%s router_exit=%s\n' \
  "$OUT" "$BYTES" "$SECTIONS" "$ROUTER_EXIT" | tee -a "$STATUS"
```

## Why this matters

Background router jobs otherwise become opaque: the user sees only that a process was launched, while the prompt, source evidence, partial provider output, and artifact verification may be scattered or lost. A wrapper turns the job into a reproducible run directory and makes blocked launches safe to report without pretending work is still running.

references/gemini-cli-ripgrep-path-fix.md

# Gemini CLI ripgrep Detection Fix

## Problem
During super-router runs, the Gemini CLI repeatedly logs:
> "Ripgrep is not available. Falling back to GrepTool"

This occurs even when ripgrep is correctly installed at `/opt/homebrew/bin/rg` and PATH is set in `~/.openclaw/.env`.

## Root Cause
The Gemini CLI binary performs its own internal tool discovery for commands like `rg`. When invoked via `subprocess.run`, these child processes do not always inherit the environment variables (including PATH) that the router sets from `~/.openclaw/.env`.

## Solution
Force-prepend the required tool paths directly inside `invoke_gemini_cli()` before every subprocess call.

### Patch Applied
```python
# Force inject ripgrep + common tool paths
extra_paths = ["/opt/homebrew/bin", "/usr/local/bin"]
current_path = env.get("PATH", "")
path_parts = [p for p in extra_paths if p not in current_path.split(":")]
if path_parts:
    env["PATH"] = ":".join(path_parts + [current_path]) if current_path else ":".join(path_parts)
```

This replaces the previous conditional injection and ensures `rg` is always visible to Gemini's internal tools.

## Verification
After applying the patch, run any complex task through the router and confirm the "Ripgrep is not available" message no longer appears in the Gemini CLI stderr.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/fanyadan/skills/super-router",
      "sourceUrl": "https://clawhub.ai/fanyadan/skills/super-router",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:15:28.405Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-fanyadan-super-router/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-fanyadan-super-router/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:15:28.405Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "962 downloads",
      "href": "https://clawhub.ai/fanyadan/super-router",
      "sourceUrl": "https://clawhub.ai/fanyadan/super-router",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:15:28.405Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "0.1.5",
      "href": "https://clawhub.ai/fanyadan/super-router",
      "sourceUrl": "https://clawhub.ai/fanyadan/super-router",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-30T07:36:35.571Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-fanyadan-super-router/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-fanyadan-super-router/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 0.1.5",
      "description": "Document dependency DAG handling and runtime dependencies in SKILL.md.",
      "href": "https://clawhub.ai/fanyadan/super-router",
      "sourceUrl": "https://clawhub.ai/fanyadan/super-router",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-06-30T07:36:35.571Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 12, 2026.

For crawlers

This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.

  • One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements.
  • Every agent, one feed: /.well-known/ai-catalog.json
  • What this site sells, and the price: /.well-known/x402
  • Paid run-check: /api/v1/agents/clawhub-fanyadan-super-router/run-check

Sponsored

Ads related to Super Router and adjacent AI workflows.