View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

Back to WWDC26

  • About
  • Summary
  • Debug and profile agentic app experiences with Instruments

    Explore the enhanced FoundationModels instrument in Xcode to inspect behavior and optimize the performance of agentic flows. Learn how to inspect prompts, analyze latency, and trace control flow in advanced use cases that leverage multiple LanguageModelSessions and profiles.

    Chapters

    • 0:00 - Introduction
    • 1:57 - LLM app development mindset
    • 3:59 - Inspect and diagnose an agentic experience
    • 5:02 - Recording a trace with Instruments
    • 6:04 - Navigating the Instruments UI
    • 12:07 - Performance metrics
    • 13:04 - Next steps

    Resources

    • Analyzing the runtime performance of your Foundation Models app
      • HD Video
      • SD Video

    Related Videos

    WWDC26

    • Bring an LLM provider to the Foundation Models framework
    • Build agentic app experiences with the Foundation Models framework
    • Build AI-powered scripts with the fm CLI and Python SDK
    • Build with the new Apple Foundation Model on Private Cloud Compute
    • What’s new in the Foundation Models framework
  • Search this video…
    • 0:00 - Introduction
    • Overview of how the Foundation Models Instruments template helps debug and profile agentic app experiences built with the Foundation Models framework, including Dynamic Instructions and tool call loops.

    • 1:57 - LLM app development mindset
    • The three challenges unique to LLM app development: probabilistic output (non-deterministic responses that break standard unit testing), model-to-model communication (coordinating data flow across multiple models), and observability (knowing where things went wrong in a multi-model pipeline).

    • 3:59 - Inspect and diagnose an agentic experience
    • Introduction to the craft companion demo app — a journaling app with an interactive brainstorming feature that uses two sets of Dynamic Instructions: one for idea generation and one for tutorial creation, both backed by the server model on Private Cloud Compute.

    • 5:02 - Recording a trace with Instruments
    • How to start profiling with the Foundation Models template in Instruments — selecting the template, recording a session, and an important note about sensitive prompt data in trace files.

    • 6:04 - Navigating the Instruments UI
    • A walkthrough of the Foundation Models instrument layout: tracks and lanes on the timeline (including the instructions lane and model inference lane with yellow/orange bars), the detail view, and the inspector — and how to use the tree view to inspect sessions, requests, inferences, and tool calls.

    • 12:07 - Performance metrics
    • How to measure and optimize LLM experience performance using three key metrics: time-to-first-token (reduce by shortening prompts), tokens-per-second (benchmark across configurations), and total latency (reduce perceived wait with streaming).

    • 13:04 - Next steps
    • Summary of what was covered, requirements to get started (Xcode 27 and latest OS), and pointers to related sessions on the Evaluations Framework and Agentic App Experiences.

Developer Footer

  • Videos
  • WWDC26
  • Debug and profile agentic app experiences with Instruments
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • 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
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines