---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/artifacts/functions/registerArtifactEncodables.md
---

# Function: registerArtifactEncodables()

```ts
function registerArtifactEncodables(): Promise<void>;
```

Defined in: [src/batteries/artifacts/index.ts:40](https://github.com/NHTIO/ADK/blob/v1.20260907.0/src/src/batteries/artifacts/index.ts#L40)

Registers the four artifact classes with the '@nhtio/encoder' decoder.

## Returns

`Promise`<`void`>

A promise that resolves when registration is complete.

## Remarks

This function must be called once before decoding artifact instances that were
previously encoded. It is idempotent and safe to call multiple times. Consumers
who need both core primitives and artifacts typically call
`registerAdkEncodables()` (from the encoding battery) followed by this function.

## Throws

If '@nhtio/encoder' is not available or registration fails.

## Example

```ts
import { registerArtifactEncodables } from "@nhtio/adk/batteries/artifacts";
await registerArtifactEncodables();
```
