Workflows / JevModel

AI Decision Flows with Jev and human review

Build a Jev decision flow for support routing, add an uncertain-answer branch and call the saved graph through the API. Learn limits and billing.

Last updated:

1. Draw a bounded support decision

Open Console → Flows after signing in and verifying your email. Start with the support template. A useful path asks whether the text is spam, then selects a support team and checks urgency only if needed. Give every outcome a stable value such as billing_queue, on_call or human_review. Those values are routing data your application reads, not built-in ticket creation. Write categories from the real responsibilities of your teams and include an unsupported or ambiguous path.

Route customer support with JevChoice, Score, and Noul

2. Give uncertainty an explicit branch

For Choice or Noul nodes, a positive minimum probability creates an _unsure port. Connect it to a human_review outcome. A Choice uses the probability of the selected option; Noul follows true or false according to its threshold and uses the probability of that chosen side. Score uses an above/below threshold on its rubric rather than this probability port. Set thresholds from labeled cases, not the demonstration percentages. A missing edge can terminate at the selected port, so inspect every branch before using the outcome in production.

Add a decision gate before tool useEvaluate a Jev workflow

3. Test clear and mixed cases before saving

Try an invoice correction, a production outage and a message that mixes a refund request with a broken checkout. Inspect the selected path and returned probabilities for every visited question. The same state is available to each node; the graph does not let a question rewrite the input or compose a reply. A flow supports at most eight question nodes and 24 total nodes, with no cycles. Keep the serialized state and each actual node request within the ordinary request limit. Save the graph and copy its real ID before calling the API.

JevModel API: request and response

4. Call the saved flow from your server

Replace YOUR_SAVED_FLOW_ID below with a graph belonging to the same account as your JevModel API key. Send only the state; the saved graph contains its questions. Read both HTTP status and the response envelope. A 200 response can contain a flow error, so check data.error as well as data.outcome and data.steps before taking action. The response includes the saved version and trace, which help identify changed graphs. The host still enforces permissions and owns notifications or other business actions.

Route an agent’s next stepJevModel API: request and response
curl -X POST https://jevmodel.app/api/v1/flows/YOUR_SAVED_FLOW_ID/run \
  -H "Authorization: Bearer $JEVMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":"The checkout is failing for every customer."}'

5. Check costs and handle partial failure

A successful free flow consumes 2 daily runs for the whole graph execution. If free capacity is unavailable, only questions visited on the chosen path consume input tokens. A later failure does not refund earlier successful paid questions. The runner has a 60-second deadline; start with short paths and route timeout or invalid results to a controlled fallback. Check account history before repeating a request whose response was lost. JevModel is an independent service, not affiliated with TypeSafe AI.

JevModel pricing and free Jev runs

JevModel is independent and not affiliated with TypeSafe AI.