intelligence-route

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Intelligence Routing

智能路由

Route tasks to the best agent and model based on learned patterns.
基于学习到的模式将任务分配给最佳Agent和模型。

When to use

使用场景

Before starting any task, use intelligence routing to get the optimal agent type, model tier, and confidence score. This replaces manual agent selection with data-driven decisions.
在启动任何任务之前,使用智能路由获取最优Agent类型、模型层级和置信度评分。这将以数据驱动的决策替代手动选择Agent的方式。

Steps

步骤

  1. Get routing recommendation — call
    mcp__claude-flow__hooks_route
    with the task description
  2. Check model recommendation — call
    mcp__claude-flow__hooks_model-route
    for the optimal model tier (Haiku/Sonnet/Opus)
  3. Search for similar patterns — call
    mcp__claude-flow__hooks_intelligence_pattern-search
    to find past successes
  4. Predict outcome — call
    mcp__claude-flow__neural_predict
    with the task description
  5. Spawn the recommended agent at the recommended model tier
  6. Record outcome — after task completes, call
    mcp__claude-flow__hooks_model-outcome
    to train the router
  1. 获取路由推荐 — 调用
    mcp__claude-flow__hooks_route
    并传入任务描述
  2. 查看模型推荐 — 调用
    mcp__claude-flow__hooks_model-route
    获取最优模型层级(Haiku/Sonnet/Opus)
  3. 搜索相似模式 — 调用
    mcp__claude-flow__hooks_intelligence_pattern-search
    查找过往成功案例
  4. 预测结果 — 调用
    mcp__claude-flow__neural_predict
    并传入任务描述
  5. 启动推荐的Agent — 使用推荐的模型层级
  6. 记录结果 — 任务完成后,调用
    mcp__claude-flow__hooks_model-outcome
    来训练路由系统

3-Tier Model Routing

三层模型路由

TierHandlerWhen
1Agent Booster (WASM)Simple transforms — skip LLM entirely
2HaikuLow complexity tasks (<30%)
3Sonnet/OpusComplex reasoning, architecture, security
层级处理器使用场景
1Agent Booster (WASM)简单转换操作 — 完全跳过LLM
2Haiku低复杂度任务(<30%)
3Sonnet/Opus复杂推理、架构设计、安全相关任务

CLI alternative

CLI替代方案

bash
npx @claude-flow/cli@latest hooks route --task "description"
npx @claude-flow/cli@latest hooks pre-task --description "description"
npx @claude-flow/cli@latest hooks explain --topic "routing decision"
bash
npx @claude-flow/cli@latest hooks route --task "description"
npx @claude-flow/cli@latest hooks pre-task --description "description"
npx @claude-flow/cli@latest hooks explain --topic "routing decision"

Viewing intelligence stats

查看智能统计数据

Call
mcp__claude-flow__hooks_intelligence_stats
or:
bash
npx @claude-flow/cli@latest hooks intelligence stats
调用
mcp__claude-flow__hooks_intelligence_stats
或:
bash
npx @claude-flow/cli@latest hooks intelligence stats