Cloudflare Unveils Clef: Open-Source Decision Models and RL Fine-Tuning Platform
Cloudflare has released Clef and Clef-flash, open-source decision models compatible with the Jev API, offering enhanced speed and accuracy for agentic workflows.

Cloudflare has entered the burgeoning field of AI decision models with the release of Clef and Clef-flash, two open-source models designed for efficient and accurate classification tasks. These models are fully compatible with the Jev API, a standard for structured output models, and are hosted on Cloudflare's Workers AI platform. Available on Hugging Face under an Apache 2.0 license, Clef aims to provide a faster and more precise alternative to existing Large Language Models (LLMs) for agentic workflows that require deterministic outputs.
The concept of a decision model, as introduced by Typesafe AI's Jev System, involves producing bounded, structured outputs cheaply, quickly, and consistently. Unlike LLMs, which are often non-deterministic and open-ended, decision models are tailored for specific classification tasks within a workflow. For instance, a decision model can analyze a customer support message and classify its urgency and the appropriate team for handling it, returning typed answers with associated probabilities. This programmatic approach allows AI agents to autonomously gather context, make decisions, and take actions, or defer to human intervention when necessary, without constant retraining for new classification categories.
Cloudflare's Clef model has demonstrated significant performance improvements in internal testing. When used to classify website domains for Cloudflare's Threat Intelligence team, Clef processed and classified a domain in 2.2 seconds. In comparison, a fast general LLM like gpt-oss-120b took 4.7 seconds and provided fewer classifications. This substantial reduction in latency and increase in output quality can dramatically enhance threat intelligence workflows and accelerate the identification of malicious or legitimate domains, showcasing the potential for Clef in various agentic decision-making scenarios.
The name 'Clef' is an analogy to a musical clef, which assigns specific pitch names to staff lines and spaces, thereby defining the context for subsequent notes. Similarly, a decision model helps define the domain of context for subsequent actions. The 'CF' in Clef also subtly references Cloudflare. Key differentiators for Clef include a vision encoder, enabling it to process and classify image inputs—a capability not present in the current Jev text-only models. Furthermore, Clef boasts a 64k context window, significantly larger than Jev's 32k, allowing for more extensive input data to be analyzed.
Benchmarking against various decision-making evaluations, Clef and its faster variant, Clef-flash, have shown competitive results. On the Jev Decision Index, Clef achieved high scores in benchmarks like 'case exact' for Diffusion and API-Bank accuracy. Clef-flash, while slightly less accurate in some areas, offers remarkable speed. When evaluated on Typesafe's own suite, Clef models outperformed Jev in three out of four areas, with Clef-flash showing exceptional performance relative to its speed. Across 43 benchmarks, Clef models generally beat Jev in latency, with median latencies in milliseconds significantly lower.
Beyond the models themselves, Cloudflare is also launching a new reinforcement learning (RL) platform. This platform enables customers to fine-tune Clef models to their specific use cases, further enhancing their utility and adaptability. The combination of powerful, open-source decision models and a robust fine-tuning platform positions Cloudflare as a significant player in the AI agent development ecosystem, empowering developers to build more sophisticated and efficient autonomous systems.
Clef models are hosted on Cloudflare's Workers AI infrastructure, leveraging GPUs at the edge. This edge deployment minimizes network latency, ensuring that decisions can be made rapidly, even for high-throughput applications. Developers can integrate Clef into the critical path of their AI agents, combining it with LLMs also hosted on Workers AI to execute actions based on the decisions made. This integrated approach promises to streamline the development and deployment of advanced AI-powered applications.
The open-sourcing of Clef and the introduction of the RL fine-tuning platform underscore Cloudflare's commitment to advancing AI capabilities and making them accessible. By providing these tools, Cloudflare aims to foster innovation in agentic workflows, enabling businesses to build more intelligent, autonomous, and efficient systems across a wide range of applications, from threat intelligence to customer support and beyond.