Skip to main content
GitHub

Routing Fixes

Change agent delegation patterns.

Routing fixes describe changes to how tasks are delegated between agents.

Configuration-Only Fixes

The fix runtime does not have a built-in routing fix applier. Routing fixes describe the desired routing change which is applied by the orchestration layer.

Use Cases

  • Route to specialist agents
  • Load balancing
  • Skill-based routing
  • Fallback agents

Configuration

{
  "fix_id": "fix-routing-001",
  "fix_type": "routing",
  "config": {
    "from_agent": "orchestrator",
    "routing_rules": [
      {
        "condition": "intent == 'research'",
        "to_agent": "researcher"
      }
    ]
  }
}

Routing Rules

Condition-Based

{
  "routing_rules": [
    {
      "condition": "task_type == 'code'",
      "to_agent": "coder"
    },
    {
      "condition": "task_type == 'research'",
      "to_agent": "researcher"
    },
    {
      "condition": "default",
      "to_agent": "generalist"
    }
  ]
}

Skill Matching

{
  "routing_rules": [
    {
      "match_skills": ["python", "data_analysis"],
      "to_agent": "data_scientist"
    },
    {
      "match_skills": ["writing", "editing"],
      "to_agent": "writer"
    }
  ]
}

Load Balancing

{
  "routing_rules": [
    {
      "strategy": "round_robin",
      "to_agents": ["worker_1", "worker_2", "worker_3"]
    }
  ]
}

Error-Based

{
  "routing_rules": [
    {
      "on_error": "TOOL.EXECUTION.TIMEOUT",
      "to_agent": "fallback_agent"
    }
  ]
}

Conditions

ConditionDescription
task_type == 'X'Match task type
intent == 'X'Match classified intent
error_code == 'X'After specific error
confidence < 0.5Low confidence routing
retry_count > 2After retries
defaultFallback condition

Strategies

StrategyDescription
first_matchFirst matching rule
highest_scoreBest skill match
round_robinDistribute evenly
least_loadedTo least busy agent
randomRandom selection

Common Fixes

Specialist Routing

{
  "fix_type": "routing",
  "config": {
    "from_agent": "orchestrator",
    "routing_rules": [
      {
        "condition": "contains(query, 'code')",
        "to_agent": "coder"
      },
      {
        "condition": "contains(query, 'research')",
        "to_agent": "researcher"
      }
    ]
  }
}

Error Recovery

{
  "fix_type": "routing",
  "config": {
    "on_error": {
      "TOOL.EXECUTION.TIMEOUT": "timeout_specialist",
      "REASONING.INFERENCE.HALLUCINATION": "fact_checker"
    }
  }
}

Load Distribution

{
  "fix_type": "routing",
  "config": {
    "strategy": "least_loaded",
    "pool": ["worker_1", "worker_2", "worker_3"],
    "health_check": true
  }
}

Next Steps