2026-10-06
Clef for Agent Routing: Pick the Next Tool with Probabilities
Use Clef for agent routing �?closed action lists, confidence thresholds, ticket-style state, and System One questions instead of brittle free-text tool calls.
Clef for agent routing is sharper than a generic “agent workflow�?pitch: given the current state, choose the next tool or branch from a fixed list, with calibrated probabilities you can threshold.
Chat LLMs often emit free text ("I should call search_docs now"). You then regex or JSON-mode your way to a tool name. A Clef decision model flips that: options are first-class; the model scores them.
## Pattern
text
State �? typed question (choice) �? probabilities over tools �? policy
search_docscreate_ticketrefund_flowask_clarifying_questionescalate_human
json
{
"type": "choice",
"instructions": "Select the next tool for the agent.",
"options": [
"search_docs",
"create_ticket",
"refund_flow",
"ask_clarifying_question",
"escalate_human"
]
}
- Log margin (top �?second). Thin margins �?clarifying question, not a silent tool call.
- Use Clef-flash for hot loops; escalate to full Clef when images or hard cases appear (benchmark notes).
- Prototype in the Clef Playground with production-like states before wiring your orchestrator.
- Ticket triage / classification
- Security allow · challenge · block gates
- Multi-step agents that only need a reliable router, not a full planner
- Clef model tutorial �?agent decision workflows
- How to use Clef state & question schema
- Docs
Ready to test? Open the Clef Decision Playground.