---
url: >-
  https://adk.nht.io/api/@nhtio/adk/types/type-aliases/DispatchRetrievableBytesStoreFn.md
description: >-
  Persists extracted retrievable text bytes into consumer storage and returns a
  {@link @nhtio/adk!SpoolReader} (LLM execution context variant). The handler
  wraps the reader in a {@link @nhtio/adk!SpooledArtifact} for `new
  Retrievable({ content })` and persists the record via `storeRetrievable`
  separately. Returns a value; does NOT touch the turn Sets.
---

# Type Alias: DispatchRetrievableBytesStoreFn

```ts
type DispatchRetrievableBytesStoreFn = (
  ctx: DispatchContext,
  id: string,
  bytes: ConduitBytes,
) => SpoolReader | Promise<SpoolReader>;
```

Defined in: [lib/contracts/dispatch\_context.ts:152](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/contracts/dispatch_context.ts#L152)

Persists extracted retrievable text bytes into consumer storage and returns a
[@nhtio/adk!SpoolReader](../../spooled_artifact/interfaces/SpoolReader.md) (LLM execution context variant). The handler wraps the reader in a
[@nhtio/adk!SpooledArtifact](../../spooled_artifact/classes/SpooledArtifact.md) for `new Retrievable({ content })` and persists the record via
`storeRetrievable` separately. Returns a value; does NOT touch the turn Sets.

## Parameters

| Parameter | Type                                                  |
| --------- | ----------------------------------------------------- |
| `ctx`     | [`DispatchContext`](../interfaces/DispatchContext.md) |
| `id`      | `string`                                              |
| `bytes`   | [`ConduitBytes`](ConduitBytes.md)                     |

## Returns

| [`SpoolReader`](../../spooled_artifact/interfaces/SpoolReader.md)
| `Promise`<[`SpoolReader`](../../spooled_artifact/interfaces/SpoolReader.md)>
