typesafe-sdk (binnash)
PHP SDK with Laravel integration for System One, using PSR-18 HTTP clients and explicit configuration.
Overview
binnash/typesafe-sdk is a PHP 8.2+ SDK for TypeSafe's System One models, with a Laravel integration. A single request evaluates any number of typed questions about the same state, and your code owns routing, thresholds, ranking and side effects. It works with any PSR-18 HTTP client and PSR-17 factories, discovering what your project already has (Guzzle is suggested).
Unlike some SDKs, it never reads the environment; configuration is passed explicitly so it stays under application control. The README covers primitives, reading answers, per-call options, retries, errors, logging, models, Laravel setup and testing. Answers are accessed as typed properties, and scores may land between levels. Scores may land between levels, answers expose usage such as input tokens, and the README covers retries, error handling, logging and testing.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this ticket about billing? | yes · no |
| Choice | What is the customer's tone? | calm · frustrated · angry |
| Score | How urgent is this ticket? | can wait · this week · today |
How it works
- composer require binnash/typesafe-sdk and a PSR-18 client.
- Create a client with an explicit key.
- Call systemOne with state and questions.
- Read typed answers and usage.
Strengths
- Laravel integration.
- PSR-18 compatible; bring your own HTTP client.
- Explicit configuration, no hidden environment reads.
Caveats
- Requires a TypeSafe key.
- Community SDK.
Getting started
composer require binnash/typesafe-sdk guzzlehttp/guzzleAt a glance
- Type
- Library
- Status
- beta
- Language
- PHP
- Runtime
- library (Composer), Laravel
- Has code
- yes
Use cases and integrations
How curated lists describe it
PHP & Laravel SDK for TypeSafe AI's JEV Model series.
hellogumbo/awesome-jev
Frequently asked questions
Does it read TYPESAFE_API_KEY?
No, you pass configuration explicitly.
Does it support Laravel?
Yes, there is a Laravel section and integration.
Which HTTP client does it use?
Any PSR-18 client your project has; Guzzle is suggested.
Related projects
Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPElixir library for unified LLM calls across providers, with an evaluate interface that calls Jev via TypeSafe or OpenRouter.
ProjectproductionElixirSelf-hosted multi-tenant AI agent platform listed as including optional TypeSafe client tools for classification, scoring and yes/no.
LibraryproductionPythonProvider-agnostic TypeScript AI SDK; per list sources, an @tanstack/ai-typesafe adapter exposes Jev decisions through decide().
ServiceproductionTypeScript