Early preview
JevAgent Preflight Questions
Preflight questions are quick checks Jev runs on a request before your agent starts. Turn on the options you need, and Jev can stop an unclear request to ask the user, trim the tools your agent sees, split repeated work across agents, or keep a run's goal across follow-ups.
Preflight checks the request before work begins
Before your agent starts, Jev answers a few narrow questions about the request. What it does with the answers depends on the options you turn on: only clarity can stop a run, and the others shape the run that goes ahead.
A request, checked before the agent acts
Preflight · early previewUser request
Build a launch plan
Jev · System 2 · before your agent starts
Answers the narrow questions your enabled options add
- Clarity
- Tool selector
- Bulk work
- Run-state relation
No gap · the request is ready
Your agent starts this run
Shaped by the other options you turned on:
- Tool selector keeps only the tools that could help.
- Bulk work offers a tool that splits repeated work across fresh agents.
- Run-state relation keeps the original goal for a related follow-up.
Clarity finds a gap · this run stops
Short questions come back to your app
Who is the launch for?
- Existing customers
- New developers
When does it go live?
- This month
- Next quarter
Your app asks the user, then starts a new JevAgent run with the answers. Nothing resumes on its own.
If Jev can't answer, or the questions can't be written, preflight steps aside and your agent runs as usual.
What a preflight question is
A preflight question is one narrow yes/no question Jev answers about the request before your agent does anything. Each option you turn on adds a fixed set of these questions and one action Jev takes on the answers.
One narrow question at a time — Each question looks at a single thing, such as whether the request names its target, so a failed check says exactly what is missing instead of calling the request vague.
Answers become one action — Each option turns its answers into one action: stop and ask, hide tools, offer a bulk-work tool, or keep a record.
One call for most options — Clarity, bulk work, run-state relation, and the specialist choice go to Jev together, in one call. The tool selector asks its own questions right after, only when your main agent goes ahead.
Outages never block work — If Jev can't answer, each option steps aside and your agent runs as it would without it.
When to use preflight
Preflight pays off when a wrong start is expensive: the agent does real work, the request comes from a person you can ask, or the agent has more tools or more items than one request needs.
- Clarity
- Use it whenRequests come from people and are often vague, such as “Build a launch plan.”
- What it changesStops the run and returns a few short questions for the user.
- Tool selector
- Use it whenYour agent has many tools, and most requests need only a few.
- What it changesHides tools that couldn't help, for this run only.
- Bulk work
- Use it whenRequests often ask for the same work on several items, such as “Translate these 20 files.”
- What it changesOffers a tool that splits the items across fresh agents working at once.
- Run-state relation
- Use it whenUsers send follow-ups to work your done checks are tracking.
- What it changesKeeps the original goal for related follow-ups instead of replacing it.
| Option | Use it when | What it changes |
|---|---|---|
| Clarity | Requests come from people and are often vague, such as “Build a launch plan.” | Stops the run and returns a few short questions for the user. |
| Tool selector | Your agent has many tools, and most requests need only a few. | Hides tools that couldn't help, for this run only. |
| Bulk work | Requests often ask for the same work on several items, such as “Translate these 20 files.” | Offers a tool that splits the items across fresh agents working at once. |
| Run-state relation | Users send follow-ups to work your done checks are tracking. | Keeps the original goal for related follow-ups instead of replacing it. |
The goal isn't to turn every request into an interview. Each option acts only when its answers say a short check would prevent wasted work.
Every preflight option
The SDK ships four preflight options. Open one to see what it asks, when it acts, its settings, and a working example.
Clarity: stop and ask when the request is missing something
Jev asks 14 narrow questions about the user's message, such as whether it names an action, a target, and the kind of result expected. If the request falls short, the run stops before any work and returns a few short questions for the user, each with suggested answers.
- Asks
- Detail14 yes/no questions about the request itself, read on its own.
- Acts when
- DetailThe average answer is below 0.75, or any single answer is below 0.2. A request that asks for no work reports only that gap.
- What happens
- DetailThe run stops and returns clarifying questions. Your app asks the user and starts a new run; nothing resumes on its own.
- Settings
- DetailNone. The thresholds are fixed starting points, the same for every agent.
- If Jev can't answer
- DetailThe check is skipped and your agent runs.
- Where to look
- DetailThe run's response holds the questions and their suggested answers.
| Detail | |
|---|---|
| Asks | 14 yes/no questions about the request itself, read on its own. |
| Acts when | The average answer is below 0.75, or any single answer is below 0.2. A request that asks for no work reports only that gap. |
| What happens | The run stops and returns clarifying questions. Your app asks the user and starts a new run; nothing resumes on its own. |
| Settings | None. The thresholds are fixed starting points, the same for every agent. |
| If Jev can't answer | The check is skipped and your agent runs. |
| Where to look | The run's response holds the questions and their suggested answers. |
Turn on clarity
1from vidbyte import (
2 JevAgent,
3 JevAgentSettings,
4 JevPreflightPreset,
5 JevRuntimeSettings,
6)
7
8# Jev runs on Vidbyte's managed gateway, using VIDBYTE_API_KEY.
9agent = JevAgent(
10 JevAgentSettings(
11 name="launch-planner",
12 system_prompt="You plan product launches.",
13 provider="openai",
14 model_name="gpt-4.1-mini",
15 ),
16 JevRuntimeSettings(preflight=(JevPreflightPreset.CLARITY,)),
17)
18
19reply = agent.run("Build a launch plan.")
20clarification = agent.response.clarification
21if clarification:
22 # The run stopped before any work: ask, then start a new run.
23 for item in clarification.questions:
24 print(item.question, item.recommendations)Tool selector: give your agent only the tools that could help
Jev asks one question per tool: could this tool help with the request? Tools that reach the threshold stay available, in their original order, and the rest are hidden for this run only.
- Asks
- DetailOne yes/no question for each tool your agent has, built from the tool's name, description, and inputs.
- Acts when
- DetailWhenever your main agent goes ahead. It runs right after the other options, so it never runs on a stopped request or one a specialist takes.
- What happens
- DetailTools below the threshold are left out of this run. Your agent's permissions don't change.
- Settings
- DetailThe tool threshold, 0.20 by default, from 0 to 1.
- If Jev can't answer
- DetailYour agent keeps every tool.
- Where to look
- DetailThe reply's details list which tools were kept.
| Detail | |
|---|---|
| Asks | One yes/no question for each tool your agent has, built from the tool's name, description, and inputs. |
| Acts when | Whenever your main agent goes ahead. It runs right after the other options, so it never runs on a stopped request or one a specialist takes. |
| What happens | Tools below the threshold are left out of this run. Your agent's permissions don't change. |
| Settings | The tool threshold, 0.20 by default, from 0 to 1. |
| If Jev can't answer | Your agent keeps every tool. |
| Where to look | The reply's details list which tools were kept. |
Turn on the tool selector
1from vidbyte import (
2 JevAgent,
3 JevAgentSettings,
4 JevPreflightPreset,
5 JevRuntimeSettings,
6 tool,
7)
8
9@tool
10def search_docs(query: str) -> str:
11 """Search the product documentation."""
12 return docs_index.search(query)
13
14@tool
15def open_ticket(summary: str) -> str:
16 """Open a support ticket for the user."""
17 return helpdesk.create(summary)
18
19agent = JevAgent(
20 JevAgentSettings(
21 name="support-agent",
22 system_prompt="Help users with product questions.",
23 provider="openai",
24 model_name="gpt-4.1-mini",
25 tools=[search_docs, open_ticket],
26 ),
27 JevRuntimeSettings(
28 preflight=(JevPreflightPreset.TOOL_SELECTOR,),
29 tool_selector_threshold=0.2, # the default
30 ),
31)
32
33reply = agent.run("How do I rotate my API key?")
34# The tools Jev kept for this run.
35print(reply.metadata.get("jev_tool_selector"))Bulk work: split repeated work across fresh agents
Jev asks eight questions that together recognize work that splits cleanly: at least two named items, the same work on each, a separate result for each, and no item depending on another. When every answer passes, your agent gets a one-time bulk-work tool: it writes one task per item, fresh copies of the agent run them at the same time, and their results come back to your agent.
- Asks
- DetailEight yes/no questions: several items, every item identified, the same work, a result per item, independent items, changes kept inside each item, any order, and substantial work per item.
- Acts when
- DetailEvery answer reaches the threshold on its own. One clear no keeps the work on one agent.
- What happens
- DetailYour agent is offered the bulk-work tool for this run. Each fresh copy gets the same model, permissions, and limits, and only the tools the selector kept.
- Settings
- DetailHow many agents one request may split across (4 by default, at least 2), and the threshold every answer must reach (0.75 by default).
- If Jev can't answer
- DetailThe tool isn't offered, and your agent does the work itself.
- Where to look
- DetailThe run's response lists each task and what its agent handed back.
| Detail | |
|---|---|
| Asks | Eight yes/no questions: several items, every item identified, the same work, a result per item, independent items, changes kept inside each item, any order, and substantial work per item. |
| Acts when | Every answer reaches the threshold on its own. One clear no keeps the work on one agent. |
| What happens | Your agent is offered the bulk-work tool for this run. Each fresh copy gets the same model, permissions, and limits, and only the tools the selector kept. |
| Settings | How many agents one request may split across (4 by default, at least 2), and the threshold every answer must reach (0.75 by default). |
| If Jev can't answer | The tool isn't offered, and your agent does the work itself. |
| Where to look | The run's response lists each task and what its agent handed back. |
Turn on bulk work
1from vidbyte import (
2 JevAgent,
3 JevAgentSettings,
4 JevBulkSettings,
5 JevPreflightPreset,
6 JevRuntimeSettings,
7)
8
9agent = JevAgent(
10 JevAgentSettings(
11 name="translator",
12 system_prompt="You translate product copy.",
13 provider="openai",
14 model_name="gpt-4.1-mini",
15 # The defaults: up to 4 agents; each answer needs 0.75.
16 bulk_work=JevBulkSettings(agents=4, threshold=0.75),
17 ),
18 JevRuntimeSettings(preflight=(JevPreflightPreset.BULK_WORK,)),
19)
20
21reply = agent.run("Translate these three emails into French: ...")
22if agent.response.bulk_work:
23 for handoff in agent.response.bulk_work.handoffs:
24 print(handoff.task, handoff.output)Run-state relation: keep the original goal for related follow-ups
Continuation's done checks write a run state from the request: its goal, its parts, and what not to do. Normally every new request replaces it. With this option, Jev first asks whether the new request relates to the recorded work, and a related follow-up keeps the original record, so the done checks keep judging against the goal the user started with.
- Asks
- DetailOne yes/no question: does this request relate to the work or content in the existing record? It is asked only when a record exists.
- Acts when
- DetailRelated: the record is kept unchanged. Unrelated: a new record is written from the new request.
- What happens
- DetailA correction or a different action on the same project keeps the record; a request that only shares a broad topic replaces it.
- Settings
- DetailNone. Pair it with continuation's done checks, which use the record.
- If Jev can't answer
- DetailThe existing record is kept.
- Where to look
- DetailThe run's response holds the run state the checks used.
| Detail | |
|---|---|
| Asks | One yes/no question: does this request relate to the work or content in the existing record? It is asked only when a record exists. |
| Acts when | Related: the record is kept unchanged. Unrelated: a new record is written from the new request. |
| What happens | A correction or a different action on the same project keeps the record; a request that only shares a broad topic replaces it. |
| Settings | None. Pair it with continuation's done checks, which use the record. |
| If Jev can't answer | The existing record is kept. |
| Where to look | The run's response holds the run state the checks used. |
Turn on run-state relation
1from vidbyte import (
2 JevAgent,
3 JevAgentSettings,
4 JevContinualSettings,
5 JevDoneCheck,
6 JevPreflightPreset,
7 JevRuntimeSettings,
8)
9
10agent = JevAgent(
11 JevAgentSettings(
12 name="release-writer",
13 system_prompt="You write SDK release notes.",
14 provider="openai",
15 model_name="gpt-4.1-mini",
16 ),
17 JevRuntimeSettings(
18 preflight=(JevPreflightPreset.RUN_STATE_RELATION,),
19 continual=JevContinualSettings(
20 checks=(JevDoneCheck.MULTI_PART,),
21 ),
22 ),
23)
24
25agent.run("Draft the v2.1 notes: auth migration and API changes.")
26# A related follow-up keeps the record from the first request.
27agent.run("In those notes, say existing API tokens still work.")
28print(agent.response.run_state.objective)Turn on several options together
Turn on built-in checks before your agent starts by listing them in one setting. Order doesn't matter, and each option can be listed only once.
This feature is still in early development, and the installed SDK may not include every option yet. Check your SDK version before you use the examples.
Combine preflight options
1from vidbyte import (
2 JevAgent,
3 JevAgentSettings,
4 JevPreflightPreset,
5 JevRuntimeSettings,
6)
7
8agent = JevAgent(
9 JevAgentSettings(
10 name="support-agent",
11 system_prompt="Help users with product questions.",
12 provider="openai",
13 model_name="gpt-4.1-mini",
14 tools=[search_docs, open_ticket],
15 ),
16 JevRuntimeSettings(
17 preflight=(
18 JevPreflightPreset.CLARITY,
19 JevPreflightPreset.TOOL_SELECTOR,
20 JevPreflightPreset.BULK_WORK,
21 ),
22 ),
23)
24
25# Plain strings work too. Listing an option twice is an error.
26JevRuntimeSettings(
27 preflight=("clarity", "tool_selector", "run_state_relation"),
28)What happens when clarity stops a run
Clarity is the one option that can stop a run. A request that passes goes straight to work; a request with a gap stops and returns questions.
Jev checks the request
Jev answers the questions your options add. If the request passes, your agent gets to work as usual.
The run stops with questions
If Jev finds a gap and clarifying questions are written, the run stops before any work is done and returns those questions.
Your app asks the user
Show the questions to the user and collect their answers. JevAgent does not automatically resume the stopped run or merge the user's reply for you.
Send a new request
Start a new JevAgent run with a request that includes the user's answers.
Adding your own checks
The built-in checks can't be extended from inside your app. A new check has to be added to the Vidbyte SDK itself and shipped in an SDK release or a private build. Once your installed SDK includes it, you turn it on the same way as the built-in checks.
Write the questions
Write each new question in plain yes/no form, with clear examples of requests that pass and requests that get flagged.
Add them to the SDK
Add the questions to the SDK as a new check, following the SDK's guide to writing Jev questions.
Test and ship
Test the new check, then ship it in an SDK release or a private build.
Turn the check on
Install that version, then turn the new check on in your agent's Jev settings, just like the built-in options.