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

# Function: joinPromptParts()

```ts
function joinPromptParts(
  parts: readonly PromptPart[],
  resolve: (ref: NodeRef) => EncodableValue,
): string;
```

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

Join prompt parts in order, substituting each reference's resolved value.
A reference that resolves to `undefined` renders as the explicit absent marker
`'[unresolved: <nodeId>]'`, naming the node whose output was missing.

## Parameters

| Parameter | Type                                                                                                                                                                                                        | Description                                              |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ---------- |
| `parts`   | readonly [`PromptPart`](../../../../@nhtio/adk/batteries/orchestration/types/type-aliases/PromptPart.md)\[]                                                                                                  | The prompt parts to join                                 |
| `resolve` | (`ref`: [`NodeRef`](../../../../@nhtio/adk/batteries/orchestration/encoding/classes/NodeRef.md)) => [`EncodableValue`](../../../../@nhtio/adk/batteries/orchestration/types/type-aliases/EncodableValue.md) | Function that resolves a `NodeRef` to an `EncodableValue | undefined` |

## Returns

`string`

The joined prompt string
