<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/InstructionsBuilder",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels19InstructionsBuilderV"
  },
  "title" : "InstructionsBuilder"
}
-->

# InstructionsBuilder

A type that represents an instructions builder.

```
@resultBuilder struct InstructionsBuilder
```

## Topics

### Building instructions

[`static func buildArray([some InstructionsRepresentable]) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildArray(_:))

Creates a builder with an array of instructions.

[`static func buildBlock<each I>(repeat each I) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildBlock(_:))

Creates a builder with a block.

[`static func buildEither(first: some InstructionsRepresentable) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildEither(first:))

Creates a builder with the first component.

[`static func buildEither(second: some InstructionsRepresentable) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildEither(second:))

Creates a builder with the second component.

[`static buildExpression(_:)`](/documentation/FoundationModels/InstructionsBuilder/buildExpression(_:))

Creates a builder with an instructions expression.

[`static func buildLimitedAvailability(some InstructionsRepresentable) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildLimitedAvailability(_:))

Creates a builder with limited availability instructions.

[`static func buildOptional(Instructions?) -> Instructions`](/documentation/FoundationModels/InstructionsBuilder/buildOptional(_:))

Creates a builder with an optional component.



---

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)