<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/IntentPrediction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents16IntentPredictionV"
  },
  "title" : "IntentPrediction"
}
-->

# IntentPrediction

A prediction for an app intent that the system might display to someone when it’s relevant.

```
struct IntentPrediction<Intent, T> where Intent : AppIntent
```

## Overview

Use the `IntentPrediction` type to provide a description of your app intent that the
system can use when offering proactive suggestions. You create this type from the
[`predictionConfiguration`](/documentation/AppIntents/PredictableIntent/predictionConfiguration) property of your app intent. Use the
type to provide a [`DisplayRepresentation`](/documentation/AppIntents/DisplayRepresentation) structure with a suitable description
of your app intent’s purpose.

The following example shows an implementation of the [`predictionConfiguration`](/documentation/AppIntents/PredictableIntent/predictionConfiguration)
property that creates an `IntentPrediction` type. During creation of the type, the
code passes the app intent’s `name` property to the `IntentPrediction` initializer,
and maps it to the `name` parameter in the closure. The description incorporates this
value in the text it provides.

```
struct CreateBook: AppIntent, PredictableIntent {
    @Parameter(title: "Book Name")
    var name: String?

    @Parameter(title: "Author", query: AuthorQuery.self)
    var author: AuthorEntity?

    static var predictionConfiguration: some IntentPredictionConfiguration {
        IntentPrediction(parameters: (\Self.$name)) { name in
            DisplayRepresentation(
                title: "Create a book named \(name)"
            )
        }
    }

    @MainActor
    func perform() async throws -> IntentResult<BookEntity> {
        ...
    }
}
```

## Topics

### Creating a prediction

[`init(displayRepresentation: () -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(displayRepresentation:))

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-1zdkp)

[`init<V0, V1, V2, V3, V4, V5, P0, P1, P2, P3, P4, P5, K0, K1, K2, K3, K4, K5>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-2ct6i)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K14>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-2lf5t)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13, K14>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-2lf5t)

[`init<V0, V1, P0, P1, K0, K1>(parameters: T, displayRepresentation: (V0, V1) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-39wfu)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-3wlt7)

[`init<V0, P0>(parameters: T, displayRepresentation: (V0) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-5f3e3)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-620xt)

[`init<V0, V1, V2, V3, V4, P0, P1, P2, P3, P4, K0, K1, K2, K3, K4>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-6i80a)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, P0, P1, P2, P3, P4, P5, P6, P7, K0, K1, K2, K3, K4, K5, K6, K7>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-781f1)

[`init<V0, V1, V2, P0, P1, P2, K0, K1, K2>(parameters: T, displayRepresentation: (V0, V1, V2) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-8b851)

[`init<V0, V1, V2, V3, V4, V5, V6, P0, P1, P2, P3, P4, P5, P6, K0, K1, K2, K3, K4, K5, K6>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-9ibp3)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, P0, P1, P2, P3, P4, P5, P6, P7, P8, K0, K1, K2, K3, K4, K5, K6, K7, K8>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-alik)

### Initializers

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-1uup3)

[`init<V0, V1, V2, V3, P0, P1, P2, P3, K0, K1, K2, K3>(parameters: T, displayRepresentation: (V0, V1, V2, V3) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-n8dp)

[`init<V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, K0, K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, K11, K12, K13>(parameters: T, displayRepresentation: (V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13) -> DisplayRepresentation)`](/documentation/AppIntents/IntentPrediction/init(parameters:displayRepresentation:)-te8o)

## Relationships

### Conforms To

[`IntentPredictionConfiguration`](/documentation/AppIntents/IntentPredictionConfiguration)

---

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)