> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedynamite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Read /start/capabilities before choosing an integration. Use the deployed server’s tools/list for current tool inputs.

# The decision pipeline

> Trace validation, experiment assignment, eligibility, model questions, answer acceptance and browser rendering.

## 1. Establish runtime context

The runtime route validates a workspace UUID. A valid preview bearer resolves the authorized draft; a live request must match the workspace's exact origin and have an accessible published release. Server live records are cached briefly and invalidated on relevant writes.

The decision body names the logical site ID, revision and page ID. A mismatched site/revision returns conflict. Simulated time is rejected for live requests. The submitted profile is normalized against configured resources, event kinds, timestamps, expiry and bounds.

## 2. Remove unsupported claims

Live decisions remove demo reader/identity context and browser-claimed purchases. Signed enrichment is accepted only when its workspace/site/visitor binding and expiry verify. Retention-derived context is additionally subject to its current enabled/readiness/expiry checks.

The summary contains bounded product exploration, decayed interests, attention and appropriate declared/connected context. The model receives chosen context, not unrestricted browser storage or an arbitrary document archive. Authoring memory is not retrieved into this live call.

## 3. Build eligible slots

Only the current registered page's targets become ordinary slots. The server applies explicit eligibility requirements. A visitor-owned native control is restricted so the application does not override the visitor. Component HTML is reduced to choice-oriented content. Audience names and `when` strings become descriptive guidance; they are not silently upgraded into hard gates.

Editorial reader ranking can add bounded story-choice slots and resolve selections against a catalog. Specialized identity/quiz preview paths have their own behavior; do not assume every request is the standard production path.

## 4. Assign and call

The standard service configures:

| Setting | Value / source |
| - | - |
| `policyId` | Site revision |
| `evaluationId` | Live experiment salt |
| `deadlineMs` | 1,500 |
| `minConfidence` | 0.2 |
| `holdoutFraction` | Current experiment holdout; 1 when paused |
| `allowUnsegmentedSignals` | true |

The browser skips calls for holdout/off groups; the server enforces assignment as well. A provider request includes only questions with more than one eligible choice. Single-option slots do not require inference.

Provider configuration chooses direct TypeSafe Jev or Vercel Gateway based on `DYNAMITE_DECISION_MODEL` and available server credentials. Direct TypeSafe can use the configured/pinned model. The transport implementations own their protocol and bounded retry behavior; callers share the overall deadline. No credential is returned to the browser.

## 5. Validate answers

The adaptive core requires a known choice ID, a finite confidence in \[0,1], probabilities for exactly the eligible IDs, finite probabilities in \[0,1], a total within 0.01 of 1, and the chosen option to have maximal probability. Confidence must pass the configured threshold.

Each slot records `selected`, `single_option`, `invalid_answer`, `low_confidence`, `control`, `unknown_persona`, `timeout` or `provider_error` as appropriate. Invalid/low-confidence answers use the declared default. Whole-call failures fall back across slots. Confidence is not an estimated conversion rate.

## 6. Record and return

The service records server decision timing, outcome, model/provider calls and billed usage for measurement. The returned receipt carries the page/revision, selections, summary and optional editorial data; usage is omitted from the public receipt. Live visitor sampling is separate and must not interrupt selection.

## 7. Revalidate in the browser

The browser checks generation, visitor identity, current path, deadline, interaction state, receipt revision/page and locally allowed IDs. It then asks the relevant adapter to apply the choice. Missing/disconnected DOM, a seen native list or visitor-owned control may keep the original. The applied/exposure events describe what actually rendered, not merely what the model requested.

## The adaptive library is a separate integration

`createAdaptiveRuntime` can also run in a host application's server renderer with a manifest of typed values and a custom persona fetcher. The generic library defaults differ from the service overrides: its default deadline is 800 ms, confidence 0.3 and holdout 0.1. Your application owns rendering, identity, persistence and verified attribution.

`createFunnelRuntime` adds a flow pass that classifies blocks into lead/early/support/omit, assembles bounded order with pinned endpoints, then chooses content only for included blocks using remaining time. It is not the installed DOM order adapter. The caller owns flow rendering and outcome analysis.

Source: [service](https://github.com/ion-design/dynamite/blob/main/packages/personalization-server/src/decision.server.ts), [core](https://github.com/ion-design/dynamite/blob/main/packages/adaptive/src/runtime.ts), [compiler](https://github.com/ion-design/dynamite/blob/main/packages/adaptive/src/compiler.ts), [provider selection](https://github.com/ion-design/dynamite/blob/main/packages/personalization-server/src/decision-models.server.ts), [browser runner](https://github.com/ion-design/dynamite/blob/main/packages/adaptive/src/browser/runtime-decisions.ts), [funnel runtime](https://github.com/ion-design/dynamite/blob/main/packages/adaptive/src/funnel-runtime.ts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.