Clef: Cloudflare's Decision Model for AI Agents

Clef: Cloudflare's Decision Model for AI Agents

Clef is Cloudflare's decision model: 209 ms median latency, probabilities instead of text, hosted on Workers AI. Here is what it changes for anyone automating workflows.

Clef is a Cloudflare decision model: instead of generating text, it takes a context and a question and returns a typed answer with a probability. The company launched two versions on October 1, 2026, Clef and Clef-flash, hosted on Workers AI and with open weights on Hugging Face under the Apache 2.0 license. According to Cloudflare, Clef leads the Jev Decision Index and has a median latency of 209.3 ms per decision, against 524.1 ms for Jev, the model that opened this category.

For anyone automating support, lead triage or moderation, the consequence is direct: classification work no longer needs an expensive, slow general-purpose LLM. The announcement is on the Cloudflare blog, signed by Michelle Chen, Alex Reneau and Kevin Flansburg.

What is a decision model?

A decision model classifies an input and returns bounded, structured outputs with probabilities, so your code can decide what to do. Cloudflare’s example is a support message: you ask whether it is urgent and which team should handle it, and the model answers with typed values your system uses to route the ticket, escalate or call a human.

The difference from an ordinary LLM is predictability. LLMs, in the company’s words, are largely non-deterministic, open-ended enough to reason and to generate text and tool calls. A decision model does the opposite: the output fits a schema you defined. Cloudflare points to Jev System One, from Typesafe AI, as the model that popularized the concept in recent weeks.

One internal use case: Cloudflare’s Threat Intelligence team passes a domain to Clef, together with Browser Run, and gets categories with probabilities (95% chance of a fashion site, 85% ecommerce, under 1% phishing). The fetch, render and classify cycle took 2.2 s. gpt-oss-120b, their fastest general LLM, took 4.7 s in the same workflow and returned only two classifications.

How is Clef different from Jev?

Clef differs in three ways Cloudflare lists itself. It has a vision encoder, so it classifies images as well as text (Jev, today, does text only). It has a 64k-token context window, against Jev’s 32k. And it scores above Jev on most of the benchmarks the company ran.

The numbers below are Cloudflare’s, from a selection of Jev Decision Index tests. Note that it shows where it loses too:

Benchmark Clef Clef-flash Jev
BFCL (case exact) 98.47 98.76 95.75
API-Bank (accuracy) 91.93 93.11 88.19
BANKING77 (macro-F1) 94.20 90.93 79.74
CLINC150+OOS (macro-F1) 97.43 66.77 89.27
When2Call (accuracy) 72.37 65.58 80.97
BRIGHT (nDCG@10) 45.91 39.26 47.52

Jev wins on When2Call and BRIGHT. Clef-flash drops sharply on CLINC150+OOS (66.77, against 97.43 for the full Clef). On Typesafe’s own suite, Clef beats Jev in 3 of 4 workflows (invoice processing, customer service and security incidents) and loses on agent trace observability, 68.5 to 71.6.

You can check everything on the public benchmark demo. Since Cloudflare chose and ran the tests, treat them as a starting point, not a verdict.

How fast is Clef?

Clef is faster than Jev and slower than Clef-flash. At the median, Clef takes 209.3 ms, Clef-flash 38.8 ms and Jev 524.1 ms. At the 95th percentile, the three sit between 122.4 ms and 536.0 ms:

Latency Clef Clef-flash Jev DiffusionGemma Jev Kev 9B Laya
Median (ms) 209.3 38.8 524.1 84.4 51.4 5.8
p95 (ms) 238.6 122.4 536.0 211.2 187.9 222.5

One thing to notice: Cloudflare’s text says its models beat the competition on latency, except Laya. Its own table shows something else. At the median, the full Clef also loses to DiffusionGemma Jev and Kev 9B. The one that beats everything except Laya is Clef-flash. If latency is your bottleneck, flash is the one you want.

The speed comes from the architecture. Clef runs a single pass over the input and scores the valid schema options in parallel, without generating text token by token. The base is a frozen Qwen model with low-rank adapters trained on top.

How will Cloudflare let you train your own Clef?

Cloudflare offers reinforcement-learning fine-tuning of Clef, first with its engineers working alongside the customer, later as a self-serve platform. The flow uses pieces that already exist on the platform: AI Gateway stores your AI traffic and builds the dataset, Workers AI generates rollouts from the base model, Containers serves as the scoring sandbox, a new component called Trainer updates the weights, and the tuned model goes back to Workers AI.

It admits you may lose general performance in exchange for accuracy in one domain. The internal example is deciding whether a crawler is a good or bad bot, with more than 15 years of labeled data. The same applies if you have your own history of tickets, leads or content reviews. If that interests you, Cloudflare has a design partner form.

This move connects with what I wrote about Kitesurf, Cloudflare’s browser for agents: the company is assembling the whole agent stack (browser, decision, training) on top of its own network. If you also use Cloudflare to block or allow AI bots, you will see these pieces meeting.

What should you test on Monday?

The first step is to separate, in your automation flow, what is a decision from what is generation. Email triage, lead classification, comment filtering and ticket routing are decisions: the answer is one of a few options. Today many people use a large LLM for this and pay the bill in time and cost.

Then, a short checklist:

  1. List three decisions in your flow that currently go through an LLM and write down the valid options for each.
  2. Run those decisions on Clef, through Workers AI or locally with the weights from Hugging Face, and compare accuracy and time with what you use today.
  3. If latency is the problem, try Clef-flash, knowing it errs more on tasks with many categories.
  4. Check the model documentation on Workers AI before going to production: pricing and limits are not in the announcement.

I would run the test on a no-risk case first, such as tagging comments, before letting the model decide anything that touches customer money. Anyone who has been through a bank audit knows: an automatic decision is only worth it when someone can reconstruct why it was made, and the probability Clef returns helps with that.

What does Clef mean, in short, for anyone automating processes?

Clef is an open (Apache 2.0) decision model that returns structured answers with probabilities, accepts text and images, has a 64k-token context and, according to Cloudflare, leads the Jev Decision Index with a 209.3 ms median. Clef-flash trades accuracy for speed (38.8 ms). Neither wins at everything: Jev still wins some tests, and the numbers are Cloudflare’s own.

Your move is to test with your own data on low-risk classification tasks, measure accuracy and time against what you use today, and only then expand. Reinforcement-learning fine-tuning is still an assisted service, with no self-serve platform yet.

Back to Blog