Swap in decision model Jev to end agent loops without extra LLM calls

_nerdai_ · x · 2026-10-01

The author added a bonus example to Chapter 4 of Build a Multi-Agent System (From Scratch): after each step, the agent must decide whether to continue or return the result. Originally the backbone LLM made this call via structured output—and on the final step it also wrote an answer that got thrown away.

The new example hands the decision to @typesafeai's Jev model: it receives the execution state (instruction, steps so far, latest response) and answers one yes-or-no question via the Noul question primitive, returning a probability score. If it clears a threshold, the loop returns the result with no LLM call at all; otherwise the LLM writes only the next step.

Related event: New Book Chapter Uses Small Decision Model to Control Agent Loop Termination(2 posts)→

Original post →

More from coding & agent

coding & agent channel →