View in English

  • Apple Developer
    • 시작하기

    시작하기 탐색

    • 개요
    • 알아보기
    • Apple Developer Program

    알림 받기

    • 최신 뉴스
    • Hello Developer
    • 플랫폼

    플랫폼 탐색

    • Apple 플랫폼
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    피처링

    • 디자인
    • 배포
    • 게임
    • 액세서리
    • 웹
    • 홈
    • CarPlay
    • 기술

    기술 탐색

    • 개요
    • Xcode
    • Swift
    • SwiftUI

    피처링

    • 손쉬운 사용
    • 앱 인텐트
    • Apple Intelligence
    • 게임
    • 머신 러닝 및 AI
    • 보안
    • Xcode Cloud
    • 커뮤니티

    커뮤니티 탐색

    • 개요
    • Apple과의 만남 이벤트
    • 커뮤니티 주도 이벤트
    • 개발자 포럼
    • 오픈 소스

    피처링

    • WWDC
    • Swift Student Challenge
    • 개발자 이야기
    • App Store 어워드
    • Apple 디자인 어워드
    • 문서

    문서 탐색

    • 문서 라이브러리
    • 기술 개요
    • 샘플 코드
    • 휴먼 인터페이스 가이드라인
    • 비디오

    릴리즈 노트

    • 피처링 업데이트
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • 다운로드

    다운로드 탐색

    • 모든 다운로드
    • 운영 체제
    • 애플리케이션
    • 디자인 리소스

    피처링

    • Xcode
    • TestFlight
    • 서체
    • SF Symbols
    • Icon Composer
    • 지원

    지원 탐색

    • 개요
    • 도움말
    • 개발자 포럼
    • 피드백 지원
    • 문의하기

    피처링

    • 계정 도움말
    • 앱 심사 지침
    • App Store Connect 도움말
    • 새로 추가될 요구 사항
    • 계약 및 지침
    • 시스템 상태
  • 빠른 링크

    • 이벤트
    • 뉴스
    • 포럼
    • 샘플 코드
    • 비디오
 

비디오

메뉴 열기 메뉴 닫기
  • 컬렉션
  • 전체 비디오
  • 소개

더 많은 비디오

  • 소개
  • 요약
  • 코드
  • fm CLI와 Python SDK로 AI 기반 스크립트 빌드하기

    macOS에서 Apple Foundation Models를 활용하는 새로운 방법을 모두 살펴보세요. Foundation Models SDK for Python을 사용하면 Python 생태계의 인기 도구 및 평가 패키지와 통합할 수 있습니다. macOS 27에 도입된 새로운 fm 명령어를 사용하여 스크립팅을 간소화하고, 모델 워크플로를 자동화하며, 개발 프로세스를 가속화하는 방법을 알아보세요.

    챕터

    • 0:00 - Introduction
    • 1:22 - Introducing the fm CLI and Python SDK
    • 3:23 - Command line tool
    • 5:02 - fm respond and structured output
    • 6:11 - Automating file management with fm
    • 8:52 - Python SDK
    • 9:42 - Prompting, tool calling and guided generation
    • 10:44 - Building an evaluation pipeline in Python
    • 15:20 - Next steps

    리소스

    • Foundation Models SDK for Python on GitHub
    • Foundation Models SDK for Python Documentation on GitHub
      • HD 비디오
      • SD 비디오

    관련 비디오

    WWDC26

    • 비공개 클라우드 컴퓨팅에서 [Model Name] 활용하기
    • Foundation Models 프레임워크로 에이전틱 앱 경험 빌드하기
    • Foundation Models 프레임워크에 LLM 제공자 적용하기
    • Foundation Models 프레임워크의 새로운 기능
  • 비디오 검색…
    • 5:07 - Prompt the on-device model with fm respond

      $ fm respond "Provide a basic regex in Swift to parse an email address"
      # Here is a basic regex to parse an email address in Swift: [...]
      
      $ fm respond "Provide a comprehensive regex in Swift to parse an email address" --model pcc
      # [...] Here's a robust Swift implementation using 'NSRegularExpression' to validate a typical email address:
      
      $ fm respond "What app is the user using in this screenshot?" --model pcc \
      	--image Screenshot.png
      # The user is using the Mail app.
      
      $ fm schema object --name AppsIdentified --string app_names --array > schema.json 
      $ fm respond "What apps are the user actively using in this screenshot?" \
      	--image Screenshot.png --model pcc --schema schema.json
      # {"app_names": ["Messages", "Mail", "Calendar"]}
      
      $ fm respond --help
    • 7:55 - Sort files with fm respond and a schema

      fm schema object --name "TriagedFileList" \
          --string 'final_files' --array \
          --string 'draft_files' --array > /tmp/schema.json
      
      output=$(fm respond \
          --instructions "I just completed a project, and I need help triaging the latest version of the files from the previous versions. I will give you a list of files. Return a list of the latest files (i.e., all files that, you can infer from their name in the list, are the latest versions), and then return separately a list of all draft files (i.e., all files that weren't considered final)." \
          "This is the list of all files:\n\n${files_list}" \
          --schema /tmp/schema.json
      )
      
      echo "${output}" | jq -r '.final_files[]' | while read -r file; do
          cp "${DIRECTORY_TO_TRIAGE}/${file}" "${FINAL_FILES_STORAGE_DIRECTORY}"
      done
      
      echo "${output}" | jq -r '.draft_files[]' | while read -r file; do
          mv "${DIRECTORY_TO_TRIAGE}/${file}" "${DRAFT_FILES_STORAGE_DIRECTORY}"
      done
    • 8:54 - Install the Foundation Models Python SDK

      pip install apple_fm_sdk
    • 10:00 - Create a session and respond to a prompt

      import apple_fm_sdk as fm
      
      INSTRUCTIONS = "You're an AI assistant for Cupertino Mart, a grocery store with in-app ordering."
      
      async def answer_question(prompt: str) -> str:
      	session = fm.LanguageModelSession(instructions=INSTRUCTIONS)
        return await session.respond(prompt)
    • 10:21 - Define a Tool for the language model

      class GetPastOrdersTool(fm.Tool):
        name = "get_past_orders"
        description = "Retrieves information about this user's past orders."
      
        @fm.generable("Past orders query parameter")
        class Arguments:
        	number_orders: str = fm.guide("How many of the last orders to retrieve")
      
        @property
        def arguments_schema(self) -> fm.GenerationSchema:
        	return self.Arguments.generation_schema()
      
      async def call(self, args: fm.GeneratedContent) -> str:
      	number_orders = args.value(int, for_property="number_orders")
        return await Orders.load_last_orders(user_id=user_id, amount=number_orders)
    • 10:35 - Generate structured output with @fm.generable

      @fm.generable("Suggested items")
      class ItemsSuggestion:
      	item_names: list[str] = fm.guide("Names of the suggested items")
      
      INSTRUCTIONS = "You're an AI assistant tasked with returning potential grocery items that the user might be interested in."
      
      async def generate_suggested_cart_items(user_input: Optional[str]) -> ItemsSuggestion:
      	session = fm.LanguageModelSession(instructions=INSTRUCTIONS, tools=load_tools())
      	prompt = """Using the tools to load the user's previous orders, \
                    return a list of items the user has already ordered \
                    and that they might be interested in again \
                    as they're getting ready to place a new grocery order."""
      	if user_input is not None:
          prompt += f"\nAccount for the following request from the user: {user_input}"
          return await session.respond(prompt, generating=ItemsSuggestion)
    • 0:00 - Introduction
    • Overview of the Foundation Models Framework — guided generation, tool calling, and new macOS 27 features like image inputs and server model access.

    • 1:22 - Introducing the fm CLI and Python SDK
    • Two new ways to access Apple Foundation Models on macOS: the fm command line tool (pre-installed with macOS 27 for terminal-based prompting and automation) and the Foundation Models SDK for Python (for ML engineers who work more in Python than Swift).

    • 3:23 - Command line tool
    • How to use the fm command line tool — browsing available commands, starting an interactive conversation with fm chat, switching between the on-device and Private Cloud Compute models, and saving sessions to resume later.

    • 5:02 - fm respond and structured output
    • How to use fm respond for inline scripting — passing prompts and getting responses as terminal output, using the model and image options, and combining fm schema object with the schema option to produce structured JSON outputs.

    • 6:11 - Automating file management with fm
    • A practical automation demo: using fm in a shell script to intelligently sort a messy presentation folder — prompting the model with a file list to classify drafts versus finals, generating structured JSON output, and routing files to backup and archive accordingly.

    • 8:52 - Python SDK
    • Introduction to the Foundation Models SDK for Python — installation requirements (Python 3.10+, Xcode, Apple Silicon), core features mirroring the Swift framework (text and image inputs, streaming, tool calling, guided generation), and its value for ML engineers and rapid prototyping.

    • 9:42 - Prompting, tool calling and guided generation
    • How to use the Python SDK in a grocery app prototype — creating a LanguageModelSession, calling session.respond with a prompt, exposing tools for the model to fetch order history, and using the fm.generable decorator for structured output into a typed ItemsSuggestion object.

    • 10:44 - Building an evaluation pipeline in Python
    • A case study using the Python SDK with Jupyter, Pandas, and matplotlib to evaluate three prompt implementations for a cart completion feature — generating outputs with the on-device model, scoring them with a server judge model on criteria like excess items, missing items, and hallucinations, and visualizing results to guide prompt iteration.

    • 15:20 - Next steps
    • Summary of the new macOS tools and next steps: explore fm in Terminal, visit the Python SDK GitHub for example snippets, and build an evaluation pipeline to measure and improve prompt quality.

Developer Footer

  • 비디오
  • WWDC26
  • fm CLI와 Python SDK로 AI 기반 스크립트 빌드하기
  • 메뉴 열기 메뉴 닫기
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    메뉴 열기 메뉴 닫기
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    메뉴 열기 메뉴 닫기
    • 손쉬운 사용
    • 액세서리
    • Apple Intelligence
    • 앱 확장 프로그램
    • App Store
    • 오디오 및 비디오(영문)
    • 증강 현실
    • 디자인
    • 배포
    • 교육
    • 서체(영문)
    • 게임
    • 건강 및 피트니스
    • 앱 내 구입
    • 현지화
    • 지도 및 위치
    • 머신 러닝 및 AI
    • 오픈 소스(영문)
    • 보안
    • Safari 및 웹(영문)
    메뉴 열기 메뉴 닫기
    • 문서(영문)
    • 튜토리얼
    • 다운로드
    • 포럼(영문)
    • 비디오
    메뉴 열기 메뉴 닫기
    • 지원 문서
    • 문의하기
    • 버그 보고
    • 시스템 상태(영문)
    메뉴 열기 메뉴 닫기
    • Apple Developer
    • App Store Connect
    • 인증서, 식별자 및 프로파일(영문)
    • 피드백 지원
    메뉴 열기 메뉴 닫기
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(영문)
    • Mini Apps Partner Program
    • News Partner Program(영문)
    • Video Partner Program(영문)
    • Security Bounty Program(영문)
    • Security Research Device Program(영문)
    메뉴 열기 메뉴 닫기
    • Apple과의 만남
    • Apple Developer Center
    • App Store 어워드(영문)
    • Apple 디자인 어워드
    • Apple Developer Academy(영문)
    • WWDC
    최신 뉴스 읽기.
    Apple Developer 앱 받기.
    Copyright © 2026 Apple Inc. 모든 권리 보유.
    약관 개인정보 처리방침 계약 및 지침