Catalog/W family/W02
Proposed specificationSource-located exemplarH1

Routing

Select a specialized path for an input.

JOIN POINTinput_dispatchRECORD STATUSCandidate · v0.1.0
UML class view for Routing, showing participant roles, received calls, and analytical dependencies
FIG. W02 / UML CLASS VIEW
Object interaction diagram for Routing, showing role collaboration and a numbered message sequence
FIG. W02 / OBJECT INTERACTIONS
Context
Multiple specialized agent or tool paths are available.
Trigger
New input must be sent to a destination.
Structure
Route schema, classifier or rules, dispatch result, and unsupported case.
Effect
One route is selected and its decision is attributable to input evidence.
Requires
Routes have declared capabilities and selection criteria.
Ensures
The selected route can handle the input or returns unsupported.
Invariant
Dispatch never loses the original request or silently invokes multiple exclusive routes.
Violation
Classifier error or ambiguous route has deterministic fallback or escalation.

Negative control

An if statement inside one prompt is not an observable routing contract.

Permitted variation

LLM router, rules, handoff tool, nested graph, and default route.

Test obligation

Test each route, ambiguous input, unsupported input, and selection cost.

Evolution question

Did routing gain explicit alternatives and error handling?

PROMPT SKETCH
Select a route by declared capabilities and selection criteria. If no route can handle the input, return unsupported rather than silently falling back to a generic answer.
CODE DESIGN / PYTHON
def route(request, routes):
    candidates = [route for route in routes if route.can_handle(request)]
    if not candidates:
        return Unsupported(request.kind)
    chosen = max(candidates, key=lambda route: route.confidence(request))
    return chosen.dispatch(request)

Illustrative design sketch. Routing evidence is the selected route's capability, not the router's confidence alone. This example is a teaching aid, not implementation evidence or a conformance claim.

Join point
input_dispatch
Source locator
Anthropic
Lexical cue
(?i)\b(?:route(?:r|s|d|ing)?|dispatch[_-]?route|handoff[_-]?route)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.
Aliases
None
Canonical exemplar
openai/openai-agents-pythonexamples/agent_patterns/routing.py:10Support: examples/agent_patterns/README.md:21
Negative control
An if statement inside one prompt is not an observable routing contract.

Scope-anchored review. pohe-agent analyze <repo> --pattern W02 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗

Source-located exemplar

A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.

Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.

ANY-EVIDENCE FAMILY COVERAGE36/36

100.0% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.

Current lexical-cue repositories: 39 / 41
Canonical source anchoropenai/openai-agents-python 86bd29878b30examples/agent_patterns/routing.py:10

Triage agent routes to specialized agents.

Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:route(?:r|s|d|ing)?|dispatch[_-]?route|handoff[_-]?route)\b

This expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.