Skip to content
MrJev

laya-php

Laravel-ready PHP client for Laya, the open System One model, so a typed decision is a PHP enum rather than a parsed sentence. Self-hosted, no Jev key.

View on GitHub →

Checked, not fully reviewed

A clean, well-tested PHP and Laravel client for Laya. Checked, not fully reviewed: since 1.2.1 it works with any server that follows TypeSafe's spec.

Good for

  • PHP and Laravel apps that want ticket triage or tagging as enums, ints and bools
  • Unit tests without a server: the built-in fake asserts on what was asked

Watch out for

  • Off laya-serve, `answerConfidence` falls back to `confidence`, which is stricter for choices and scores

Tested Oct 7, 2026 at 9a9c8ea33d88 · PHP 8.5 with Guzzle in Docker; its 104 tests, and its examples against sys1 serving Laya on CPU and a stand-in in TypeSafe's published response shape

Checked, not fully reviewed. We ran its 104 tests (all pass; 109 at 1.2.1) and its examples against two /v1/systemone servers that are not laya-serve: sys1 serving Laya, and a stand-in answering in the shape of TypeSafe’s spec. No Jev calls.

You describe a decision as a readonly class — an enum for a choice, an int for a score, a bool for yes/no — and $laya->decide($text, Triage::class) returns an instance. It is the nicest PHP surface for this protocol we have seen: PSR-18 so any HTTP client works, an optional PSR-16 cache, a Laravel service provider with a health command, and a fake for tests.

When we first checked it, the README said it targeted laya-serve and “hasn’t been tested against the hosted Jev API”. Against both servers the answers themselves parsed correctly: the choice, the score’s level and expected value, and P(yes). The confidence did not. Each answer has two, and the README says to gate on answerConfidence, “the calibrated one”. That is read from answer_confidence, a laya-serve field that TypeSafe’s spec does not have, and it defaulted to zero when missing:

server p(billing) confidence answerConfidence with minConfidence: 0.7
sys1 (Laya) 0.988 0.934 0.000 null
spec-shaped stand-in 0.900 0.850 0.000 null

So at da96d80, on anything but laya-serve, every minConfidence answer became null and the README’s answerConfidence >= 0.7 ? … : 'triage' sent every ticket to triage, with no warning. We reported it, and the author shipped a fix the next day in 1.2.1: when answer_confidence is missing, answerConfidence falls back to confidence, and a yes/no answer — which has no confidence in TypeSafe’s shape — gets max(P(yes), P(no)). Requests now always name a model, as the spec requires, and CI checks every request and response against TypeSafe’s OpenAPI spec.

We reran the same ticket against the spec-shaped stand-in: department came back billing instead of null, and the choice, yes/no and score answers carried 0.85, 0.91 and 0.70. The release notes are honest about the trade: confidence is stricter than laya-serve’s calibrated value for choices and scores, so a threshold tuned on laya-serve will let fewer answers through elsewhere.

Apache-2.0, 59 stars, PHP 8.4+. For the model itself, see our Laya review.

See how it compares with other tools in Best Jev tools, tested hands-on.

Review updated Oct 7, 2026. Numbers quoted from the project are its author's own; we don't publish our own measurements of Jev.

More in Community SDKs

spring-ai-community/spring-ai-typesafe

Java client for the System One API on Spring RestClient, plus Spring AI integrations that use it as a judge, a guardrail, a RAG post-processor and a tool index.

JavaReviewed

obie/ruby_decision_model

Ruby gem with one client for decision models behind several providers: TypeSafe's Jev, OpenRouter (the default), OpenAI, Cloudflare Clef, Perplexity and any /v1/systemone server.

Ruby

go-jev

★ 46

mattn/go-jev

Go SDK with a jev-cli built on it, shaped for UNIX pipelines.

Go

Get new Jev projects every week

New Jev releases, pricing changes, and the best new projects, once a week. No spam; unsubscribe anytime.

Powered by Buttondown. See our privacy policy.