ex_typesafe_ai
Unofficial Elixir client for TypeSafe with typed structs, Req-based HTTP with retries and ergonomic noul/choice/score builders.
Overview
ex_typesafe_ai is an idiomatic, unofficial Elixir client for the TypeSafe API, explicitly not affiliated with or endorsed by TypeSafe. TypeSafe.new/1 returns an immutable client value that can be built once and shared across processes, with options for API key, base URL, model (default jev-latest), timeout and retries; explicit options override environment variables.
Questions are built with Question.noul, choice and score helpers, and responses come back as typed structs, for example response.choices["category"].choice. HTTP is handled by Req with retries. The quickstart classifies a support ticket into billing, technical or other. It is published on Hex. Timeout and retry counts are configurable per client, and the README points to TypeSafe's documentation for what the model can do. It is MIT licensed with HexDocs documentation.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | What is this ticket about? | billing · technical · other |
How it works
- Add {:ex_typesafe_ai, "~> 0.2"} to mix.exs
- Build a client with TypeSafe.new()
- Call TypeSafe.system_one(client, state, questions)
- Read typed structs from the response
Strengths
- Immutable, shareable client
- Typed response structs
- Req-based retries
Caveats
- Unofficial community client
Getting started
Add {:ex_typesafe_ai, "~> 0.2"} to deps, set TYPESAFE_API_KEY, then TypeSafe.system_one(TypeSafe.new(), state, questions).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
Unofficial Elixir client for the TypeSafe AI API — typed structs, Req-based…
wh000wh000/awesome-jev-liveUnofficial Elixir client for the TypeSafe AI API — typed structs, Req-based HTTP with retries, and ergonomic noul/choice/score questions. Not affiliated with TypeSafe AI.
hellogumbo/awesome-jev
Frequently asked questions
Is it official?
No, it is a community client not affiliated with TypeSafe.
How are responses returned?
As typed structs, e.g. response.choices["category"].choice.
What HTTP library does it use?
Req, with retries.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython