A stream often needs something its records do not carry. A score from a fraud service, a status from a provider, a severity judged by an AI model. So each record asks a remote service a question, and the answer enriches the record. The previous post measured what such calls cost in Kafka Streams. This post puts one to work.

Our example triages new CVEs, the public records of software vulnerabilities. For a CVE that arrives without a severity, we ask an AI model to judge one from its description. We draw the design on Alginte's canvas, preview it without calling the model, and size it from the call's budget.

The model we ask is Jev, from TypeSafe AI. It opened a new category of models in September 2026, and others have followed since. Such a model does not write text. It reads a text, an event or a document, and answers a typed question about it: a label out of a set, a score on a scale, a yes or no. Each answer comes with probabilities, so the caller can set a threshold and handle an unsure answer differently.

The category is often called decision models. TypeSafe argues against the name. The model gives a judgment. The code around it decides. In decision analysis, a decision model is the rules that turn a condition into an action. That is the part the Split node plays in our example.

The example: triaging new CVEs

New CVEs come from the NVD API, the National Vulnerability Database's feed of every new record. In the seven days we captured, it published 3,393 of them, about 480 a day. Each record carries an id, an English description and a status. Most also carry a severity from their CNA, the organisation that assigned the CVE. About one in five arrives without one. For those, we ask Jev for a severity, judged from the description alone.

We saved those seven days to a file and sent its records to a Kafka topic, cve-published. In production, a connector or a small poller of the NVD API would feed it. That part is plain Kafka and not this post's subject: our streams start at the topic.

Two records from our capture show both cases. The first carries its CNA's severity, so it is routed with no call. The second has none, so it asks the model.

CNA severity CVE and its description
critical CVE-2026-15638. An unauthenticated user with access to Secret Server could leverage a padding oracle to decrypt or encrypt data using one of the server's cryptographic keys. The key itself is not exposed.
none CVE-2026-18869. IBM i 7.6, 7.5, 7.4, and 7.3 could allow a remote authenticated attacker to bypass security restrictions and access internal network services due to improper validation of FTP PORT and EPRT commands.

The question is a choice: one label out of critical, high, medium and low. The answer carries the label it chose, a probability for each label and a confidence.

Two streams

Alginte draws a Kafka Streams topology as a graph on a canvas. Each node is one step of the topology: a source, a filter, a split, a sink. Its logic is a SpEL expression. The console builds the topology from the drawing and runs it next to your cluster. The builder's overview covers the rest, and an earlier post shows a design drawn and run.

The design has two streams.

Stream A does the fast work. Its source reads cve-published. A Filter drops the rejected CVEs. A Split routes each record by its CNA severity: critical or high to triage-urgent, any other severity to triage-routine. A record without one goes to a third sink, severity-requests.

Stream B asks the model. Its source reads severity-requests. An Enrich node asks Jev about each record and adds the answer as judgment. A second Split routes by that answer. An answer with low confidence goes to triage-review. Otherwise the severity decides, as in stream A.

The slow step gets a stream of its own, so stream A never waits for the model.

Two stream designs on Alginte's canvas, one above the other. Stream A, which does the fast work, reads cve-published and keeps the records that are not rejected. A split sends a critical or high CNA severity to triage-urgent, any other CNA severity to triage-routine, and the rest to a sink named Questions. A dashed arrow labelled severity-requests leads down to stream B, which asks the model. Its source named Questions reads severity-requests. A node named Ask Jev calls the service jev and adds its answer as judgment. A split then sends each record to triage-review, triage-urgent or triage-routine.

The two-stream design, on the canvas.

The Enrich node

In stream B, the call is one node: Enrich from a service. It asks the service about each record and adds the answer under a field we name. The palette lists it under Stateless, as Enrich from a service (HTTP).

The one-minute video shows it in action. Click the image below to watch it on our site. We drag the node into stream B, pick the service and paste in the request and the answer mapping. The preview then shows a record with the model's answer added, marked in green. Short notes on screen explain each step, and the sections below go through them one by one.

Stream B on the canvas without its Enrich node: the source Questions, and below it the Split By judgment with its three sinks. From the palette's Stateless group, Enrich from a service is dragged between them and wired in. Its drawer opens, and the node is named Ask Jev. Choosing the service jev fills in the simulated answer: high, at a confidence of 0.71. The request and the answer mapping are pasted in, and the answer field is named judgment. The node's sample preview on CVE-2026-18869 then shows the record with a judgment added, marked in green: severity high, confidence 0.71. Seven short notes on screen explain the steps. The node is named for what it does, and the canvas shows the name. The service is one the console already knows. Its address and key stay in the console's config, never in the design. The simulated answer comes from the service's config, and nothing calls the model. The request is a SpEL expression over the record, sent as JSON. The mapping is optional. It picks what to keep, and without one the whole answer is added. The answer lands in the record under the field. The preview runs on the simulated answer, so you can design before the service exists.

The Enrich node, built from the palette. The simulated answer comes with the service, and nothing calls the model.

Watch the video on alginte.com

Where the service comes from

The drawer names the service, jev. It never holds the service's address or its key. Those belong to the console that runs the stream:

alginte.services.jev.kind=http-json alginte.services.jev.base-url=https://api.typesafe.ai alginte.services.jev.auth-scheme=Bearer alginte.services.jev.auth-value-env=TYPESAFE_API_KEY alginte.services.jev.timeout=5s alginte.services.jev.answer-example={"answers":{"severity":{\ "type":"choice","choice":"high",\ "probabilities":{"critical":0.12,"high":0.71,"medium":0.14,"low":0.03},\ "confidence":0.71}}} 

The key stays in an environment variable on the machine that runs the stream. Every setting is in the configuration reference.

The last line is one answer in the service's own shape. A node that chooses jev takes it as its simulated answer, which the preview adds in place of a call.

What the node asks, and where the answer goes

Our node sends the description, and keeps two parts of the answer:

Path suffix /v1/systemone Request {'model': 'jev-latest', 'state': value.get('description'), 'questions': {'severity': { 'type': 'choice', 'instructions': 'How severe is this CVE?', 'criteria': {'critical': null, 'high': null, 'medium': null, 'low': null}}}} Answer mapping {'severity': answer.get('answers').get('severity').get('choice'), 'confidence': answer.get('answers').get('severity').get('confidence')} Answer field judgment 

The request and the mapping are SpEL. The request builds the JSON the node sends: the model, the description as the state, and one question, severity, a choice of four labels. The mapping reads the answer and keeps the label and the confidence.

A record comes out with a judgment field: the severity the model chose, and its confidence. The node keeps every field of the record and adds this one. It never drops or reshapes the rest. If we wanted the severity at the top level, or fewer fields, a Map after the node would do it.

The node never routes. A Split after it does, by the answer:

Not sure value.get('judgment').get('confidence') < 0.6 → triage-review Critical or high {'critical', 'high'}.contains( value.get('judgment').get('severity')) → triage-urgent The rest the default → triage-routine 

The branches are tested in order, and the first that passes takes the record. So a high answer with a low confidence goes to review, not to urgent.

The threshold, 0.6, is a setting we picked. The related reading below shows how to fit one on your own data.

The preview never calls the model

Alginte previews a design's expressions on sample records before anything runs. The Enrich node takes part in that preview without making a call. A preview that called would pay for every keystroke. It would need the key on the machine where the design is drawn. And it could answer the same record differently twice. Instead, the node carries a simulated answer. The preview adds it exactly as the running stream adds a real one, through the same mapping and into the same field. It is labelled simulated answer, so it is never mistaken for the model's.

The node's sample preview on CVE-2026-18869. The record goes in with its id and description. It comes out with a judgment field added, marked in green: severity high, confidence 0.71. A note under it reads: simulated answer, the preview never calls the service.

The simulated answer also lets us try other answers. The Split after the node reads the judgment field, and its preview names the branch the record takes:

Answer Confidence Branch
high 0.71 Critical or high, to triage-urgent
high 0.3 Not sure, to triage-review
medium 0.9 The rest, to triage-routine

At 0.3 the preview marks Critical or high as not reached, though the severity is still high.

We also asked the real Jev about CVE-2026-18869, eleven times. It answered high every time, with a confidence between 0.61 and 0.65. So the record goes to triage-urgent, but only just over our threshold of 0.6.

Not every answer is that sure. We asked about ten more CVEs without a severity, picked for their vague descriptions. Eight came back below 0.6 and went to review. CVE-2026-79319 says only that "Stencil core 4.43.5 is vulnerable to Incorrect Access Control." Asked six times, Jev answered high every time, at a confidence between 0.37 and 0.45. Without the threshold, it would have gone straight to urgent.

Stream B on the canvas, with one node's drawer open at a time. The Ask Jev node adds its simulated answer to CVE-2026-18869: severity high, confidence 0.71. The Split's preview names the branch Critical or high, which goes to triage-urgent. Then the confidence in the simulated answer is changed to 0.3. The Split's preview now names Not sure, which goes to triage-review. It marks Critical or high as not reached. The Review sink's preview shows the record with confidence 0.3. Five short notes on screen explain the steps. The node adds its simulated answer to the sample record, as a real answer would be added. The Split's preview names the branch this record takes. Change the simulated answer, and nothing calls the model. Now Not sure wins: the branches are tested in order, so the next one is not reached. The record arrives at the review sink.

The simulated answer, edited from 0.71 to 0.3. Nothing calls the model, and nothing is deployed.

Watch the video on alginte.com

The preview shows the record the stream builds from an answer. It cannot tell whether the model's answers are good.

A budget for every call

The node's timeout is the call's budget, every retry included. Ours is 5 seconds. Our calls to Jev took about 0.2 seconds, so that leaves wide room. The previous post explains why a stream needs one. A call that fails or runs out of budget takes our fallback answer: the model's shape, with a confidence of 0. So the record lands in triage-review, and the stream keeps running.

Size it from the budget

The node's drawer checks the stream's throughput against the budget, by the previous post's arithmetic. When a setting would put the stream at risk, it warns and suggests a safe value, with a button that sets it. Ours needed max.poll.records at 30.

The drawer's Throughput section. Calls in flight: up to 1, since the input has 3 partitions on 1 stream thread. A warning says that max.poll.records, 1000, times the node's timeout of 5 seconds is 5000 seconds, more than half of max.poll.interval.ms. Its button sets max.poll.records to 30.

The short version

  • The model gives a judgment: a typed answer about a record, with a probability for each possible answer. The stream decides.
  • Give the call a stream of its own, so the fast work never waits for the model.
  • The design names the service. Its address and its key belong to the console that runs the stream.
  • The preview never calls the model. A simulated answer stands in, and the Split's preview names the branch each answer takes.
  • A Split tests its branches in order. Put the low-confidence branch first, or a high answer the model is unsure of goes straight to urgent.
  • A fallback answer with a confidence of 0 sends a failed call to review, and the stream keeps running.
  • Size from the budget. The node's drawer checks the throughput against it and suggests a safe value. At 5 seconds, max.poll.records needs to be 30.
  • The preview shows what the stream builds from an answer. Whether the answers are good is a question for your own data.

Related reading

  • Kai Waehner, How Decision Models Became a New AI Category After Jev (2026). Its section on calibration: test the confidence on your own cases, and fit the threshold on them. What falls below it goes to an LLM or a person.
  • Tuning the decision threshold for class prediction, from the scikit-learn 1.9 user guide. The model's probabilities and the decision taken on them are two problems. The threshold is tuned on held-out data. The guide is written for scikit-learn's own classifiers, but our node and its Split make the same split.

This product uses the NVD API but is not endorsed or certified by the NVD.

CVE records: Copyright © 1999-2026, The MITRE Corporation. Used under the CVE Program's terms of use.