JevDraftPipeline when your application owns draft generation. It chains input checks, generation, complete-draft review and bounded revision. Only approved text appears in publishedText for the application to publish.
Example: a reply in a support console
A customer asks whether an unshipped order qualifies for a refund. Policy says they may apply but receipt depends on actual processing. A generator might instead claim “the refund has arrived.” Before showing a sendable reply, check the draft and rewrite it once if needed, without executing a refund to correct the wording. Use this pipeline when your application controls generation and publication. To intercept the Agent’s final answer directly, use response middleware.1. Define separate checks for input and draft
Initializejudge as in Application component setup. The input check receives the original request. The output check receives request, evidence and draft; write questions about those fields:
2. Connect generation and publish only approved text
Fixed strings make the inputs, mistaken draft and correction visible. Replace the twoFlux.just calls with your own text-only generators. JEV performs the checks through the supplied judge.
draft, complete review and attempt to target the failed conditions.
Neither generator nor reviser should rerun an Agent with write tools. Send a message only after successful completion. Do not stream intermediate generator fragments to the customer.
3. Handle nonpublishable outcomes
Only FAIL can trigger revision; ERROR/INCONCLUSIVE cannot. On normal rejection, authorized reviewers may inspect
draftText, but never publish it as a fallback. Error outcomes report zero revisions; do not infer prior call counts from it. Collect usage at the generator and client.
Cancellation propagates through active generation. The component does not stream unreviewed output. Show processing status if needed, then present the approved text in full.
Run the offline example
Thedraft scenario in JevApplicationScenarios supplies this request, evidence and both drafts. Set JEV_CP using the build instructions, then run:
JevApplicationScenariosTest in the examples module. Scripted generation and judgments do not measure live accuracy or latency.