Decisions with Jev
Ask the phone a question, get a clear answer with a confidence level, and act only when that confidence is high enough. Text goes to Jev; photos, sound and video go to Clef.
Building an app that decides things? Agents should read Designing apps with decisions first: which model and route to use, how to write questions and thresholds, preparing photos, sound and video, and what each check costs per month.
Why use it
Bridgit gives paired agents access to Jev, a decision model from TypeSafe. You send it a situation and ask a typed question, such as yes or no, or one of a few named options. It answers with the option it picked and how sure it is, for example “yes, 93% sure”. It doesn't write sentences.
- Decisions, not prose. A chat model gives you a paragraph you then have to interpret. Jev gives you a typed answer with a calibrated probability, so “show the card only if it is at least 80% sure” is one line, not a text-parsing problem.
- Fast and cheap enough to run on every event. Sponic measured a typical answer in about a third of a second (median 368 ms). Input costs $0.042 per million tokens, and the answers themselves are free. Checking every battery change or every new bug report costs a fraction of a cent.
- Safe by design. The actions an answer can trigger come from a short fixed list the app already knows how to do: show a text card, read text aloud, or write a log line. An answer can't make the phone open a link or run code. If Jev fails or times out, nothing happens, and there is no default action.
- No keys to manage. Calls go through Bridgit's team account. Your agent uses the key it already has from pairing. The TypeSafe key never leaves Bridgit's server.
Things you can do with it
- Battery and charging. Send the battery level, whether it's charging and what's on the owner's calendar. Ask “should the owner plug in before the next call?” and, when Jev is at least 80% sure the answer is yes, show a “Plug in before your call” card.
- Whether to interrupt. Before posting a card, ask “is this worth interrupting the owner for right now?” given the time, their focus mode and how urgent the message is. Show it only on a confident yes, and write it to the log otherwise.
- Triaging a bug report. Send the report text and ask “is this a crash, a wrong result, or a feature request?” plus “how likely is it to affect other people?” (a probability). Read the report aloud to a developer only when it's a likely crash that affects others.
When not to use it
- Open-ended writing. Jev answers questions with fixed options. Use a chat model for summaries, replies and explanations.
- Images, sound or video sent to Jev. Jev's image input is still an experiment, and it doesn't take audio or video. Send media to Clef instead (below).
- Anything where a wrong answer is costly and can't be undone. Even a 95%-sure answer is wrong one time in twenty. Use it to decide what to show or suggest, and leave final decisions to the owner.
Images, sound and video with Clef
For media, Bridgit's server also offers Clef-omni, a decision model from Cloudflare. It takes the same typed questions and gives the same kind of answers, plus a score type for rating on a scale, but it reads photos, screenshots, sound clips and short videos as well as text. In Bridgit's own tests it labelled phone screenshots correctly at 90–97% confidence, told a spoken delivery message from an alarm beep, and followed a screen recording.
- Sound alerts. When the room gets loud, send the clip and ask: smoke alarm, glass breaking, a baby crying, or nothing? Speak up only on a confident hit.
- Don't interrupt. Send a screen capture and ask whether the owner is on a call or signing something before posting a card.
- Short video checks. Send a 10-second camera clip and ask whether someone came in.
Call POST {base_url}/v1/clef on Bridgit's server with a phone-made team key. The body is the same as for Jev, with up to four images, four audio clips (5 minutes each) and two videos (1 minute each), each as a base64 data URL such as data:image/jpeg;base64,.... Images can be up to 4 MB each; audio and video together up to 16 MB. Rules in actions work the same way. It costs about $0.0001 a photo and $0.0005 for 10 seconds of video, and shares Jev's hourly limit and daily budget. The phone's /v1/judgment still sends text to Jev only.
How it works
A paired agent calls POST /v1/judgment on the phone with three things. The state is what the questions are about. The questions are typed questions. The actions are optional rules saying “when this answer holds, do this”. The phone forwards the state and questions to Jev through Bridgit's server. The server checks each rule against Jev's answers and returns only the actions whose conditions held, with the reason each one fired. The phone then runs those actions as the calling agent, with the same switches and permissions as if the agent had asked directly.
An agent with a phone-made team key (GET /v1/feedback/team-key) can also call Bridgit's server directly at POST {base_url}/v1/jev, for example while the phone is offline. The body and reply are the same, but the actions come back as a list for the agent to act on; nothing runs on the phone.
Worked example
The agent sends the battery state, one question and two rules:
POST /v1/judgment
{
"state": {"battery_percent": 12, "charging": false, "next_call_minutes": 120},
"questions": {
"charge": {
"type": "choice",
"instructions": "Should the owner plug the phone in before the call?",
"criteria": {"yes": "Plug in first", "no": "Fine as it is"}
}
},
"actions": [
{"id": "plug_in",
"when": {"answer": "charge", "choice": "yes", "min_confidence": 0.8},
"do": {"type": "notice", "title": "Plug in before your call",
"text": "12% won't last a two-hour call."}},
{"id": "fine",
"when": {"answer": "charge", "choice": "no", "min_confidence": 0.8},
"do": {"type": "log", "message": "Battery is fine for the call."}}
]
}
Jev answers “yes” with 93% confidence. The first rule holds, so the phone shows the card. The second rule doesn't hold, so it is reported as skipped:
{
"model": "jev-1.14.0",
"answers": {"charge": {"type": "choice", "choice": "yes", "confidence": 0.93}},
"usage": {"input_tokens": 212},
"cost_usd": 0.0000089,
"actions_schema": "bridgit-actions/1",
"actions": [
{"id": "plug_in", "type": "notice", "ran": true,
"reason": "charge = yes at 0.93 ≥ 0.80"}
],
"skipped": [
{"id": "fine", "reason": "charge = yes, not no"}
]
}
Had Jev been unreachable, the agent would have received an error (upstream_failed or team_unavailable) and no card would have appeared.
Reference
Request
| Field | What it is |
|---|---|
state | Required. Text, a JSON object or a JSON array, up to about 512 KB. Text only: no images, audio or video. |
questions | Required. 1–50 typed questions, {id: {type, instructions, criteria?}}, as in TypeSafe's primitives. choice picks one named option with a confidence; noul gives a probability from 0 to 1. |
actions | Optional. Up to 10 rules, {id, when, do}, in the bridgit-actions/1 format below. |
Conditions
when is one condition or a list of up to 5, and all of them must hold. A missing or malformed answer never holds. Thresholds include their edge: 0.80 passes “at least 0.80”.
| Condition | Holds when |
|---|---|
{"answer": "q", "choice": "yes", "min_confidence": 0.8} | Question q picked “yes” with confidence ≥ 0.8 (min_confidence defaults to 0) |
{"answer": "q", "min": 0.7} | The probability answer to q is ≥ 0.7 |
{"answer": "q", "max": 0.2} | The probability answer to q is ≤ 0.2 (min and max can be combined) |
Actions (bridgit-actions/1)
This is the whole list. Every field is plain text; a link, script or unknown field makes the request fail with invalid_parameter before Jev is called. If a newer server ever sends a type this app doesn't know, the app ignores it and logs it.
| Type | Fields | What the phone does |
|---|---|---|
notice | title (≤ 80), text (≤ 2,000, optional) | Shows the owner a notice card from your agent. Needs Cards to be on and allowed for the agent. |
speak | text (≤ 300) | Reads the text aloud, under the speaker's usual rules and quiet hours. |
log | message (≤ 500) | Writes a line, with the reason, to the phone's activity log. |
Reply
model, answers (exactly as Jev gave them), usage, cost_usd, elapsed_ms, actions_schema, actions (the rules that fired: {id, type, reason, ran, error?}) and skipped ({id, reason}). An action can fire but not run, for example a card when Cards are switched off; ran is then false and error says why.
Access and limits
- Any paired agent, through its phone. Directly on Bridgit's server: phone-made or team-made
bgk_keys only, not keys an agent registered for itself. - The model is fixed at
jev-1.14.0; Bridgit moves it forward after checking a new release. - Per phone or direct key: 300 calls an hour and $0.50 a day. Across all of Bridgit: $5 a day. Over a limit you get
rate_limited.
Errors
| Error | Means |
|---|---|
invalid_parameter | Bad state, questions or actions, or Jev refused the questions (its message is included). Nothing was run. |
rate_limited | Over the hourly limit or the daily budget. Try again later. |
upstream_failed | Jev was busy, down, slow (over 10 seconds) or unreadable. No action ran. |
team_unavailable | Bridgit's server couldn't be reached. No action ran. |
Full parameter list: POST /v1/judgment in the API reference.