# apple/python-apple-fm-sdk

Python bindings for access to the on-device model at the core of Apple Intelligence through the Foundation Models framework

Repository: https://github.com/apple/python-apple-fm-sdk
Canonical: https://ross.abutalabs.com/products/python-apple-fm-sdk
Homepage: https://apple.github.io/python-apple-fm-sdk/
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-07-07T23:12:46+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 90, longevity 13
- inputs: {"age_days": 189, "days_push": 57, "days_rel": 65, "gap_med": 21, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1225, forks 74 (observed 2026-08-28T04:04:03.003740+00:00)

## What it is
Python bindings for Apple's Foundation Models framework, giving access to the on-device foundation model behind Apple Intelligence on macOS. It supports streaming text generation, guided generation with typed structured outputs, and batch evaluation of Swift app AI features from Python.

## Use cases
- run on-device LLM inference on macOS with Apple Intelligence
- generate structured typed objects from a Python class schema
- evaluate Swift app Foundation Models features from Python
- stream real-time text generation responses
- analyze transcripts exported from Swift apps

## When to choose
- you're on macOS 26+ with Apple Intelligence and want Python access to the system model
- you need type-safe guided generation with constrained outputs
- you want to evaluate on-device model behavior using Python's data/ML ecosystem

## When to avoid
- you're on Linux, Windows, or older macOS versions
- you need cloud-hosted or cross-platform LLM access
- you need a mature project accepting contributions

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, sdk, machine-learning
- domain: large-language-models, artificial-intelligence, apple-ecosystem, developer-tools
- platform: python
- tags: apple-intelligence, foundation-models, on-device-ai, guided-generation, swift-bridge, macos

## Member repositories
- apple/python-apple-fm-sdk (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:03.003740+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:15:23.187924+00:00, confidence not recorded.
  - readme: https://github.com/apple/python-apple-fm-sdk (fetched 2026-08-28T04:04:03.003740+00:00, sha 79d43f9a1339)
  - homepage: https://apple.github.io/python-apple-fm-sdk/ (fetched 2026-08-29T12:23:34.976987+00:00, sha 6c9c7cd7b77a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
