Skip to content

jev-foundation-models

Swift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.

Projectbeta

Overview

System One for Apple Foundation Models is a Swift 6 bridge that plugs decision models into Apple's Foundation Models framework (LanguageModel, LanguageModelExecutor and @Generable), so apps can evaluate typed @Generable structs and enums against application state. It supports several backends: on-device Core ML versions of Laya (322M multilingual and 421M English models) on the Neural Engine and GPU with no network calls; self-hosted laya-serve speaking the Jev-compatible /v1/systemone protocol; Cloudflare's open Clef and Clef-Flash multimodal models; OpenAI's Decisions API; and hosted TypeSafe Jev with retry, cancellation and confidence routing policies.

The README includes a security advisory never to embed cloud API keys in mobile app binaries, recommending on-device models or a server-side proxy. A list summary notes a protocol-based model interface and six tests. Latency claims in the README are the author's.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich case of this @Generable enum fits the app state?(inferred)—
Yes / noIs this condition true of the app state?(inferred)—

How it works

  1. Define @Generable types for the decision
  2. Choose a backend: on-device Laya, laya-serve, Clef, OpenAI Decisions or Jev
  3. Evaluate against app state through the Foundation Models API
  4. Route on confidence with RoutingPolicy

Strengths

  • Fully on-device option with no network
  • One API across several decision backends
  • Clear guidance on key safety in mobile apps

Caveats

  • Cloud backends need a server-side key proxy for apps
  • Small test suite

At a glance

Type
Project
Status
beta
Language
Swift
Runtime
Apple platforms (Foundation Models, Core ML)
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • Apple platforms: a Swift 6 bridge that runs Jev decisions through Apple's Foundation Models on device, with a protocol-based model interface and six tests.

    yibie/awesome-jev

Frequently asked questions

Can it run without a network?

Yes, with the on-device Core ML Laya models.

Which hosted backends are supported?

TypeSafe Jev, OpenAI Decisions, Cloudflare Clef and self-hosted laya-serve.

Can I put my TypeSafe key in the app?

No; the README warns never to embed cloud keys in mobile binaries.

Related projects

  • Go harness for System One models: hosted Jev, open Kev in-process via llama.cpp, and Cloudflare Clef, with typed helpers and a CLI.

    ServicebetaGo
  • TypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.

    ProjectbetaTypeScript
  • Zero-dependency npm package that runs Laya natively or as WebAssembly in Node, Bun and browsers, drop-in for Jev's /v1/systemone.

    ProjectbetaJavaScript
  • Local-first desktop AI workbench for llama.cpp, vLLM and SGLang that includes a JEV typed-decision page and /v1/systemone gateway.

    Servicebeta
  • Runs the open LAYA decision model under Bun with native ONNX inference behind a TypeSafe-compatible API, plus an English/Persian playground.

    LibrarybetaTypeScript
  • ollaya★ 1,305

    Rust daemon and CLI that pulls open decision models like Laya and serves them locally behind a TypeSafe-compatible /v1/systemone.

    ServicebetaRust