Skip to content

jev-php

PHP library, extracted from LLPhant, for typed Jev Noul, Choice and Score calls, also usable with a Laya endpoint.

LibrarybetaLGPL-2.1

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

TypeQuestionAnswers
Yes / noDoes this convey urgency?yes · no
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow frustrated is the customer?Calm · Frustrated · Very angry

How it works

  1. composer require f-lombardo/jev-php and set JEV_API_KEY
  2. Build NoulType, ChoiceType and ScoreType questions
  3. Call askQuestions with the state
  4. 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-php

At 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

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.

    ServicebetaGo
  • TypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.

    ProjectbetaTypeScript
  • Swift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.

    ProjectbetaSwift
  • Unofficial Rust gateway routing /v1/systemone requests to TypeSafe, Vercel, OpenRouter or local Laya via an editable DAG.

    ProxybetaRust
  • Zero-dependency local gateway and live visualiser that proxies Jev calls, logs every decision to SQLite and draws them on a real-time map.

    ProxybetaJavaScript
  • Zero-dependency npm package that runs Laya natively or as WebAssembly in Node, Bun and browsers, drop-in for Jev's /v1/systemone.

    ProjectbetaJavaScript