Skip to main content

TypeSafe integration

Ask yes/no, pick-one, and scale questions about your clients' data with the Jev decision model and route on calibrated confidence.

What it does

The TypeSafe integration runs Jev, a decision model that answers questions instead of writing text. You give it some content, such as a support ticket, a lead, or an email, and one or more typed questions. Each answer comes back as a value your workflow can branch on, with the probabilities behind it.

Use it in front of the steps that matter: route a ticket to the right team, score how urgent a message is, or check whether an email asks for a refund before a Branch sends it down the refund path. Answers typically arrive in well under a second, and only input tokens are billed.

Connect a TypeSafe account

  1. Open your workspace in TaskJuice and go to Apps.
  2. Choose TypeSafe and click Connect.
  3. In a new tab, open the TypeSafe console signed in as the client (or as your agency), and create an API key.
  4. Paste the key into TaskJuice and save the connection.

TypeSafe does not offer OAuth, so a pasted key is the only supported method. Keys are unscoped and every call is billed to the TypeSafe account that owns the key.

Triggers

TypeSafe has no webhooks or events, so the integration is action-only. Start the workflow with another app's trigger, a form, a schedule, or an inbound webhook, then ask TypeSafe inside it.

Actions

  • typesafe/ask-questions asks one or more questions about the Input in a single call. Each question has a name you choose, and its answer comes back under that name.
  • typesafe/list-models lists the Jev model names the connected key can use.

Question types

Set each question's type to one of these:

TypeWhat it answersWhat comes back
choiceWhich one of your options fits (up to 255 options).choice, confidence, and a probability per option.
scoreWhere it sits on your levels, lowest first (2–10).score (can fall between levels), confidence, probabilities, and a legend.
noulA yes/no question.noul, the probability that the answer is yes (0 to 1).

Every question has instructions (the question itself) and criteria:

  • For choice, criteria map each option to what it means.
  • For score, criteria are the ordered list of levels.
  • For noul, criteria are optional true and false descriptions.

Any option or level can be plain text or an object. Writing it as what, not_for, and examples is the best way to settle boundary cases, because Jev learns your domain only from the request:

"billing": {
  "what": "Charges, invoices, refunds, or subscriptions",
  "not_for": "Bugs or how-to questions",
  "examples": ["I was charged twice"]
}

When the Input is JSON, a question can point at one field of it with backticks, for example "Which team should handle `ticket.message`?".

Route on the answer

Add a Branch after the step and compare the answer's fields. For example, send answers.topic.choice equal to billing with answers.topic.confidence above 0.9 to the billing path, and anything below 0.9 to an approval step for a person. Yes/no answers carry no separate confidence; compare answers.<name>.noul against a threshold instead, such as above 0.8 for yes and below 0.2 for no.

Known limitations

  • Jev can only answer inside the options you give it, and it can still pick the wrong one. On TypeSafe's own evaluations it is less accurate than frontier language models. Use the confidence to decide when to act on its own and when to ask a person.
  • The jev-latest model moves with each release. If you tuned thresholds against one version, pin it: switch the Model field to an expression and enter a version such as jev-1.13.0. The model field in every response names the version that answered.
  • Text input only. Images, audio, and files must be turned into text first.
  • 64,000 tokens per call for the Input and all questions combined, and 32,000 for the Input plus the longest single question.
  • Rate limits are set by TypeSafe per account and are changing while the service scales. A 429 or 529 response is retried automatically with backoff.
Was this helpful?