---
title: LanguageModelSession.Profile
framework: foundationmodels
role: symbol
role_heading: Structure
path: foundationmodels/languagemodelsession/profile
---

# LanguageModelSession.Profile

A profile that contains dynamic instructions.

## Declaration

```swift
struct Profile
```

## Mentioned in

Composing dynamic sessions with instructions and profiles

## Overview

Overview A profile binds DynamicInstructions to a set of session-level configuration values. The DynamicInstructions describes the content and tools and a LanguageModelSession.DynamicProfile orchestrates transitions betwen session configurations. Profile {     // Custom instructions and tools for a creative task. } .model(PrivateCloudComputeLanguageModel()) // Use a higher creative temperature value when a person likes poetry. .temperature(likesPoetry ? 0.8 : 0.1) // Perform deeper reasoning when a person likes astronomy. .reasoningLevel(likesAstronomy ? .deep : .light) A LanguageModelSession.Profile conforms to LanguageModelSession.DynamicProfile and includes all the same modifiers that you use to configure a unit of work to perform. Observe and react to key moments during a session by using life cycle modifiers. When a profile and a subprofile both register a callback, the framework calls both. The following shows observing onToolOutput(perform:) to handle logging after a tool provides output: Profile {     // Custom instructions and tools for the task. } .onToolOutput { toolCall, output in     // Runs after the tool to log any necessary activity. }

## Topics

### Creating a profile

- [init(_:)](foundationmodels/languagemodelsession/profile/init(_:).md)

## Relationships

### Conforms To

- [LanguageModelSession.DynamicProfile](foundationmodels/languagemodelsession/dynamicprofile.md)

## See Also

### Dynamic profiles

- [Composing dynamic sessions with instructions and profiles](foundationmodels/composing-dynamic-sessions-with-instructions-and-profiles.md)
- [Origami: Crafting a dynamic tutorial for Apple Intelligence](foundationmodels/origami-crafting-a-dynamic-tutorial-for-apple-intelligence.md)
- [DynamicInstructions](foundationmodels/dynamicinstructions.md)
- [LanguageModelSession.DynamicProfile](foundationmodels/languagemodelsession/dynamicprofile.md)
- [LanguageModelSession.DynamicProfileModifier](foundationmodels/languagemodelsession/dynamicprofilemodifier.md)
