SwiftJev
TypeSafe Jev provider for the SwiftDecision framework, returning validated probability distributions through its DecisionBackend protocol.
Overview
SwiftJev is the TypeSafe Jev provider for SwiftDecision. It sends typed Noul, Choice and Score prompts to the hosted System One API and returns validated probability distributions through SwiftDecision's DecisionBackend protocol, while SwiftDecision owns the typed decision APIs, policy validation, acceptance and fallback behaviour, cancellation, timeouts and traces. It is intentionally a thin adapter that does not expose raw response models.
The backend validates every prompt and response against Jev's contracts, preserves option order, rejects redirects, checks cancellation, and never includes credentials or response bodies in errors; transport is injectable for deterministic tests. For Choice, it returns the full distribution in option order, and an optional maximum probability gap can reject responses whose chosen label sits too far below the most probable option. Custom API roots and full operation URLs support compatible proxies, with an explicit key required. For iOS it recommends storing user-provided keys in the Keychain rather than shipping a shared key. An opt-in benchmark measures latency and throughput. It is Apache-2.0 licensed.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is the service unavailable for all customers? | — |
| Choice | Choice prompts with ordered options | — |
How it works
- Create a JevDecisionBackend (key from env or explicit)
- Pass it to a SwiftDecision DecisionEngine
- Ask noul, choice or score with context
- SwiftDecision applies acceptance policy to the validated distribution
Strengths
- Strict contract validation
- Safe error handling without leaking secrets
- Proxy and gateway support
Caveats
- Requires SwiftDecision
- Custom endpoints need an explicit key
Getting started
Add SwiftJev and SwiftDecision packages, then DecisionEngine(backend: try SwiftJev.JevDecisionBackend()).At a glance
- Type
- Project
- Status
- beta
- Language
- Swift
- Runtime
- Swift library (Apple platforms)
- Has code
- yes
- Has tests
- yes
- License
- Apache-2.0
- Stars
- 9
Use cases and integrations
How curated lists describe it
Swift framework to access Jev System One model by TypeSafe.ai
wh000wh000/awesome-jev-liveSwift framework to access Jev System One model by TypeSafe.ai.
hellogumbo/awesome-jev
Frequently asked questions
What is SwiftDecision?
The framework that owns typed decision APIs and policies; SwiftJev is its Jev provider.
Can it use a proxy?
Yes, via a custom API root or full operation URL with an explicit key.
How should iOS apps handle keys?
Store a user-provided key in the Keychain; do not ship a shared key.
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