Skip to content

jevlang

Python dialect that adds a '~' operator and jev/case blocks so a branch can ask Jev a yes/no, scale or choice question.

ProjectprototypeMIT

Overview

jevlang lets you write decision workflows as Python with a 'smart if'. A .jev file is ordinary Python plus two forms: value ~ question, which returns a probability, a scale position or a label, and a jev/case block that branches on a choice question. Files are rewritten to plain Python at import time by an import hook, so callers just import the module and receive floats and strings.

The question's shape picks its type: a string is a yes/no question, a list is an ordered scale and a dict is a set of labelled options. Every ~ is one paid call to TypeSafe's Jev, and the value on the left is what gets sent, so the README warns to keep secrets out and to guard important branches because answers are probabilities. It ships a skill for coding agents such as Claude Code, Codex and Cursor. The author calls it a tested, working prototype.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes the customer want a refund? (msg ~ 'the customer wants a refund')—
ScoreHow annoyed is the sender? (msg ~ ['calm','annoyed','angry'])calm · annoyed · angry
ChoiceWhich team should handle this?billing · technical

How it works

  1. Write a .jev module using ~ and jev/case
  2. Import it; the hook rewrites it to plain Python
  3. Each ~ calls Jev with the value as state and the question
  4. Threshold, rank or branch on the returned number or label, with an else fallback

Strengths

  • Decision logic reads as ordinary Python control flow
  • No new interpreter; --show prints the generated Python without an API call
  • Return values are plain floats and strings with probabilities attached

Caveats

  • Every ~ is a paid network call
  • Prototype status by the author's own description
  • Whatever is left of ~ is sent to the API

Getting started

pip install jevlang, export TYPESAFE_API_KEY=..., then python -m jevlang hello.jev

At a glance

Type
Project
Status
prototype
Language
Python
Runtime
Python 3.10+ import hook
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

What does ~ return?

A probability for a string question, a scale position for a list, or a label for a dict of options.

Is it a new language runtime?

No. .jev files are rewritten to plain Python at import time.

What does it cost?

Each ~ is one TypeSafe API call billed to your key.

Related projects

  • Rust crate and jud CLI where a decision is a .jud rubric file answered by a System One model, type-checked and testable without a key.

    PluginbetaRust
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython
  • Go integration bringing TypeSafe Choice, Score and Noul to Google's adk-go agents, with a typed client, routing agent and callbacks.

    ProjectbetaGo
  • Unofficial hosted or local Jev MCP server giving agents a quick second opinion: it picks yes/no, scale or choice and returns probabilities.

    MCP serverbetaTypeScript
  • CLI, MCP server and Claude Code plugin for closed-form yes/no, choice, score and rank decisions via Jev, OpenAI Decisions or Claude.

    MCP serverbetaTypeScript
  • Ruby gem for probabilistic conditionals like Feelings(msg).like?("urgent"), answered by Jev or other decision models.

    ProjectbetaRuby