<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppEntity(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6EntityyyAA0aC6TraitsVcfm"
  },
  "title" : "AppEntity(_:)"
}
-->

# AppEntity(_:)

Marks a transient entity whose values the model can generate on its own.

```
@attached(extension, conformances: GenerableEntity) macro AppEntity(_ traits: AppEntityTraits)
```

## Parameters

`traits`

The entity’s roles, such as `.generable` or `[.generable]`.

## Overview

Apply this macro to a structure or class that conforms to
[`TransientAppEntity`](/documentation/AppIntents/TransientAppEntity). It adds a [`GenerableEntity`](/documentation/AppIntents/GenerableEntity) conformance, using the
availability declared on the type, or the availability of `GenerableEntity`
when the type declares none.

```swift
@AppEntity(.generable)
struct FlightSearch: TransientAppEntity { ... }
```

---

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)