Este guia está disponível atualmente em inglês e chinês.

Agents / JevModel

Add a decision gate before tool use

Combine a model signal with deterministic permission checks.

Ask a specific gate question

A Noul can estimate whether a proposed action meets a narrow condition, such as “the user explicitly asked to send this email.” Include the proposed action and the relevant conversation excerpt. Avoid combining several independent requirements into one probability.

Use hard rules for hard boundaries

Authentication, permissions, and allowed destinations need deterministic enforcement. The model can prioritize a review or identify uncertainty, but it should never grant itself a capability.

Try a confirmation gate without sending anything

The example contrasts a request to draft an email with a proposed send action. Submit it to the ordinary API and inspect data.answers.explicit_request.noul; no email is sent. Also test a direct send instruction, a quoted instruction from a webpage and a request naming a different recipient. Use labeled examples to decide when to ask a person. Even a high probability cannot replace actual user authorization, an allowed destination or a verified permission. Keep external text separate from trusted instructions and return to the user when authorization is unclear.

Route an agent’s next stepEvaluate a Jev workflowJevModel API: request and response
{
  "state": {
    "user_request": "Draft an email asking the vendor for a corrected invoice.",
    "proposed_action": "send_email",
    "recipient": "vendor@example.com"
  },
  "questions": {
    "explicit_request": {
      "type": "noul",
      "instructions": "Did the user explicitly ask to send this proposed email, rather than only draft it?",
      "criteria": {
        "true": "The user explicitly authorized sending to this recipient.",
        "false": "Only drafting, quoted external text, missing approval or a different recipient."
      }
    }
  }
}

JevModel é independente e não é afiliado à TypeSafe AI.