<!--
{
  "availability" : [
    "*: -",
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AssistantSchemas/BooksEntity/book",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents16AssistantSchemasO11BooksEntityPAAE4bookQrvp"
  },
  "title" : "book"
}
-->

# book

The app entity describes an ebook.

```
var book: some AssistantSchemas.Entity { get }
```

## Overview

Use Swift macros that generate additional properties and add protocol conformance
for your app entity implementation. The following example shows an app entity that conforms to the `.books.book` schema:

```swift
@AppEntity(schema: .books.book)
struct BookEntity: AppEntity {
    struct Query: EntityStringQuery {
        func entities(for identifiers: [BookEntity.ID]) async throws -> [BookEntity] { [] }
        func entities(matching string: String) async throws -> [BookEntity] { [] }
    }

    static var defaultQuery = Query()
    var displayRepresentation: DisplayRepresentation { "Book" }

    let id = UUID()

    @Property
    var title: String?

    @Property
    var seriesTitle: String?

    @Property
    var author: String?

    @Property
    var genre: String?

    @Property
    var purchaseDate: Date?

    @Property
    var contentType: BookContentType?
}
```

For more information about the `.books` app intent domain,
see [Books](/documentation/AppIntents/app-schema-domain-books).
For general information about app intent domains, see [Making actions and content discoverable by Apple Intelligence](/documentation/AppIntents/making-actions-and-content-discoverable-by-apple-intelligence).

---

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)