Cloudflare’s Clef targets fast, typed decisions for AI agents
Cloudflare has released Clef models, a family of open-weight models built to select among predefined options and return calibrated probabilities. Clef and the smaller Clef-flash use the Apache 2.0 license and are available through Hugging Face, Workers AI, and local inference frameworks.
Agentic applications repeatedly make bounded decisions: choosing a tool, routing a ticket, assigning severity, or deciding whether to escalate. General-purpose language models can handle those tasks through structured generation, but they still generate tokens and require output validation. Clef scores the allowed answers directly, which gives developers typed results without parsing free-form text.
Cloudflare positions Clef against Typesafe AI’s Jev System One, another model designed for decisions inside agent pipelines. Cloudflare reports lower median latency on its Decision Index 0.2.1 run, stronger results on several classification benchmarks, vision support, and a context window of up to 64,000 tokens.
Decisions without token generation
A decision model accepts a description of the current state and a schema containing typed questions. It returns a probability distribution over the allowed answers for each question. Applications can then apply thresholds, trigger human review, or pass the selected values to another workflow step.
Clef supports three question types:
noulfor binary true-or-false decisionschoicefor named options with descriptionsscorefor ordered categories such as severity levels
A request can combine all three types:
{
"state": "Checkout has been failing for every customer for the last hour.",
"questions": {
"urgent": {
"type": "noul",
"instructions": "Is this urgent?"
},
"team": {
"type": "choice",
"criteria": {
"billing": "Payments and invoices",
"technical": "Outages and errors"
}
},
"severity": {
"type": "score",
"criteria": ["None", "Minor", "Major", "Critical"]
}
}
}Clef evaluates the questions together and returns probabilities for every permitted option in one model pass. The caller retains control over the final policy, including minimum confidence, fallback behavior, and escalation rules.
Labels that change with each request
A conventional supervised classifier usually has a fixed output layer, so adding or renaming labels can require retraining. Clef receives the question schema as part of each request, allowing one deployment to handle changing labels and multiple decision fields.