Skip to main content
GitHub

Routing Fixes

Change agent delegation patterns.

Not available in this release

No new fix is generated or deployed today: fix generation runs after a diagnosis, which is held for the beta, and fix deployment is gated off. This page describes the fix type as designed.

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

Configuration-Only Fixes

The fix runtime has no applier for routing fixes: a routing fix that reaches it is dropped without being applied (see Fix Runtime). A routing fix describes a change to how your agents delegate work, for you to make in your own orchestration code; nothing in Risicare applies it.

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.HALLUCINATION.FACTUAL": "fact_checker"
    }
  }
}

Load Distribution

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

Next Steps