Skip to content

typesafe_ai (hfiguera)

Elixir client for TypeSafe's System One API built on Mint, with supervised HTTP/2 connections, bounded concurrency, retries and telemetry.

LibrarybetaMIT

Overview

typesafe_ai is an independently maintained, MIT-licensed Elixir client for the System One API, aimed at latency-sensitive applications. You evaluate shared state with Choice, Score and Noul questions and receive validated, typed answers.

Its focus is load handling: reusable supervised HTTP/1 and HTTP/2 connections (HTTP/2 multiplexes concurrent evaluations), bounded concurrency and queues, request deadlines, configurable retries and telemetry, plus an optional connection pool since 0.1.1. The client is started under your application's supervisor, and the library never reads environment variables itself; the app passes the key explicitly. Guides cover configuration, errors and retries, telemetry, performance and a support-triage example. Because HTTP/2 multiplexes concurrent evaluations over a single connection, an application can fan out many independent decisions without opening a socket per request.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich team should handle this message?—
Yes / noYes/no question about the stateyes · no
ScoreScore question on an ordered scale—

How it works

  1. Start TypeSafe.Client under your supervisor with a key and model.
  2. Call TypeSafe.system_one with state and questions.
  3. Receive validated typed answers.
  4. Apply thresholds and actions in your application.

Strengths

  • Supervised, multiplexed connections for low latency under load.
  • Bounded concurrency, deadlines and retries are explicit.
  • Telemetry events for monitoring.
  • MIT licensed.

Caveats

  • Requires Elixir 1.18+ and OTP 27+.
  • Unofficial client; needs a TypeSafe key.

Getting started

Add {:typesafe_ai, "~> 0.1.1"} to mix.exs and start TypeSafe.Client under your supervisor.

At a glance

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

Use cases and integrations

How curated lists describe it

Frequently asked questions

How does it differ from other Elixir clients?

It is built directly on Mint with supervised HTTP/2 connections, bounded concurrency and deadlines for latency-sensitive use.

Does it read TYPESAFE_API_KEY automatically?

No, your application fetches the key and passes it explicitly.

Is it official?

No, it is independently maintained.

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