Skip to content

typesafe

Community Elixir client for TypeSafe's System One API that sends typed Choice, Noul and Score questions and returns structs.

Librarybeta

Overview

typesafe is an idiomatic Elixir client, published on Hex, for TypeSafe's System One API and the Jev model. You build questions with TypeSafe.noul, TypeSafe.choice and TypeSafe.score, send them with one ask call alongside your application state, and get back structs with the choice, probabilities, confidence, noul probability or interpolated score.

It is a community client, not an official SDK. The design returns judgments as data and leaves thresholds and policy to the calling code. It requires Elixir 1.18+ and OTP 27+, depends on Req, Zoi and Telemetry, and includes TypeSafe.Test helpers for stubbing responses in tests. Responses carry the resolved model version and a request ID, and the TypeSafe.Test helpers let application tests stub the API without network calls.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this convey urgency?Explicitly time-sensitive · No urgency expressed
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow frustrated is the customer?Calm · Frustrated · Very angry

How it works

  1. Create a client with TYPESAFE_API_KEY.
  2. Define a map of typed questions.
  3. Call TypeSafe.ask with the state and questions.
  4. Branch on probabilities and confidence in your own code.

Strengths

  • Idiomatic Elixir structs for answers.
  • Test helpers for stubbing the API.
  • Telemetry events for observability.

Caveats

  • Unofficial community client.
  • Requires a TypeSafe API key.
  • Version 0.1.

Getting started

Add {:typesafe, "~> 0.1.0"} to mix.exs deps and export TYPESAFE_API_KEY.

At a glance

Type
Library
Status
beta
Language
Elixir
Runtime
library (Hex package)
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Is this an official TypeSafe SDK?

No, it is a community client.

What does it return?

Structs with choice, probabilities and confidence, a noul probability, or a score.

Where do thresholds go?

In your own code; the client only returns judgments.

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