---
title: IntentPrediction
framework: appintents
role: symbol
role_heading: Structure
path: appintents/intentprediction
---

# IntentPrediction

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

## Declaration

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

## Overview

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 property of your app intent. Use the type to provide a DisplayRepresentation structure with a suitable description of your app intent’s purpose. The following example shows an implementation of the 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:)](appintents/intentprediction/init(displayrepresentation:).md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-1zdkp.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-2ct6i.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-2lf5t.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-2lf5t.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-39wfu.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-3wlt7.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-5f3e3.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-620xt.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-6i80a.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-781f1.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-8b851.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-9ibp3.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-alik.md)

### Initializers

- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-1uup3.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-n8dp.md)
- [init(parameters:displayRepresentation:)](appintents/intentprediction/init(parameters:displayrepresentation:)-te8o.md)

## Relationships

### Conforms To

- [IntentPredictionConfiguration](appintents/intentpredictionconfiguration.md)

## See Also

### Add-on behaviors

- [UndoableIntent](appintents/undoableintent.md)
- [CancellableIntent](appintents/cancellableintent.md)
- [LongRunningIntent](appintents/longrunningintent.md)
- [PredictableIntent](appintents/predictableintent.md)
