typesafe-sdk-php
Strictly typed PHP 8.4 SDK for System One aiming for 1:1 parity with the official JS and Python SDKs.
Overview
valksor's typesafe-sdk-php is an unofficial, strictly typed PHP client for System One that aims for one-to-one feature parity with the official JavaScript and Python SDKs: the same wire contract, environment configuration, retry semantics, request metadata and typed errors. It requires PHP 8.4 with curl and json extensions, has zero framework dependencies and passes PHPStan at max level.
Features include typed Noul, Choice and Score questions and answers, optional typed response models via a factory, model discovery, per-attempt timeouts and exponential backoff, request IDs and raw metadata, an injectable cURL transport for frameworks and tests, and status-specific exceptions. It is on Packagist with CI. It is the PHP sibling of the same organization's Go SDK.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | What is this ticket about? | billing · technical · other |
How it works
- composer require valksor/typesafe-sdk-php.
- Set TYPESAFE_API_KEY and create a Client.
- Call systemOne with state and questions.
- Read typed answers or map to a response model.
Strengths
- Parity with official SDKs.
- PHPStan max level; strict types.
- Injectable transport.
Caveats
- Requires PHP 8.4.
- Unofficial.
Getting started
composer require valksor/typesafe-sdk-phpAt a glance
- Type
- Library
- Status
- beta
- Language
- PHP
- Runtime
- library (Composer)
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
Unofficial PHP SDK for the TypeSafe AI System One API — 1:1 parity with the official JS and Python SDKs. Not affiliated with TypeSafe AI.
hellogumbo/awesome-jev
Frequently asked questions
Which PHP version?
PHP 8.4 or newer.
Does it need a framework?
No, it has zero framework dependencies.
Is it official?
No.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, 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.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython