Skip to content

TypeSafe AI Swift SDK

Dependency-free Swift 6 client for System One with strict concurrency, pluggable authentication, retries and network-free tests.

Librarybeta

Overview

The TypeSafe AI Swift SDK is a Swift 6 client ported from the official JavaScript and Python SDKs. It supports macOS 13+, iOS/iPadOS 16+, tvOS 16+ and watchOS 9+, using strict concurrency, URLSession, Codable and native task cancellation, with no dependencies.

The README strongly recommends routing requests through your own authenticated backend in production so the TypeSafe key stays server-side; direct API-key mode is for local development only. Authentication is pluggable, including bearer tokens resolved again on every retry so sessions can refresh. Choice, Score and Noul questions are built with helpers and answers are read from typed results. The list describes it as unofficial, though the install snippet references a typesafe-ai repository path.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat is this ticket about?billing · technical · other

How it works

  1. Configure the client with backend authentication and base URL.
  2. Build a SystemOneRequest with state and questions.
  3. Call systemOne with optional per-request headers.
  4. Read choices, scores or nouls from the result.

Strengths

  • No dependencies; native Swift concurrency.
  • Designed for safe key handling via a backend proxy.
  • Network-free transport tests, per the list.

Caveats

  • Direct key mode is only for development.
  • Status as official or unofficial is not fully clear.

Getting started

Add .package(url: "https://github.com/typesafe-ai/typesafe-sdk-swift.git", from: "0.6.0") to Package.swift.

At a glance

Type
Library
Status
beta
Language
Swift
Runtime
Apple platforms library
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • Swift ecosystem: dependency-free Swift 6 client for Jev Choice, Score, and Noul questions with strict concurrency, configurable authentication and retries, and offline transport tests.

    yibie/awesome-jev
  • Unofficial dependency-free Swift 6 client for Choice / Score / Noul, with strict concurrency, configurable authentication and retries, and network-free tests

    AnotiaWang/awesome-decision-models

Frequently asked questions

Which platforms are supported?

macOS 13+, iOS/iPadOS 16+, tvOS 16+ and watchOS 9+.

Should apps embed the API key?

No; the README recommends a backend proxy and using direct key mode only for development.

Does it have dependencies?

No, it is dependency-free.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • 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
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython