Write the sequence
The agent can call jev.find, inspect the answer, and call jev.check for only the excerpts worth reviewing.
CODE MODE FOR JEV
System One exposes Jev's typed decisions as functions an agent can compose. It can inspect supplied evidence, ask the next question only when needed, and return a focused result in one MCP call.
Hosted MCP only. Free early access has daily limits. Your agent keeps the task, original evidence, actions and final answer.
Run a short plan with conditions and loops.
Every Jev call uses this connection's scopes and allowance.
Return a focused result to the agent, which keeps the final action.
These are service limits, not measured speed or cost savings. Hosted Code Mode has a separate daily execution limit.
ONE PLAN · SEVERAL BOUNDED JUDGMENTS
The agent supplies evidence, calls Jev only where judgment helps, and uses ordinary conditions and loops to decide what to check next.
async () => {
const excerpts = [
{ id: "callback", text: "OAuth callback returned 504 after 12s." },
{ id: "database", text: "No database errors in this request." }
];
const match = await jev.find({
question: "Which excerpt explains the failed login?",
sources: excerpts
});
if ((match.value.answerExists ?? 0) < 0.7)
return { next: "inspect more evidence", reviewed: [] };
const reviewed = [];
for (const candidate of match.value.ranking.slice(0, 2)) {
const source = excerpts.find(item => item.id === candidate.id);
if (!source) continue;
const verdict = await jev.check({
claim: "The OAuth callback timed out.",
evidence: [source]
});
reviewed.push({ id: source.id, support: verdict.value.supported });
}
return { next: "agent reviews", reviewed };
}WHAT THIS CHANGES
This example can make one to three Jev calls inside the code run. Each inner call still uses the connection's scope and allowance.
Working from a file? With separate document consent, the agent can upload it by HTTP and call jev.searchDocuments inside the plan. Only that connection can search it, and it expires after 12 hours.
Illustrative code, not a live evaluation or measured speedup. Jev returns probabilities, and the agent must treat an uncertain result as uncertain. Hosted Code Mode has separate daily execution limits.
WHY CODE MODE HELPS
A direct tool is best for one question. Code Mode helps when a result determines the next question.
The agent can call jev.find, inspect the answer, and call jev.check for only the excerpts worth reviewing.
Intermediate answers stay inside the code run. The agent receives the selected IDs, probabilities and next step it chose to return.
A low answer-exists result can stop the loop and send the agent back for better evidence. A useful result can trigger another bounded check.
Each inner call uses the connection's granted tools and daily allowance. The code cannot take application actions or reach the network directly.
THE CURRENT CONTRACT
The agent supplies the evidence and exact options. Jev returns a typed choice, score or probability.
jev.find(…)Rank supplied excerpts against a question and report whether any answers it.
jev.check(…)Check whether supplied evidence supports or contradicts a claim.
jev.select(…)Compare a short list of options, including the possibility that none fits.
jev.evaluate(…)Ask up to eight independent typed questions over one evidence set.
jev.searchDocuments(…)Find short excerpts in temporary files owned by this exact connection. Requires separate document consent.
jev.run(…)Use a saved recipe published to this connection when its policy fits the task.
For a single question, use jev.noul(…), jev.choice(…) or jev.score(…). Connections with other service grants can use their corresponding methods. Direct MCP tools remain available.
TEMPORARY DOCUMENTS · EXPLICIT CONSENT
Upload file bytes directly to a private, one-use HTTP URL. The MCP call carries a document ID and search query, not the file body.
jev.searchDocuments03 Check an excerpt with Jev04 Return a compact findingThe file belongs to the exact connection that uploaded it. A second connection cannot list, search or delete it, even on the same account. Documents become inaccessible after 12 hours; you can delete one sooner. Search is deterministic and does not itself call Jev.
THE PERFORMANCE CASE
A dependent plan can make several Jev calls inside one outer MCP call. It can avoid returning every intermediate answer to the agent's context. That can remove agent round trips when later calls depend on earlier results.
TypeSafe lists Jev input at $0.042 per million tokens. At 10,000 checks of 1,000 input tokens, that is $0.42 in input list price. It excludes output, hosting, the agent and any provider offer. It does not prove a saved bill.
Published Jev rate ↗Our local two-step Code Mode fixture made one outer MCP call but was slightly slower than two direct calls on the same machine. It used no Jev inference. Measure end-to-end p50 and p95 latency, all model calls and tokens, and final task quality on your own workload.
Use the workflow measurement guide →Jev's provider benchmarks and our separate batched-question diagnostic are not a measurement of Code Mode improving a complete agent task. Direct calls may be faster when there is only one question.
BOUNDED BY DESIGN
Each hosted Code Mode run allows up to eight System One calls and ten seconds. Input and returned JSON are limited to 12,000 characters each. Code Mode has a separate daily execution limit. Failed attempts can still count.
The code receives only functions the connection may use. It cannot make direct network requests or access provider credentials. System One never turns a Jev result into an application action.
sysone_code({ code })Use this tool for loops, conditions and dependent checks. Use a direct tool for one bounded judgment.
Get the MCP setup ↗Explore the direct tools →