Skip to content

typesafe-sdk (binnash)

PHP SDK with Laravel integration for System One, using PSR-18 HTTP clients and explicit configuration.

Librarybeta

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

TypeQuestionAnswers
Yes / noIs this ticket about billing?yes · no
ChoiceWhat is the customer's tone?calm · frustrated · angry
ScoreHow urgent is this ticket?can wait · this week · today

How it works

  1. composer require binnash/typesafe-sdk and a PSR-18 client.
  2. Create a client with an explicit key.
  3. Call systemOne with state and questions.
  4. 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/guzzle

At a glance

Type
Library
Status
beta
Language
PHP
Runtime
library (Composer), Laravel
Has code
yes

Use cases and integrations

How curated lists describe it

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.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Elixir library for unified LLM calls across providers, with an evaluate interface that calls Jev via TypeSafe or OpenRouter.

    ProjectproductionElixir
  • Self-hosted multi-tenant AI agent platform listed as including optional TypeSafe client tools for classification, scoring and yes/no.

    LibraryproductionPython
  • Provider-agnostic TypeScript AI SDK; per list sources, an @tanstack/ai-typesafe adapter exposes Jev decisions through decide().

    ServiceproductionTypeScript