foundation-models-on-device

Generate text on-device with Apple FoundationModels for iOS apps.

1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/Mark393295827/house-maint-ai --skill foundation-models-on-device-mark393295827
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/Mark393295827/house-maint-ai/tree/main/skills/foundation-models-on-device
Command: npx skills add https://github.com/Mark393295827/house-maint-ai --skill foundation-models-on-device-mark393295827

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Apple FoundationModels framework enables on-device LLM capabilities for apps, providing privacy-preserving text generation, structured output, and local tool integration without cloud dependency.

Core Features & Use Cases

  • On-device text generation using FoundationModels for private, offline AI.
  • Structured output with @Generable for safe, typed data.
  • Custom tool calling to integrate domain-specific actions.
  • Snapshot streaming to progressively update UI during generation.
  • Offline, privacy-first AI suitable for iOS 26+ apps and contexts with sensitive data.

Quick Start

Create a new on-device session and generate a short response from the model.

Frequently Asked Questions about foundation-models-on-device

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run on-device LLMs on iOS for offline text generation?▼

To run on-device LLMs on iOS, use the FoundationModels framework for offline text generation. It processes text locally without sending data to the cloud, ensuring privacy while supporting a 4,096 token context window.

Does FoundationModels support structured output and custom tool calling?▼

Yes, FoundationModels supports structured output using the @Generable macro for typed data and custom tool calling to integrate domain-specific actions. This allows safe, typed responses and local tool integration within your iOS app.

Can I stream LLM output progressively to update my iOS app UI?▼

Yes, FoundationModels supports snapshot streaming to progressively update the UI during text generation. This mechanism allows your app to display text chunks as the on-device model generates them in real-time.

What is the token context limit for on-device inference with FoundationModels?▼

The FoundationModels framework supports on-device inference with a 4,096 token context limit. This capacity handles interactive chats, local data processing, and real-time content generation within iOS apps.

Do I need iOS 26 to use FoundationModels for private, offline AI?▼

Yes, FoundationModels requires iOS 26 or later to enable private, offline AI capabilities. It is specifically designed for iOS 26+ apps and contexts handling sensitive data without cloud dependency.