Skip to content

jev.zig

Unofficial standard-library-only Zig client for the System One API with answer types derived from questions at compile time.

Librarybeta

Overview

jev.zig is an unofficial Zig client for TypeSafe's System One API and its Jev model. It supports Noul, Choice and Score questions, derives answer types from the questions at compile time, retries with backoff, and uses only the standard library. In the README's triage example, Choice and Score questions are defined over Zig enums, so a program can switch exhaustively on the chosen team, and a misspelled option, a score with only one level or a field that is not a question is a compile error.

It targets Zig developers who want typed decisions with strong compile-time guarantees. The example asks whether a message needs attention today, which team should handle it and how severe the impact is, then pages on-call above a probability threshold and routes by team. It requires Zig 0.16.0 and installs via zig fetch.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this need attention today?—
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow severe is the impact?minor · degraded · outage

How it works

  1. Define questions over Zig enums
  2. Call client.ask with state and questions
  3. Receive compile-time typed answers
  4. Branch with exhaustive switches and thresholds

Strengths

  • Compile-time errors for malformed questions
  • Standard library only
  • Retries with backoff

Caveats

  • Unofficial
  • Requires Zig 0.16.0

Getting started

zig fetch --save git+https://github.com/jakeknowlton/jev.zig#v0.1.1, then add the module in build.zig.

At a glance

Type
Library
Status
beta
Language
Zig
Runtime
Library
Has code
yes

Use cases and integrations

How curated lists describe it

  • Zig client for the TypeSafe System One API. Answers are typed at compile time and own no memory.

    hellogumbo/awesome-jev

Frequently asked questions

What makes it different from other clients?

Answer types come from the questions at compile time, so mistakes become compile errors.

Does it have dependencies?

No, it uses only Zig's standard library.

Which Zig version is needed?

Zig 0.16.0.

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