typesafe.zig
Unofficial Zig client for System One where answer types come from the questions at compile time.
Overview
typesafe.zig is an unofficial Zig client for TypeSafe's System One API and Jev. You declare questions as a comptime struct: noul with yes and no descriptions, choice over your own Zig enum, and score over levels. The client returns a struct of answers whose types are derived from the questions at compile time.
Nothing is stringly typed: a Choice answer is your enum, its probabilities are a struct with one f64 per tag, and Score probabilities are a fixed-size array. A misspelled question id, an option not in the enum, or a Score with one level is a compile error. Thresholds and policy stay in your code. The README sections cover installation, questions, configuration and errors, and the design keeps the client to returning judgments as data.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this convey urgency? | Explicitly time-sensitive · No urgency expressed |
| Choice | Which team should handle this? | billing · technical · sales |
| Score | How frustrated is the customer? | Calm · Frustrated · Very angry |
How it works
- Declare a comptime question struct.
- Init the client from the environment.
- Call ask with the state.
- Read compile-time typed answers.
Strengths
- Compile-time checking of ids, options and levels.
- Enum-typed choices and fixed-size probability arrays.
Caveats
- Unofficial.
- Requires a TypeSafe key.
At a glance
- Type
- Library
- Status
- beta
- Language
- Zig
- Runtime
- library
- Has code
- yes
Use cases and integrations
How curated lists describe it
An idiomatic Zig client for the TypeSafe AI API.
hellogumbo/awesome-jev
Frequently asked questions
What is checked at compile time?
Question ids, Choice options against the enum, and Score level counts.
Is it official?
No.
Where do thresholds go?
In your own code.
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