Skip to content

ex_typesafe

Elixir client for the TypeSafe API with mixable Noul, Choice and Score questions, retries and configurable defaults.

LibrarybetaMIT

Overview

ExTypesafe is an Elixir client for TypeSafe's API. It evaluates typed questions against a state and returns structured answers code can branch on directly. The three primitives can be mixed in a single call: Noul returns a probability of yes, Choice returns the chosen option with a full distribution, and Score returns a probability-weighted score with the rubric legend and probabilities.

Configuration covers API key, base URL, default model (jev-latest), retries on 429 and 529 responses and transport failures, and exponential backoff limits, via environment variables or client options. Atom keys in questions are preserved in the response. It is published on Hex with HexDocs. Score answers come back as a probability-weighted score together with the rubric legend and per-level probabilities.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this message convey urgency?yes · no
ChoiceWhich team should handle this?billing · technical

How it works

  1. Add {:ex_typesafe, "~> 0.1"} to mix.exs
  2. Create a client from TYPESAFE_API_KEY
  3. Define typed questions
  4. Call the API and branch on structured answers

Strengths

  • Idiomatic Elixir API
  • Built-in retries with backoff
  • Mixed question types per call

Caveats

  • Community package
  • Early version (0.1)

Getting started

Add {:ex_typesafe, "~> 0.1"} to deps, export TYPESAFE_API_KEY, then ExTypesafe.Client.new().

At a glance

Type
Library
Status
beta
Language
Elixir
Runtime
BEAM library
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Which primitives are supported?

Noul, Choice and Score, mixable in one call.

Does it retry?

Yes, on 429/529 and transport failures with exponential backoff.

What is the default model?

jev-latest.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython