<!--
{
  "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(_:schema:)",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6Entity_6schemayAA0aC6TraitsV_xtcAA0a6SchemaC0Rzlufm"
  },
  "title" : "AppEntity(_:schema:)"
}
-->

# AppEntity(_:schema:)

Marks a transient entity that conforms to a schema as one whose values the
model can generate on its own.

```
@attached(memberAttribute) @attached(extension, conformances: GenerableEntity, AppEntity, AssistantSchemaEntity, FileEntity, UniqueAppEntity, URLRepresentableEntity, names: named(__appSchemaEntity)) macro AppEntity<T>(_ traits: AppEntityTraits, schema: T) where T : AppSchemaEntity
```

## Parameters

`traits`

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

`schema`

The schema the entity conforms to.

## Overview

Use this macro in place of `@AppEntity(schema:)`. It adds everything
`@AppEntity(schema:)` adds, plus a [`GenerableEntity`](/documentation/AppIntents/GenerableEntity) conformance.

---

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)