<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/LanguageModelSession/Profile",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels20LanguageModelSessionC7ProfileV"
  },
  "title" : "LanguageModelSession.Profile"
}
-->

# LanguageModelSession.Profile

A profile that contains dynamic instructions.

```
struct Profile
```

## Overview

A profile binds [`DynamicInstructions`](/documentation/FoundationModels/DynamicInstructions) to a set of session-level configuration
values. The [`DynamicInstructions`](/documentation/FoundationModels/DynamicInstructions) describes the content and tools and a
[`LanguageModelSession.DynamicProfile`](/documentation/FoundationModels/LanguageModelSession/DynamicProfile) orchestrates transitions betwen session configurations.

```swift
Profile {
    // Custom instructions and tools for a creative task.
}
// 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`](/documentation/FoundationModels/LanguageModelSession/Profile) conforms to [`LanguageModelSession.DynamicProfile`](/documentation/FoundationModels/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:)`](/documentation/FoundationModels/LanguageModelSession/DynamicProfile/onToolOutput(perform:)) to handle logging after
a tool provides output:

```swift
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(_:)`](/documentation/FoundationModels/LanguageModelSession/Profile/init(_:))

Creates a profile that contains dynamic instructions.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)