jev-php
PHP library, extracted from LLPhant, for typed Jev Noul, Choice and Score calls, also usable with a Laya endpoint.
Overview
jev-php is a small PHP library extracted from the LLPhant project that provides typed access to Jev's classification API. You send a state, usually text, with a set of questions and receive value objects: a Noul answer with a yes/no probability and threshold helpers, a Choice answer with the selected label, probabilities and confidence, and a Score answer with a probability-weighted numeric score across the provided levels. Every answer includes token usage metadata.
Besides TypeSafe's API, the classifier can target Laya, an open decision engine, through a LayaConfig pointing at a Jev-compatible systemone endpoint such as a local laya-serve Docker container. The library is unofficial and community-built, requires PHP 8.1 and Composer, and is licensed LGPL-2.1.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this convey urgency? | yes · no |
| Choice | Which team should handle this? | billing · technical · sales |
| Score | How frustrated is the customer? | Calm · Frustrated · Very angry |
How it works
- composer require f-lombardo/jev-php and set JEV_API_KEY
- Build NoulType, ChoiceType and ScoreType questions
- Call askQuestions with the state
- Read typed answers and apply thresholds such as isTrue(0.80)
Strengths
- Typed value objects for each answer type
- Works with Jev or a Laya endpoint
- Token usage included
Caveats
- Unofficial project
- Narrow scope focused on classification calls
Getting started
composer require f-lombardo/jev-phpAt a glance
- Type
- Library
- Status
- beta
- Language
- PHP
- Runtime
- Library
- Has code
- yes
- License
- LGPL-2.1
Use cases and integrations
How curated lists describe it
\`ScoreAnswer::score\` is a probability-weighted numeric score across the provided levels.
logicrw/awesome-jev-projectsA PHP library to connect to TypeSafe JEV APIs.
hellogumbo/awesome-jev
Frequently asked questions
Can it work without TypeSafe?
Yes. LayaConfig points it at a Laya endpoint with a Jev-compatible API.
What does ScoreAnswer return?
A probability-weighted numeric score across the provided levels.
Is it official?
No. It is a community library not affiliated with TypeSafe AI.
Related projects
Go harness for System One models: hosted Jev, open Kev in-process via llama.cpp, and Cloudflare Clef, with typed helpers and a CLI.
ServicebetaGoTypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.
ProjectbetaTypeScriptSwift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.
ProjectbetaSwiftUnofficial Rust gateway routing /v1/systemone requests to TypeSafe, Vercel, OpenRouter or local Laya via an editable DAG.
ProxybetaRustZero-dependency local gateway and live visualiser that proxies Jev calls, logs every decision to SQLite and draws them on a real-time map.
ProxybetaJavaScriptZero-dependency npm package that runs Laya natively or as WebAssembly in Node, Bun and browsers, drop-in for Jev's /v1/systemone.
ProjectbetaJavaScript