Cloudflare has announced “Clef” and “Clef-flash,” open-source models specialized in AI agent decision-making processes. This is driven by the goal of reducing inference costs and achieving high-speed workflow branching through a mechanism that directly returns the probabilities of choices rather than generating text like conventional large language models.
- The Full Picture of “Clef,” the Judgment-Specialized AI Released by Cloudflare
- The Definitive Difference Between Traditional Generative AI (LLMs) and Decision-Making-Specialized AI
- High Reliability Powered by the Qwen Foundation and Probability Calibration Technology
- Overwhelming advantage in inference speed and cost, and compatibility with existing models
- The Business Significance of Accelerating Processing Branches in AI Agents
- Providing Reinforcement Learning (RL) Infrastructure and the Future of Agent Automation
The Full Picture of “Clef,” the Judgment-Specialized AI Released by Cloudflare
On October 1, 2026, Cloudflare released “Clef,” a new model that significantly streamlines decision-making processes for AI agents, along with its lightweight version, “Clef-flash.” Both models are available under the open-source Apache 2.0 license on Hugging Face and the company’s serverless platform, Workers AI.
Traditional generative AI generates text one token at a time in response to user queries, meaning that making intermediate branching decisions alone requires a tremendous amount of computation time and cost. In contrast, Clef adopts a design that writes no text at all, instantly returning only the probabilities and evaluation scores for pre-provided choices.
In terms of model size, Clef has 27 billion parameters (based on Qwen3.8-27B) and Clef-flash has 9 billion parameters (based on Qwen3.5-9B), with both supporting a long-context window of up to 65,536 tokens. Furthermore, they feature a multimodal architecture capable of processing not only text and JSON, but also up to four images.
As shown in the conceptual diagram below, AI agents serve as a command center when processing complex business procedures.

The Definitive Difference Between Traditional Generative AI (LLMs) and Decision-Making-Specialized AI
When using general Large Language Models (LLMs) for automated inquiry routing or urgency determination, it has been necessary to have the AI output text including the reasoning and then programmatically parse that text. This method generates an output of several hundreds of tokens per decision, constantly carrying the risks of response latency and formatting errors.
Meanwhile, Clef—an AI specialized in decision-making (a decision model)—completes its computations with just a single forward pass that processes the entire input all at once. By eliminating the autoregressive processing that generates intermediate text, it has successfully reduced unnecessary output tokens to absolute zero.
The following three question formats are available to provide to Clef:
- noul: A format that returns the probability of “yes” (from 0 to 1) in a binary yes/no choice
- choice: A format that selects the optimal one from 2 to 255 choices and returns the probability and confidence score for each candidate
- score: a format that calculates a 2-to-10-level ordinal rating using probability weighting
Users will now be able to programmatically and accurately control conditional branching based on probability values, such as “automatically execute if the probability is 0.9 or higher, and have a human review it if it is less than 0.9.”
Clef’s Technical Architecture, Performance, and Cost
High Reliability Powered by the Qwen Foundation and Probability Calibration Technology
In developing Clef, Cloudflare’s Workers AI team adopted the Qwen series as the base model. Specifically, while keeping the base model’s parameters frozen, they conducted training by combining a judgment head for making decisions with LoRA (Low-Rank Adaptation with a rank of 256).
Rather than simply enabling the model to select the correct answer, thorough tuning was applied to probability calibration to achieve a state where “an 80% probability judgment output by the model is actually correct 80% of the time.” In addition to the standard cross-entropy loss, the loss function incorporates the Brier loss, which measures the discrepancy between the predicted probabilities and the actual correct answers.
Furthermore, by applying RLCD (Reinforcement Learning for Calibrated Decisions), a reinforcement learning method, we implemented partial credit evaluation and adjustments when adjacent choices are selected. This suppresses the “groundless overconfidence” that tends to occur with conventional LLMs, achieving reliable numerical outputs for practical operations.
The internal structure and processing flow of the evaluation model are as follows.

Overwhelming advantage in inference speed and cost, and compatibility with existing models
According to measurement data released by Cloudflare, the median response time for Clef-flash was 38.8 milliseconds, while the larger Clef recorded 209.3 milliseconds. This achieves a significant speedup compared to TypeSafe’s Jev (median of 524.1 milliseconds), a preceding competing judgment model.
There are also significant advantages in terms of usage fees. The price per 1 million input tokens in Workers AI is set at $0.09 for Clef-flash and $0.24 for Clef. Since no output tokens are generated, output costs are completely zero, making it possible to reduce costs to approximately one-fifth compared to cases where a standard LLM is made to respond in JSON format.
Additionally, in terms of API design, it maintains full compatibility with TypeSafe’s API for Jev (System One). Developers can instantly migrate to Clef simply by updating the connection endpoints and model names in their existing code for Jev.
In the intent classification test on the “BANKING77” evaluation benchmark, Clef recorded a score of 94.2, significantly outperforming Jev’s 79.7.
Significance for Practical Application and Future Automation Infrastructure
The Business Significance of Accelerating Processing Branches in AI Agents
In building modern AI agents, a single task completion involves a chain of several to dozens of decision-making steps. Calling a general-purpose LLM at each step causes latency to accumulate, resulting in a significant drop in the overall system’s responsiveness.
By adopting Clef, “small decisions”—such as security guardrails, initial triage of customer support inquiries, determining the necessity of re-search in RAG (Retrieval-Augmented Generation), and API tool selection—can be processed quickly and cost-effectively.
In a proof-of-concept experiment conducted by Cloudflare’s internal threat intelligence team, they successfully halved the processing time for the website domain classification workflow compared to using a general-purpose LLM (gpt-oss-120b).
Also, since the weights are openly available under the Apache 2.0 license, it is also possible to download them to your own local environment (such as a Mac or GPU server) and run inference in a closed environment without sending data externally.
Providing Reinforcement Learning (RL) Infrastructure and the Future of Agent Automation
Along with the release of Clef, Cloudflare also announced plans for a reinforcement learning (RL) platform that enables companies to fine-tune Clef to their own business data.
This infrastructure automatically generates training datasets from production access logs that pass through the AI Gateway. Afterward, it builds a cycle of replaying and scoring the agent’s past actions in an isolated container environment, and updating model weights through the new “Trainer” product.
Currently, it is offered to design partners with the hands-on support of the company’s engineers, but in the future, we aim to provide an environment where users can build and deploy their own decision-making models on a self-service basis.
The emergence of “decision-making models” that separate judgment processing from text generation will serve as a vital infrastructure technology for AI agents to autonomously execute practical business tasks. Moving forward, domain-specific automation combined with corporate proprietary data is expected to accelerate even further.
Reference Page
- 【Introducing Clef: our open-source decision models, and new RL fine-tuning platform】https://blog.cloudflare.com/clef-decision-models/
- 【Cloudflare/clef(Hugging Face)】https://huggingface.co/Cloudflare/clef
- clef Model Page (Cloudflare Docs)
[#Cloudflare #AI Agents #Clef #Open Source #Decision-Making Model #Generative AI]


コメント