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

# Vercel AI SDK 7

> How Harmonia uses AI SDK 7 for bounded, server-hydrated generative operator surfaces.

Harmonia pins `ai` 7.0.97 and `@ai-sdk/react` 4.0.100. Typed `UIMessage` data parts represent generative layouts without granting the presenter authority over workflow data or actions.

## How Harmonia uses it

Maya receives a typed catalog of allowed entities and returns a reference-only `SurfacePlan`. Python and TypeScript validators require every component and entity reference to exist in the supplied context. The server hydrates those references from authenticated DynamoDB records into `data-harmonia-surface` parts. Harmonia's React renderer maps only the validated vocabulary to the existing visual system.

Supported campaign components include job progress, source evidence, moment exploration, draft comparison, platform preview, approval review, and verification receipts. Loading, empty, unresolved, and failure components remain host-owned.

## Security and authority

Maya cannot emit draft text, transcript content, receipt values, approval state, executable handlers, or arbitrary URLs. An approval component is valid only for the supplied pending action and approval slot. User actions still enter deterministic decision endpoints.

## Failure behavior

Unknown components, invented references, invalid slots, duplicate entities, or context-digest mismatches fail the presentation run. The host does not convert protocol errors into generic success screens.

## Evidence status

Schema parity, validation, hydration, replay, and rendering behavior have automated local coverage. Authenticated managed Maya execution requires separate AgentCore Runtime evidence.

## Relevant files

* `agent/harmonia_agent/ui_models.py`
* `agent/harmonia_agent/maya_prompt.py`
* `src/lib/ai-sdk/`
* `src/components/studio/`
* `docs/ai-sdk-console.mdx`
