Jev.aitools.fyi

Command Palette

Search for a command to run...

SDK
Product profile
Swift63 starsUpdated 2026-10-03

System One for Apple Foundation Models

Native Swift 6 bridge that plugs hosted Jev, laya-serve, or on-device Laya into Apple Foundation Models LanguageModelSession.

Overview

System One for Apple Foundation Models (github.com/peterfriese/system-one-foundation-models, Apache-2.0) is Peter Friese's native Swift 6 bridge from System One decision models into Apple's Foundation Models types: LanguageModel, LanguageModelExecutor, and @Generable. The README example depends on the package from version 0.2.0. Package.swift sets swift-tools-version 6.1 and declares platforms iOS 27.0, macOS 27.0, and visionOS 27.0. The README badges also say Swift 6, Xcode 27.0+, iOS 27.0+, and macOS 27.0+. This listing quotes those declarations. It does not add a separate check that those OS versions are shipping. Swift package traits pick a backend. Jev is the default. OnDevice enables Laya. Remote enables Jev and LayaServe. All enables every backend. LayaOnDevice runs Core ML on the Apple Neural Engine and GPU. The README describes a 322M multilingual mmBERT and a 421M English and typed-decisions ModernBERT, with no network and no API key. LayaFoundationModels talks to laya-serve on localhost port 8000, localhost port 8770, or the hosted endpoint the README names as api.impossibl.com. JevFoundationModels calls hosted TypeSafe with RetryPolicy. MailTriageApp is the reference mail client, with 5 selectable backends including an offline mock. Public counts were 63 stars and 2 forks when this listing was drafted.

Problem: Apple's Foundation Models session wants a LanguageModel that can fill @Generable structs. Hosted Jev, a self-hosted laya-serve process, and an on-device Laya Core ML bundle are 3 different runtimes. A phone build also cannot ship a cloud API key inside the binary.

Built for: Swift teams who want LanguageModelSession, @Generable types, and the session.probability, choice, and score shortcuts on hosted Jev, laya-serve, or on-device Laya, and who will follow the README proxy rules before a mobile app calls the cloud.

First indexed on Jev Directory: 2026-10-03

Creator and team

Name
Peter Friese
Handle
@peterfriese
“A lightweight, native Swift 6 bridge integrating System One decision models into Apple's Foundation Models framework.”
System One for Apple Foundation Models README, source

How Jev is used

Role in the product flow
LanguageModelSession backend: a @Generable schema becomes System One questions, and Laya on device, laya-serve, or hosted Jev returns probabilities the session can route on
Primitives
ChoiceScoreNoul
State in
A prompt or application state plus a @Generable struct or enum. The README maps Bool to noul, an enum or String to choice, and a ranged Guide to score. Shortcuts skip the struct: session.probability, session.choice over a Choosable enum or a string list, and session.score over ordered levels.
Decision out
response.content is the decoded struct. response.decision and response.judgement apply a RoutingPolicy and return auto, confirm, or escalate. A choice result carries the winning value, confidence, and the distribution. A score result carries a continuous mean, the most likely level, and per-level probabilities.
  1. Add the package from 0.2.0 and pick a trait: the Jev default, OnDevice, Remote, or All
  2. On device: build a LayaCoreMLEngine from a compiled mlmodelc and ModernBERTTokenizer, then open LanguageModelSession with LayaOnDeviceLanguageModel
  3. Self-hosted HTTP: LayaLanguageModel with endpoint .localDefault, .local(port: 8770), or .hosted
  4. Cloud from a server or CLI: JevLanguageModel reads TYPESAFE_API_KEY from the environment and takes a RetryPolicy. A mobile app uses ProxyTransport and does not bundle the key
  5. Call session.respond(to:generating:) or the probability, choice, and score shortcuts. The README sample RoutingPolicy escalates below 0.60 and auto-accepts at or above 0.85

This package is the Swift adapter for LanguageModelSession. mizorewww-laya-coreml is the Python Core ML runtime for open-weight Laya, with its own Snake loop and a published latency table. receptron-laya is the Node ONNX client for Convai Laya weights. typesafe-ai-typesafe-sdk-js is the official JavaScript SDK for the hosted API. ollaya-dev-ollaya pulls ONNX graphs and serves POST /v1/systemone for agents that want a local daemon. System One Foundation Models keeps the call inside Apple's session type. Hosted traffic uses JevFoundationModels. On-device traffic uses LayaOnDevice. laya-serve traffic uses LayaFoundationModels. The README's 15 to 150 ms line is a range in the introduction, and this page does not turn it into a benchmark. Cite the README, Package.swift, and docs/mobile-security.md.

Sourced performance claims

  • README trait table: Jev (default) enables JevFoundationModels. Laya enables LayaOnDevice. LayaServe enables LayaFoundationModels. OnDevice activates Laya. Remote activates Jev and LayaServe. All activates Jev, Laya, and LayaServe. SystemOneCore holds schema translation, RoutingPolicy, and offline mocks and lists no network and no API key.Source: github.com/peterfriese/system-one-foundation-models README traits and target table
  • README type map: Bool is noul, enum or String is choice, a Guide description is instructions, a ranged Guide is score, and response metadata exposes confidence and probabilities. Shortcut samples: session.probability returns a value from 0.0 to 1.0, with optional whenTrue and whenFalse criteria. session.choice returns value, confidence, distribution, and probability(of:). session.score returns a continuous mean, mostLikelyLevel, mostLikelyIndex, and per-level probabilities.Source: github.com/peterfriese/system-one-foundation-models README type map and shortcuts
  • README timing sentence: evaluate strongly typed @Generable structs and enums against application state in 15 to 150 ms. The README does not attach a measurement table to that range. On-device copy names Laya's 322M multilingual mmBERT and 421M English and typed-decisions ModernBERT, with zero network calls. The sample RoutingPolicy uses escalateBelow 0.60 and autoAtOrAbove 0.85.Source: github.com/peterfriese/system-one-foundation-models README opening and quick start
  • MailTriageApp, listed in the README, is a macOS and iOS reference app with 5 backends: Laya Core ML, Laya local at http://127.0.0.1:8000, Laya remote at https://api.impossibl.com, Jev Cloud at https://api.typesafe.ai, and an offline mock. Package.swift also declares executable targets TicketTriageDemo, DuplicateArticleDemo, FileOrganizerDemo, and LayaDemo.Source: github.com/peterfriese/system-one-foundation-models README MailTriageApp and Package.swift
  • README security warning: never hardcode or bundle TYPESAFE_API_KEY in an iOS, iPadOS, watchOS, or visionOS binary. Safe patterns in that warning: on-device Laya with no secret, a server or CLI that keeps the key in the environment, or ProxyTransport through your own proxy with Apple App Attest or Firebase App Check. The longer notes are docs/mobile-security.md and tech note 0010.Source: github.com/peterfriese/system-one-foundation-models README security advisory
  • Package.swift platforms array: iOS 27.0, macOS 27.0, and visionOS 27.0, with swift-tools-version 6.1. README badges say Xcode 27.0+, iOS 27.0+, and macOS 27.0+. This listing quotes the repo and does not confirm those version numbers against a shipping OS catalog.Source: github.com/peterfriese/system-one-foundation-models Package.swift and README badges
  • Public GitHub repo peterfriese/system-one-foundation-models had 63 stars and 2 forks on 2026-10-03. License Apache-2.0. Language Swift. Created 2026-09-21. Last push 2026-10-02. The GitHub account name is Peter Friese.Source: GitHub API 2026-10-03

Features and stack

Features

  • Swift 6 package traits: Jev, OnDevice, Remote, and All
  • LayaOnDevice, LayaFoundationModels, and JevFoundationModels targets
  • LanguageModelSession plus @Generable structs and enums
  • session.probability, session.choice, and session.score shortcuts
  • RoutingPolicy example at 0.60 and 0.85
  • MailTriageApp reference and ProxyTransport for mobile cloud calls

Stack

  • Swift 6
  • Apache-2.0
  • Apple Foundation Models
  • TypeSafe Jev
  • laya-serve HTTP
  • Core ML Laya

Pricing: Apache-2.0 code. On-device Laya needs no API key. Hosted Jev calls spend a TypeSafe key that the README says must stay off the mobile binary. laya-serve cost is the machine you run. The README does not publish a price table.

FAQ

Is this the Python Laya Core ML package?
mizorewww-laya-coreml is a Python runtime with a Snake demo and its own timing table. This repo is Swift. The on-device target is LayaOnDevice, and the session type is Apple's LanguageModelSession. Hosted Jev is a separate target, JevFoundationModels.
Do the iOS 27 and Xcode 27 badges mean those releases are shipping?
Package.swift declares iOS 27.0, macOS 27.0, and visionOS 27.0. The README badges say Xcode 27.0+, iOS 27.0+, and macOS 27.0+. This directory quotes those lines. It does not add an availability check of its own.
Where should a phone keep the TypeSafe key?
README warning: do not hardcode or bundle TYPESAFE_API_KEY in an iOS, iPadOS, watchOS, or visionOS binary. On-device Laya needs no key. A cloud mobile app uses ProxyTransport through your own proxy, with Apple App Attest or Firebase App Check. Server and CLI samples read the key from the environment.
What do session.probability, choice, and score return?
README shortcuts: probability is a 0.0 to 1.0 truth value, with optional whenTrue and whenFalse criteria. choice returns the winning case, confidence, and the distribution. score returns a continuous mean, the most likely rubric level, and the per-level probabilities. The sample RoutingPolicy escalates below 0.60 and auto-accepts at or above 0.85.

Related learn guides

Original Jev guidance that pairs with this product pattern.

  • System One model

    The model family behind Jev: parallel typed questions, one forward pass, probabilities you can threshold.

  • Where to run Jev

    Compare official TypeSafe, Vercel AI Gateway, OpenRouter, Cloudflare Workers AI, and classifier.dev with a fact table.

Related products

Hand-picked neighbors with rich profiles or overlapping tags.

IntegrationsPython1,527
Demo
Apple Silicon Core ML and Neural Engine runtime for open-weight Laya: short typed decisions, PyPI laya-coreml, Hugging Face bundles, Snake demo.
integrationsapple-siliconcoreml
IntegrationsTypeScript500
Node 20+ ONNX Runtime client for Convai Laya: typed systemOne, HF cache about 1.7 GB fp32, parity claims vs Python RLAgent.
integrationsnodejstypescript
OfficialTypeScript114
OfficialFeatured
The official TypeScript SDK: inferred answer types, System One primitives, and fewer any-shaped regrets.
officialsdk
Agent toolingRust153
Ollama for decision models: pull laya kev von decider, serve POST /v1/systemone on :11435, ONNX graphs only, TypeSafe SDK drop-in.
agent-toolingself-hostedonnx
By Rishit