Skip to main content

jev-lite

OpenAI-style Python client for TypeSafe Jev (System One).

Jev does not generate text. Send state plus typed questions; get structured decisions with probabilities. jev-lite is the official TypeSafe HTTP client — sync and async, same shape as the OpenAI Python SDK. jev-lite@0.0.2 adds Dialogflow-style system entities (preview, below).

pip install jev-lite
# or: uv add jev-lite

Python 3.11+. Set TYPESAFE_API_KEY. Docs: https://docs.typesafe.ai/

Usage

from jev_lite import Choice, Noul, Score, TypeSafe

client = TypeSafe()  # TYPESAFE_API_KEY

result = client.system_one.create(
    state="I was charged twice. Please fix this ASAP.",
    questions={
        "billing": Noul(instructions="Is this ticket about billing?"),
        "tone": Choice(
            instructions="What is the customer's tone?",
            criteria={"calm": None, "frustrated": None, "angry": None},
        ),
        "urgency": Score(
            instructions="How urgent is this ticket?",
            criteria=["can wait", "this week", "today"],
        ),
    },
)

print(result.nouls["billing"].noul)
print(result.choices["tone"].choice)
print(result.scores["urgency"].score)
print(result.elapsed_ms, result.request_id, result.usage)
print(client.models.list())  # GET /v1/models

Async is the same surface with await:

from jev_lite import AsyncTypeSafe, Noul

async with AsyncTypeSafe() as client:
    result = await client.system_one.create(
        state="I was charged twice. Please fix this ASAP.",
        questions={"billing": Noul(instructions="Is this ticket about billing?")},
    )
    models = await client.models.list()

Pin the model with TypeSafe(model="jev-1.13.0") (or TYPESAFE_DEFAULT_MODEL); jev-latest moves. Prefer one system_one.create with many questions over a loop of calls.

System entities (preview)

jev_lite.system_entities extracts the 59 Dialogflow ES system entities (@sys.date-time, @sys.unit-currency, @sys.geo-city, …) and fills typed slots, in ten languages (en and zh-Hant primary). Code proposes candidates, Jev jev-1.13.0 decides, code normalizes. Preview: the API may change within 0.0.x. Same install; no extra dependency.

from datetime import datetime
from zoneinfo import ZoneInfo

from jev_lite import TypeSafe
from jev_lite.system_entities import extract

now = datetime(2026, 10, 1, 16, 0, tzinfo=ZoneInfo("Asia/Taipei"))
with TypeSafe() as client:
    result = extract(client, "Book a table for 4 next Friday at 7pm", ["date-time", "number"], now=now)
for match in result.matches:
    print(match.entity, match.span.text, match.value)  # number 4 …; date-time … 2026-10-09 19:00

Slot filling, async and the value models: API. Read the known limitations first: extraction is not a security boundary. On the held-out set system-entities-cases@v0.0.1 (301 cases, ten languages) it is 99.3% exact on accepted values (release gates).

Tracing

Off by default. Opt in and pick the destination:

from jev_lite import instrument

instrument(endpoint="http://127.0.0.1:4318")  # local Grafana LGTM

Or set OTEL_EXPORTER_OTLP_ENDPOINT and call instrument(), or install your own TracerProvider first (Logfire, etc.). Spans record prompt, result, and latency.

Develop

uv sync --dev
uv run ruff check . && uv run pytest

The supported public API is the TypeSafe client. Optional local engines live under jev_lite.engine (pip install 'jev-lite[ml]'). See docs/.

Semantic decisions v0.0.2

Dataset semantic-decisions@v0.0.2, versioned separately from the package (versions).

252 frozen zh-Hant rows in 18 families (36 easy, 48 medium, 168 hard), gold derived from visible text. This natural zh-Hant v1 qualified freeze is v0.0.2, and it is the only semantic-decision eval in this repo. Every model answers the same 504 locked requests: each row in canonical and left-rotated option order. Charts are percent correct. The families were seen during development before the freeze, so this is not unseen confirmation.

All 504

Easy

Medium

Hard

Model Easy /72 Medium /96 Hard /336 All /504 Hard priority reversals /29
AutoTrust JEV-27B 72 96 318 486 28
AutoTrust JEV-27B-VL 72 96 318 486 28
Jev jev-1.13.0 72 96 313 481 28
AutoJev-27B 72 96 302 470 29
Rune v3 26B-A4B 72 95 301 468 24
decider-4b v2 72 95 269 436 14
NeoHorse-Jev-4B 72 92 264 428 5
Tev1-4B 72 96 257 425 15
AutoTrust JEV-9B 72 96 248 416 4
Clef 27B 72 94 238 404 4
Mica v0.1 4B 72 96 235 403 7
Kev 4B 72 95 233 400 9
Clef-Flash 9B 72 90 222 384 3
RSI-Jev v4.0-VL 2B 72 84 220 376 0
RSI-Jev v3.0 2B 72 77 216 365 2
Strands Decider 2B 72 73 207 352 1
Tev1-0.8B 72 86 176 334 0
SemIf, Qwen3.5-4B 72 82 178 332 2
JevEmbed Qwen3-Embedding-4B 60 82 188 330 1
Lev 4B 72 76 169 317 1
decider-0.8b 67 70 176 313 1
JevK5 4B v0.2 72 88 130 290 2
Plumb-4B 72 83 126 281 1
GLiNER2.5-Decide 24 39 194 257 0
Laya multilingual 38 37 165 240 0
jeff (GLiFormer large) 45 34 140 219 0

Easy and medium are regression and "insufficient information" controls. Hard carries the difference: a priority reversal counts only if both ends of a same-case pair are right in both orders. Always answering B already scores 194/336 on hard. All 6,552 calls are valid, with no errors. Adapters differ, so these are task-level scores, not weight comparisons. Details and disclosures.

Earlier banks (semantic-decisions@v0.0.1, the controlled slices, r2) are retired. v0.0.1 survives only at package tag v0.0.1, and none of their scores is pooled with v0.0.2. No model redistribution is authorized.

License

Apache-2.0

Metadata

Release files for jev-lite 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jev-lite 0.0.2
File Size Uploaded
jev_lite-0.0.2.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jev-lite 0.0.2
File Interpreter ABI Platform
jev_lite-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.6 MB

Release files / jev_lite-0.0.2.tar.gz

Download URL jev_lite-0.0.2.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
3e9e5987d8ff76fa046e4a21d1565192635c421b2eab5889d54ee34d2fdcfa08
BLAKE2b-256 checksum
How to use checksums
2766833557ecb66f7ae9a8cb5df19d9b7606f50b4ce4db4566a3765cb7d267e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / jev_lite-0.0.2-py3-none-any.whl

Download URL jev_lite-0.0.2-py3-none-any.whl
Size 307.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c78aa45be44bf95cd03b23c3ab3fd6424b5a6d0a24577f69e66c662b802374e
BLAKE2b-256 checksum
How to use checksums
4c38df88c084652f8c2feb0bb6a38ae3b256da4c5a42b18aa1898f62633522bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.4

2 release files

0.0.3

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page