详细分析 ▾
运行时依赖
安装命令
点击复制技能文档
Super 路由r (LangGraph Edition)
Intelligent task decomposition and 模型 routing using LangGraph 状态Graph. Automatically 路由s subtasks between PRO (heavy reasoning) and FLASH (fast) 模型s based on structured complexity assessment.
When to Use This 技能
Use super-路由r when you need:
Intelligent 模型 routing — automatically choose between heavy (PRO) and fast (FLASH) 模型s per subtask Task decomposition — break complex tasks into structured subtasks with independent routing Cost optimization — use fast 模型s for simple work, heavy 模型s only when needed Configurable 模型s — use deterministic defaults, with 环境-variable overrides for each 角色 失败 escalation — FLASH retry on infra 失败s, escalate to PRO on capability 失败s 审计 trAIl — full 记录ging of planned vs actual 路由s, retries, and 失败 classifications
Not needed for: Simple single-turn tasks, tasks where you already know which 模型 to use, or when you want manual control over every routing decision.
Core Architecture (LangGraph 状态Graph) Node Function Planner 接收s original task, calls local Ollama planner 模型 to 生成 ordered subtask array Judge Scores each subtask on 5 dimensions: reasoning_depth, code_change_scope, ambi图形界面ty, risk, io_heaviness; combines with thresholds + confidence to decide PRO/FLASH Dis补丁er Reads 路由r状态.current_step, 路由s via conditional edge to pro_executor or flash_executor PRO Executor Heavy reasoning 模型 (default: Gemini 命令行工具 preview 模型; override via 路由R_PRO_模型) FLASH Executor Fast 模型 with review/retry 记录ic (default: Gemini 命令行工具 preview 模型; override via 路由R_FLASH_模型) FLASH Review 验证s 输出 质量; distin图形界面shes infra 失败s (timeout, network) from capability 失败s; retries FLASH or escalates to PRO Metadata 提取器 提取s 'Technical Gold' (atomic high-precision facts) from step 输出 to 预防 finalizer timeouts and loss of detAIl Recorder/Finalizer 记录s every step; compiles final 报告 using a hybrid of Technical Gold and full 审计 trAIls; supports FLASH→PRO→deterministic fallback chAIn 安装ation # Required: LangGraph + Ollama pip 安装 langgraph
# Ensure Ollama is 运行ning locally ollama serve
# Pull recommended 模型s if you use Ollama-backed 角色s ollama pull gemma4:26b # Planner or PRO executor (high 质量, slow) ollama pull llama3.1:8b # Judge (fast scoring, recommended) ollama pull qwen3 # PRO executor ollama pull qwen2.5:7b # FLASH executor
Note: If you prefer gemma4:26b as the Planner, keep it there. For speed, the Judge should usually be llama3.1:8b or another 7B-14B 模型:
导出 路由R_PLANNER_模型=gemma4:26b 导出 路由R_JUDGE_模型=llama3.1:8b 导出 路由R_PRO_模型=gemma4:26b 导出 路由R_FLASH_模型=qwen2.5:7b
If you intentionally want an all-gemma4:26b Planner/Judge/PRO 设置up, use longer timeouts and 序列化d graph execution:
导出 路由R_PLANNER_模型=gemma4:26b 导出 路由R_JUDGE_模型=gemma4:26b 导出 路由R_PRO_模型=gemma4:26b 导出 路由R_FLASH_模型=qwen2.5:7b 导出 路由R_JUDGE_TIMEOUT=600 导出 路由R_MAX_CONCURRENCY=1
Usage Basic Usage (via exec)
When user says "走 super-路由r", "use super-路由r", or asks for 路由r analysis:
# Direct execution with task as argument terminal(command="/opt/homebrew/Caskroom/miniforge/base/bin/python ~/.hermes/技能s/mlops/inference/super-路由r/scripts/路由r.py '分析 K8s YAML 错误并重写配置'")
With 流ing (Node-Level 进度) terminal(command="/opt/homebrew/Caskroom/miniforge/base/bin/python ~/.hermes/技能s/mlops/inference/super-路由r/scripts/路由r.py --流 'Your complex task'")
Via 环境 Variable (代理 Compatibility)
For 代理s that struggle with non-ASCII arguments:
# Normalize task to short ASCII English, then pass as argument terminal(command="/opt/homebrew/Caskroom/miniforge/base/bin/python ~/.hermes/技能s/mlops/inference/super-路由r/scripts/路由r.py 'Analyze K8s YAML errors and fix'")
# Or via env var (if 代理 supports it) terminal(command="/opt/homebrew/Caskroom/miniforge/base/bin/python ~/.hermes/技能s/mlops/inference/super-路由r/scripts/路由r.py", env={"路由R_TASK": "Your complex task description"})
Handling Long-运行ning Execution
If exec returns "Command still 运行ning":
# Continue polling with process 工具 process(action="poll", 会话_id="<会话_id_from_exec>")
# WAIt for completion process(action="wAIt", 会话_id="<会话_id_from_exec>", timeout=300)
导入ant: Once process shows completion, your next 助手 message MUST 启动 with 路由r 结果: or 路由r fAIled: and include at least one real detAIl from the 输出 (e.g., "Planner fallback", "Ollama timed out", "BTC"). Never reply with just ---, punctuation, or empty lines.
环境 Variables Variable Purpose Default 路由R_PLANNER_模型 Task decomposition 模型 gemma4:26b 路由R_JUDGE_模型 Complexity scoring 模型 llama3.1:8b 路由R_PRO_模型 Heavy reasoning executor google-gemini-命令行工具/gemini-3-pro-pr