<!--
{
  "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/AppIntent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentP"
  },
  "title" : "AppIntent"
}
-->

# AppIntent

An interface you use to express app-specific actions and make them available to
the rest of the system.

```
protocol AppIntent : PersistentlyIdentifiable, _SupportsAppDependencies, Sendable
```

## Overview

The [`AppIntent`](/documentation/AppIntents/AppIntent) protocol defines the interface you use to make your app’s actions
discoverable by Apple Intelligence and Siri, the Shortcuts app, and other system experiences. This protocol
defines the common features that help the system identify your app’s actions and access
basic information about them. Implement this protocol in all your app intents, and
supplement it with other protocols as needed to support specific types of actions.

Implement this protocol in a new type or existing type in your app, app extension, framework,
or Swift package. In your type, use the [`perform()`](/documentation/AppIntents/AppIntent/perform()) method to perform the action
and return a result back to the system. If you require input from the person performing
the action, add one or more variables to your type and apply the `@Parameter` property wrapper
to each. For example, an app intent to start a workout might require the person to specify
which workout they want. Before calling your [`perform()`](/documentation/AppIntents/AppIntent/perform()) method, the system
resolves any parameters with this wrapper by inferring values from the current conversation
or by asking someone explicitly to provide the value. If your app intent requires
app-specific data to perform its action, apply the `@Dependency` property wrapper
to any variables with that data.

In addition to performing an action, an app intent provides information about the action
itself. Implement the [`title`](/documentation/AppIntents/AppIntent/title) and [`description`](/documentation/AppIntents/AppIntent/description) properties and set
them to localized strings describing your action. If your app intent has parameters, fill
in the [`parameterSummary`](/documentation/AppIntents/AppIntent/parameterSummary) property with a description of the action and
parameters together. The system uses this information during conversations or when
displaying information about your intent.

The following example shows an app intent for ordering an album of music. The intent
requires the person to specify the album name at order time. The intent also uses an
internal album manager type to locate albums by name and initiate the purchase.

```swift
struct OrderAlbum: AppIntent {
    static var title: LocalizedStringResource { "Order Album" }
    static var description = IntentDescription("Order a vinyl record album.")

    @Parameter(title: "Album", description: "The name of the album to order.")
    var albumName: String

   @Dependency
    private var albumManager: AlbumDataManager

    func perform() async throws -> some IntentResult {
        // Perform the action...
        return .result()
    }

    static var parameterSummary: some ParameterSummary {
        Summary("Order \(\.$albumName)")
    }
}
```

In addition to this protocol, you can define intents that support common actions. System-defined
schemas define the requirements needed to support common actions, including the app
intent protocol your type needs to adopt and any parameters it needs to define. For example, the
`AssistantSchemas.PhotosIntent.openAlbum` intent requires conformance to the
[`OpenIntent`](/documentation/AppIntents/OpenIntent) protocol and a property with an [`AppEntity`](/documentation/AppIntents/AppEntity) type for the photo album.
For information about the available schemas, see [App schema domains](/documentation/AppIntents/app-schema-domains).

For additional app intent protocols you can adopt in your app, see [App intent types](/documentation/AppIntents/app-intent-types).
For information on how to create an app intent, see [Creating your first app intent](/documentation/AppIntents/Creating-your-first-app-intent).

## Topics

### Creating an app intent

[`init()`](/documentation/AppIntents/AppIntent/init())

Creates and returns the app intent.

### Specifying the authentication policy

[`authenticationPolicy`](/documentation/AppIntents/AppIntent/authenticationPolicy)

The authentication policy to enforce when running the app intent.

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

The authentication policies you can apply to an app intent when it runs.

### Specifying the intent’s allowed target

[`allowedExecutionTargets`](/documentation/AppIntents/AppIntent/allowedExecutionTargets)

The list of targets this intent can be executed against.

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

A set of options that describes which process performs an intent or entity query.

[`AppIntent.ExecutionTargets`](/documentation/AppIntents/AppIntent/ExecutionTargets)

### Configuring the metadata

[`title`](/documentation/AppIntents/AppIntent/title)

A short, localized, human-readable string that conveys the app intent’s action.

[`description`](/documentation/AppIntents/AppIntent/description)

A localized string that describes what the app intent does.

[`isDiscoverable`](/documentation/AppIntents/AppIntent/isDiscoverable)

A Boolean value that indicates whether system features can discover this app intent.

### Performing the action

[`perform()`](/documentation/AppIntents/AppIntent/perform())

Performs the intent’s action and returns a result, after resolving any parameters.

[`systemContext`](/documentation/AppIntents/AppIntent/systemContext)

Contextual information that the system provides while it performs the app intent.

[`PerformResult`](/documentation/AppIntents/AppIntent/PerformResult)

### Running in the foreground or background

[`supportedModes`](/documentation/AppIntents/AppIntent/supportedModes)

The foreground and background modes the app intent supports.

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

A set of options you use to configure the runtime behavior of an app intent.

[`continueInForeground(_:alwaysConfirm:)`](/documentation/AppIntents/AppIntent/continueInForeground(_:alwaysConfirm:))

Attempts to transition the app to the foreground after optionally requesting permission to do so.

[`needsToContinueInForegroundError(_:alwaysConfirm:)`](/documentation/AppIntents/AppIntent/needsToContinueInForegroundError(_:alwaysConfirm:))

Asks the person to continue the intent’s action in the foreground.

### Requesting more information

[`requestChoice(between:dialog:)`](/documentation/AppIntents/AppIntent/requestChoice(between:dialog:))

Pauses the app intent and asks the person to choose an option from the specified list.

[`requestChoice(between:dialog:content:)`](/documentation/AppIntents/AppIntent/requestChoice(between:dialog:content:))

Pauses the app intent, asks the person to choose from the specified options, and
provides additional content related to those options.

[`requestChoice(between:dialog:view:)`](/documentation/AppIntents/AppIntent/requestChoice(between:dialog:view:))

Pauses the app intent, asks the person to choose from the specified options, and provides
a view with additional data.

### Requesting confirmation

[`requestConfirmation()`](/documentation/AppIntents/AppIntent/requestConfirmation())

Displays a prompt that asks the person for confirmation before performing the app intent.

[`requestConfirmation(conditions:actionName:dialog:)`](/documentation/AppIntents/AppIntent/requestConfirmation(conditions:actionName:dialog:))

Displays a confirmation prompt that includes the specified text and action details.

[`requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:content:)`](/documentation/AppIntents/AppIntent/requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:content:))

Displays a confirmation prompt with an interactive snippet.

[`requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)`](/documentation/AppIntents/AppIntent/requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)-3vewj)

Displays a confirmation prompt that includes an interactive snippet.

[`requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)`](/documentation/AppIntents/AppIntent/requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)-jxb8)

Displays a confirmation prompt with an interactive snippet.

### Donating the intent to the system

[`donate()`](/documentation/AppIntents/AppIntent/donate()-1e60c)

Donates the app intent to the system asynchronously.

[`donate()`](/documentation/AppIntents/AppIntent/donate()-jp6k)

Donates the app intent to the system.

[`donate(result:)`](/documentation/AppIntents/AppIntent/donate(result:)-36cia)

Donates the app intent and a result to the system asynchronously.

[`donate(result:)`](/documentation/AppIntents/AppIntent/donate(result:)-9b25i)

Donates the app intent and a result to the system asynchronously.

[`callAsFunction(donate:)`](/documentation/AppIntents/AppIntent/callAsFunction(donate:)-3qvbt)

Runs the intent’s action after resolving any parameters, returns the resulting value,
and optionally donates the intent to the system.

[`callAsFunction(donate:)`](/documentation/AppIntents/AppIntent/callAsFunction(donate:)-7v1om)

Runs the intent’s action after resolving any parameters, and optionally donates the
intent to the system.

### Summarizing the parameters

[`SummaryContent`](/documentation/AppIntents/AppIntent/SummaryContent)

The type of parameter summary representing this intent.

[`parameterSummary`](/documentation/AppIntents/AppIntent/parameterSummary)

The parameter summary the Shortcuts app uses to generate shortcuts for this intent.

[`parameterSummary`](/documentation/AppIntents/AppIntent/parameterSummary-4vgic)

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

A result builder that allows you to declaratively describe a parameter summary.

[`AppIntent.Parameter`](/documentation/AppIntents/AppIntent/Parameter)

[`AppIntent.Case`](/documentation/AppIntents/AppIntent/Case)

[`AppIntent.DefaultCase`](/documentation/AppIntents/AppIntent/DefaultCase)

[`AppIntent.Summary`](/documentation/AppIntents/AppIntent/Summary)

[`AppIntent.Switch`](/documentation/AppIntents/AppIntent/Switch)

[`AppIntent.When`](/documentation/AppIntents/AppIntent/When)

[`AppIntent.Option`](/documentation/AppIntents/AppIntent/Option)

A convenience type alias that represents a choice option within the scope of an app intent.

### Deprecated

[`openAppWhenRun`](/documentation/AppIntents/AppIntent/openAppWhenRun)

A Boolean property that tells the system to consider the app intent even
if its app is not in the foreground.

[`requestConfirmation(result:confirmationActionName:showPrompt:)`](/documentation/AppIntents/AppIntent/requestConfirmation(result:confirmationActionName:showPrompt:))

Requests user confirmation before performing the app intent.

[`requestConfirmation(output:confirmationActionName:showPrompt:)`](/documentation/AppIntents/AppIntent/requestConfirmation(output:confirmationActionName:showPrompt:))



---

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)