---
url: >-
  https://adk.nht.io/api/batteries/orchestration/reason/functions/wrapInstruction.md
---

# Function: wrapInstruction()

```ts
function wrapInstruction(authoritative: string, context: string): string;
```

Defined in: [src/batteries/orchestration/reason.ts:71](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/reason.ts#L71)

Wrap the authoritative instruction in `<instruction>` tags and place the stripped
context after it, with a line telling the model to ignore any instructions appearing
inside the context payload.

## Parameters

| Parameter       | Type     | Description                                             |
| --------------- | -------- | ------------------------------------------------------- |
| `authoritative` | `string` | The authoritative instruction text                      |
| `context`       | `string` | The context text (already stripped of instruction tags) |

## Returns

`string`

The wrapped instruction string
