---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/PromptAssembledObservation.md
description: >-
  One observation of the fully-assembled request a battery is about to send TO
  the model, fired the instant assembly completes and BEFORE the engine/HTTP
  dispatch. It is the mirror of [`RawGenerationObservation`](https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/RawGenerationObservation): that seam
  exposes the raw text coming back FROM the model; this one exposes the raw
  request going TO it. Together they let you read ground truth at both ends of
  the wire — e.g. to settle whether a "smart quote" in a rendered answer came
  from the model itself or from a downstream markdown renderer, you inspect the
  bytes here, not the DOM.
---

# Interface: PromptAssembledObservation

Defined in: [src/batteries/llm/chat\_common/types.ts:399](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L399)

One observation of the fully-assembled request a battery is about to send TO the model, fired the
instant assembly completes and BEFORE the engine/HTTP dispatch. It is the mirror of
[RawGenerationObservation](RawGenerationObservation.md): that seam exposes the raw text coming back FROM the model; this one
exposes the raw request going TO it. Together they let you read ground truth at both ends of the wire —
e.g. to settle whether a "smart quote" in a rendered answer came from the model itself or from a
downstream markdown renderer, you inspect the bytes here, not the DOM.

## Remarks

This is a pure observability tap — it returns `void`, never mutates the request, and never throws into
the generation path (the adapter swallows callback errors). It fires once per terminal generation
(one per non-streamed turn; one per stream, at dispatch), across ALL five LLM batteries.

**Handed back AS-IS — no redaction.** The observation carries the request exactly as assembled. The ADK
does not scrub credentials, headers, or any other field for you: what you put on the request is what you
see here, and if you route this to a persistent sink (a log, `localStorage`, a file) you may persist
secrets that rode the request (an `apiKey`, `Authorization` header, etc.). That is your responsibility to
handle, not the battery's — the ADK surfaces the truth and lets you decide what to do with it. (In
practice the API batteries strip ADK-control keys like `apiKey` out of the wire body before this fires,
but that is incidental to how the body is built, not a guarantee.)

## Properties

| Property                                         | Type                                    | Description                                                                                                                                                                                                                                                                                                   | Defined in                                                                                                                                    |
| ------------------------------------------------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|  `battery`          | `string`                                | Which battery assembled this request (e.g. `'litert_lm'`, `'openai_chat_completions'`).                                                                                                                                                                                                                       | [src/batteries/llm/chat\_common/types.ts:401](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L401) |
|  `kind`                | `"rendered-prompt"` | `"request-body"` | The shape of the assembled request. `'rendered-prompt'` for the on-device batteries (transformers.js, LiteRT-LM), which render a preface string + a messages array for the engine; `'request-body'` for the API batteries (OpenAI-compatible, Ollama, WebLLM), which POST a JSON body.                        | [src/batteries/llm/chat\_common/types.ts:407](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L407) |
|  `messages`        | `unknown`                               | The per-turn messages exactly as handed to the engine (on-device) or placed on the wire (API): the engine's message array, or the request body's `messages`.                                                                                                                                                  | [src/batteries/llm/chat\_common/types.ts:418](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L418) |
|  `preface?`         | `unknown`                               | On-device leading/system content rendered ahead of the timeline (e.g. the LiteRT `preface` object, which carries the assembled system message text and — for native tool delivery — the tool list), when applicable. Its concrete shape is battery-specific; captured verbatim. Absent for the API batteries. | [src/batteries/llm/chat\_common/types.ts:413](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L413) |
|  `requestBody?` | `unknown`                               | API batteries only: the complete assembled request body, exactly as it will be sent (see the AS-IS / no-redaction note above). Absent for the on-device batteries.                                                                                                                                            | [src/batteries/llm/chat\_common/types.ts:428](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L428) |
|  `streamed`        | `boolean`                               | Whether this generation streams its response (vs. a single batch call).                                                                                                                                                                                                                                       | [src/batteries/llm/chat\_common/types.ts:430](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L430) |
|  `streamId`        | `string`                                | The adapter's stream/message id for this generation, for correlating with other telemetry.                                                                                                                                                                                                                    | [src/batteries/llm/chat\_common/types.ts:432](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L432) |
|  `tools?`             | `unknown`                               | The tool declarations exactly as dispatched: the rendered `<tool_definitions>` prompt text (on-device prompt-delivery) or the wire `tools` array (API / native tool delivery). Absent when no tools are sent.                                                                                                 | [src/batteries/llm/chat\_common/types.ts:423](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/types.ts#L423) |
