---
title: "Route versions with Dynamic Profiles"
lesson_id: "03"
---

# Route versions with Dynamic Profiles

- **Lesson ID:** 03
- **Goal:** Load the live PromptRecord through DynamicInstructions and a DynamicProfile body that resolves to one Profile.
- **Human lesson:** [03-route-with-profiles.html](03-route-with-profiles.html)

## Prerequisites

- Lesson 02, or a registry with a live record.

## Inputs, outputs, and artifacts

- **Inputs:** A PromptRegistry.
- **Outputs:** A session that reads the live version.
- **Artifacts:** Progressive `.flow` diagrams and a profile sketch.

## Agent build steps

1. Name DynamicInstructions and LanguageModelSession.DynamicProfile.
2. Show body resolving to one Profile from the live record.
3. Mention the one-active-profile rule.
4. Mark the sketch as a sketch.

## Constraints

Keep the language simple, friendly, and literal. iOS 27 and macOS 27 only. No quizzes, Mermaid, or em dashes. Do not invent API names. Mark sketches as sketches and tell the reader to confirm them in the Xcode 27 SDK.

## Key concepts

- Conform a type to `DynamicInstructions` and another to `LanguageModelSession.DynamicProfile`.
- The Profile body must resolve to exactly one `Profile` and re-evaluates every prompt.
- Confirm protocol names in the Xcode 27 SDK.
- Put tools next to the instructions that need them.

## Takeaways

- The registry picks the text. The Dynamic Profile applies it on the next prompt.
- Grade new text in evals and measure TTFT before marking it live.
- Exactly one profile is active per request.

## Acceptance checks

- Both Apple types are named.
- One active profile is stated.
- Sibling links, progressive `.flow` diagrams, and an Agent brief link are present.
- [ ] Proceed to [lesson 04 brief](04-ab-and-rollback.llms.md).
