> Documentation index for agents: https://docs.rocketride.ai/llms.txt

# answer_documents

A RocketRide adapter node that turns answers into embeddable documents while
preserving the answers lane. Pick it after a model or agent when its answers
need to be indexed for later retrieval rather than only sent to a response.

## What it does

The node reads `answers` and emits one or more documents on `documents`; the
original answer continues on `answers`. A JSON array produces one document for
each item, while a JSON object or non-empty plain-text answer produces one
document. Use it to bridge an answer-producing node to an embedding and store
pipeline, particularly when each item in a structured answer should be
retrievable independently.

Documents are made only when a downstream listener consumes `documents`. Empty
or whitespace text and JSON `null` produce no documents, while a malformed
JSON answer falls back to its non-empty text representation.

## Lanes

| Lane in | Lane out | Description |
| --- | --- | --- |
| `answers` | `documents` | Emit one document for each answer item when a downstream listener needs documents. |
| `answers` | `answers` | Keep the original answer available to downstream answer consumers. |

## Configuration

This node has no configuration fields. Wire an answer-producing node into
`answers`, connect `documents` to an embedding or storage path when indexing is
needed, and retain the `answers` path when the same result must still be served
in the current run.

## Notes

### Document content and metadata

String items in a JSON array become `page_content` verbatim; object and other
non-string items are JSON-serialized with non-ASCII characters preserved. Each
emitted document has a `chunkId` that starts at zero for each input object, and
is marked as non-table, active text content. Its remaining provenance metadata
is populated from the pipeline context.

### Fan-out behavior

The node writes documents only if a `documents` listener exists. It does not
call a replacement writer for the `answers` lane, so the engine's normal answer
forwarding keeps the exact original answer for downstream consumers.

<!-- ROCKETRIDE:GENERATED:PARAMS START -->
<!-- Generated by nodes:docs-generate. Do not edit by hand. -->

## Schema

_No configuration fields._

## Source

[<svg viewBox="0 0 16 16" width="15" height="15" fill="currentColor" aria-hidden="true" style="vertical-align:-0.15em;margin-right:0.35em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> View source](https://github.com/rocketride-org/rocketride-server/tree/develop/nodes/src/nodes/answer_documents)
<!-- ROCKETRIDE:GENERATED:PARAMS END -->
