Skip to content

typesafe_ai (typesend)

Unofficial typed Elixir client for Jev with offline test stubs, concurrent fan-out and atom-keyed answers.

Libraryprototype

Overview

typesafe_api is an unofficial Elixir client for TypeSafe's System One API. It turns typed question structs into typed answer structs, with retries, telemetry and test stubs handled, and offers a raw map-based HTTP layer for parts of the API it does not yet model. Answers are keyed by atoms, and questions can be fanned out concurrently.

A notable feature is TypeSafeAPI.Test, which runs every example in the README offline with no key or network. There is also a Livebook walkthrough. The README explains the three question kinds clearly and notes that Noul has no confidence field, providing a helper instead. It is an alpha release (0.1.0-alpha.3) and requires Elixir 1.18+.

What the decision model decides

TypeQuestionAnswers
Yes / noYes/no question about the stateyes · no
ChoiceOne option from a set you define—
ScorePosition on an ordered scale you define—

How it works

  1. Create a client with an API key.
  2. Define typed questions over a string or map state.
  3. Ask, optionally fanning out concurrently.
  4. Use typed answers; test offline with TypeSafeAPI.Test stubs.

Strengths

  • Offline test stubs for every example.
  • Livebook walkthrough.
  • Raw layer for unmodeled API parts.

Caveats

  • Alpha version.
  • Unofficial; not affiliated with TypeSafe.

Getting started

Add {:typesafe_api, "~> 0.1.0-alpha.3"} to mix.exs deps.

At a glance

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

Use cases and integrations

How curated lists describe it

Frequently asked questions

Can I try it without a key?

Yes, TypeSafeAPI.Test runs the examples offline.

Is it stable?

It is an alpha release.

How does it handle Noul confidence?

The API returns none, so the library provides a helper for an equivalent measure.

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