Adaptive Routing
Tool: routing-adapt
Model: Advanced
Requires: ENABLE_ADAPTIVE_ROUTING=true
Trigger & Intent
Section titled “Trigger & Intent”Triggered by: Workflow efficiency degrading, or a request to “self-optimize routing” and prune unused agent paths.
Intent: Mutates and reinforces good pathways dynamically without hardcoded modifications. Uses biological metaphors (ACO, Hebbian, Physarum, Quorum, Annealing).
Resource Pooling
Section titled “Resource Pooling”Capability profile: adaptive_routing — requires structured_output, prefers cost_sensitive, fast_draft fallback. Gated by ENABLE_ADAPTIVE_ROUTING=true.
Required Skills
Section titled “Required Skills”| Skill | Role |
|---|---|
adapt-aco-router | Ant Colony Optimization — pheromone-trail routing reinforcement |
adapt-annealing | Simulated Annealing — global optimum routing discovery |
resil-clone-mutate | Clone-and-mutate strategy evolution |
adapt-hebbian-router | Hebbian learning — “neurons that fire together wire together” |
adapt-physarum-router | Physarum slime-mold network optimization |
adapt-quorum | Quorum sensing for distributed consensus |
resil-replay | Replay consolidation of learned paths |
Input Schema
Section titled “Input Schema”{ executionLogs: unknown[]; targetMetric: string;}Decisions & Throw-Backs
Section titled “Decisions & Throw-Backs”If the simulated annealing optimizer finds a structurally better layout, auto-updates the routing config and tests it against benchmarks. If tests fail, throws back to the previous routing table.
Success Chains
Section titled “Success Chains”Terminal node — does not chain to other workflows on completion.
FSM — Emergence from local interaction
Section titled “FSM — Emergence from local interaction”stateDiagram-v2
[*] --> RouteSignals
RouteSignals --> LocalFitnessInteraction
LocalFitnessInteraction --> RoutingPatternFormation
RoutingPatternFormation --> CoherenceCheck
CoherenceCheck --> WeakRouting: unstable agent alignment
CoherenceCheck --> StrongRouting: robust pheromone convergence
WeakRouting --> EvolutionaryPerturbation
EvolutionaryPerturbation --> LocalFitnessInteraction
StrongRouting --> OptimalWorkflowBehavior
OptimalWorkflowBehavior --> ConstraintFeedbackOnAgents
ConstraintFeedbackOnAgents --> LocalFitnessInteraction
OptimalWorkflowBehavior --> [*]
Execution Sequence
Section titled “Execution Sequence”sequenceDiagram
participant Orchestrator
participant Pool (Analytical)
participant Pool (Mechanical)
participant Tool (Context)
Orchestrator->>Pool (Analytical): Allocate Capability Profile
activate Pool (Analytical)
Pool (Analytical)->>Tool (Context): Issue Tool Calls (Parallel)
Tool (Context)-->>Pool (Analytical): Return Data
alt Shallow Loop
Pool (Analytical)->>Pool (Analytical): Auto-correct Schema
else Medium Loop
Pool (Analytical)->>Pool (Mechanical): Delegate Fixes
end
Pool (Analytical)-->>Orchestrator: Synthesis Gate
deactivate Pool (Analytical)
opt Deep Loop
Orchestrator->>Orchestrator: Complete Throw-back to Prior Stage
end