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

# Function: decodeOutputSchema()

```ts
function decodeOutputSchema(encoded: string): Schema;
```

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

Decode a `ReasonNodeDefinition.outputSchema` — which is stored as an ENCODED STRING,
not a live `Schema`. A live validation schema is **not** `Encodable` — encoding one
throws `E_UNENCODABLE_VALUE: Value of type symbol (Symbol(override)) is not encodable`,
which would make the whole plan unpersistable. This has been verified against the real
packages. `Tool` solves the same problem the same way at `src/lib/classes/tool.ts:449-490`.

## Parameters

| Parameter | Type     | Description               |
| --------- | -------- | ------------------------- |
| `encoded` | `string` | The encoded schema string |

## Returns

`Schema`

The decoded `Schema` object
