Screen records. Investigate the gaps.
Start with tools, code, and Jev system one decisions. Add an agent only when the available records leave something unresolved.
Alex Example, a fictional director at Example Logistics, appears in four supplied records. One concerns a different person. One describes an allegation. One contains a regulator's final administrative finding. The last does not identify Alex clearly enough.
Run it
Download the source, extract it, and open its folder. With Node 22.19 or later:
npm ci
npm run build
node examples/public-record-screening.mjs screen
node examples/public-record-screening.mjs investigate
node examples/public-record-screening.mjs unresolved
node examples/public-record-screening.mjs citation
All people and records are fictional. Tools, Jev answers, and agent responses are scripted. Nothing searches the live web or creates an external record.
Without an agent
Direct tools retrieve news and public records. A map applies the same questions to each record. One judgment node carries several independent decisions over the source and subject together:
- Identity: the same person, a different person, or unresolved.
- Role: the subject of the allegation, a witness, merely mentioned, or unclear.
- Evidence: an allegation, an official finding, neither, or unclear.
- Relevance: whether the reported conduct falls within the supplied screening criteria.
Code combines those answers into retained evidence, exclusions, and unresolved items. It preserves the source and each decision. A lawsuit remains an allegation; an administrative finding is not a criminal conviction. A namesake's record does not become evidence about the subject.
A direct tool saves the structured brief. There is no agent session in this path.
With an agent
The investigation workflow passes only unresolved items to a research agent. Its instructions are to find the missing context and return source evidence.
In this example, a fuller transcript establishes that Alex appeared as a witness. The workflow runs that source through the same complete decision rubric. The record stays visible, but is excluded from adverse evidence about Alex.
If the agent cannot find the missing evidence, the item stays unresolved. Completion does not turn an unknown into a match.
Test a decision separately
The example tests a role decision without running searches or saving a brief. A deliberately wrong answer labels a known witness as the accused. Its output can satisfy a schema while still failing the expected-answer check.
The citation example separately compares a draft claim with the whole supplied source context. “The director was convicted in this case” conflicts with a source saying that the civil lawsuit is pending and no ruling has been issued. Code flags the claim for review. This checks what the cited source establishes; it does not verify every fact in the world.
Read the workflows · Read the tests
Connect your own tools
The source exports workflow definitions and fixture runners. A host supplies direct-tool execution, Jev decisions, and—only for the investigation variant—an agent runner through the existing DSL interfaces. Replace the mock adapters with those integrations, and evaluate the decisions on representative records before relying on them.
The example uses parallel, call, map, judge, code, and optional agent steps. A bounded set of sources and a fixed rubric make the first path possible without an agent loop. Exploration belongs inside the agent step when the next search is not known in advance.
The semantic patterns follow TypeSafe's entity-alignment, parallel-question, and citation-checking documentation. The runnable examples use scripted responses, not measurements of Jev quality.