Skip to content

Jev directory

TypeSafe PHP & Laravel SDK

A community PHP and Laravel SDK for the Jev model series, wrapping typed questions and probability answers for the PHP ecosystem.
Stars
2
Language
PHP
Reading time
3 min
Published by
Community
Last verified
Sep 2026

About this project

PHP SDK for TypeSafe AI — small units of AI intelligence you can use like programming primitives. TypeSafe's System One models, including Jev, turn natural language and application state into typed judgments and probabilities that code can combine. A single request evaluates any number of typed questions about the same state, and your code owns the workflow: routing, thresholds, ranking, and side effects. PHP 8.2 or newer with ext-json.

Quoted from the project's README. Read the full README.

Highlights

  • Installs with `composer require binnash/typesafe-sdk` and needs PHP 8.2+ with ext-json plus a PSR-18 client and PSR-17 factories.
  • Score requires at least two ordered levels and returns a probability-weighted float that can land between levels.
  • Noul answers have no separate confidence; isYes() uses a 0.5 default or a threshold you pass, such as isYes(0.9).
  • Defaults include maxRetries 2, backoff 500-5000 ms, jitter 0.25, and retries on 408, 429, and 500-599.
  • Laravel 11 and 12 get auto-discovery, a TypeSafe facade, and env vars like TYPESAFE_TIMEOUT and TYPESAFE_MAX_RETRIES.

Quickstart

php
use Binnash\Typesafe\Support\Question;
use Binnash\Typesafe\TypeSafe;

$client = TypeSafe::client('your-api-key');

$result = $client->systemOne(
    state: ['subject' => 'Charged twice this month', 'body' => 'I see two charges of $49 on my card. Please fix this ASAP.'],
    questions: [
        'is_billing' => Question::noul('Is this ticket about billing?'),
        'urgency' => Question::score('How urgent is this ticket?', ['can wait', 'this week', 'today']),
    ],
);

$result->answers->is_billing->noul;

Watch out

The core SDK never reads the environment — only the Laravel bridge does — so outside Laravel you must pass the API key, base URL, and timeout explicitly.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai