# Assistant Frame
URL: /docs/api-reference/transport/frame

Frame bridge APIs and serialized message types for embedding assistant-ui runtimes in external contexts.

{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}

{/* Do not edit manually. */}

{/* api-reference:start */}

{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}

{/* Do not edit this block manually. */}

## API Reference \[#api-reference]

### AssistantFrameHost \[#assistantframehost]

<ParametersTable />

### AssistantFrameProvider \[#assistantframeprovider]

<ParametersTable />

### FRAME\_MESSAGE\_CHANNEL \[#frame\_message\_channel]

```ts
const FRAME_MESSAGE_CHANNEL: "assistant-ui-frame";
```

### FrameMessage \[#framemessage]

<ParametersTable />

### SerializedModelContext \[#serializedmodelcontext]

<ParametersTable />

### SerializedTool \[#serializedtool]

<ParametersTable />

### useAssistantFrameHost \[#useassistantframehost]

React hook that manages the lifecycle of an AssistantFrameHost and its binding to the current AssistantRuntime.

Usage example:

```typescript
function MyComponent() {
  const iframeRef = useRef<HTMLIFrameElement>(null);

  useAssistantFrameHost({
    iframeRef,
    targetOrigin: "https://trusted-domain.com", // optional
  });

  return <iframe ref={iframeRef} src="..." />;
}
```

<ParametersTable />

{/* api-reference:end */}
