Skip to content

TypeSafe AI Jev Example

Six runnable Python demos for TypeSafe's Jev covering the three primitives and six combination patterns, plus four notes on the programming model, the API contract, patterns and a live-key comparison.

Stars
2
Language
Python
License
MIT
Published by
Community
Author
ItBayMax
Last verified
Oct 2026

Highlights

  • Standard library only: `python run_all.py` runs everything and works with no API key at all.
  • TYPESAFE_MODE=auto is the default; setting it to live makes a missing key a hard error instead of a silent mock.
  • One note compares 65 hand-written probabilities against real model output, with the full terminal log committed under samples/.
  • check_setup.py reports where the key was found and how long it is without printing it, then sends one minimal live request.

Watch out

Offline mode is the default and its probability distributions are hand-written fixtures, not model output, so it teaches the request and response shapes rather than how accurate Jev is. The mock token estimator runs about 2.5x low for Chinese and JSON, so the committed cost figures come from the live run instead. The author also reports that 1.13 distributions are extremely peaked, with confidence frequently at 1.0, which leaves the officially suggested cautious band nearly empty. Numbers quoted in the notes were read from the docs at one point in time and move with versions. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

Open 150M encoder that reproduces the typed noul, choice, and score interface in one forward pass, trainable on a free GPU and runnable locally for nothing.
Jev Demos & Experiments#community#jevbest#catalog-import
941GitHub stars
Library that adds schema-guaranteed typed outputs to existing autoregressive LLMs without changing weights, served through SGLang or a hosted API.
Jev Demos & Experiments#community#jevbest#catalog-import
55GitHub stars
Toolkit that makes a model behind an OpenAI-compatible endpoint or running in-process answer typed choice, score, and yes/no questions from next-token probabilities in Jev API shape.
Jev Demos & Experiments#community#jevbest#catalog-import
164GitHub stars
End-to-end toolkit that synthesizes decision data, trains and calibrates candidate scorers, evaluates fixed splits, and serves Jev-compatible inference for interactive web decisions.
Jev Demos & Experiments#community#jevbest#catalog-import
63GitHub stars
Claude Code kit that guards PreToolUse calls with a free pre-filter plus one Jev question for ambiguous cases, and adds sub-agent sizing, rechecks, search, daemon speedups, and monitoring.
Jev Demos & Experiments#community#awesomejev#catalog-import
70GitHub stars
Self-hosted proxy that records typed decisions, distils them into small heads on a frozen encoder, and answers locally when confident.
Jev Demos & Experiments#community#jevbest#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

A game tick is a state plus a legal action list. How Clash Royale, Minecraft, and the earlier Mario, Pokémon, StarCraft, and drone loops ask Jev one step at a time.
Jev Demos & Experiments#gaming#agents#control
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai