Reference

API Reference

Complete reference for all exported APIs

Components

IntentCtrlProvider

The root provider component. Must wrap any component that uses IntentCtrl hooks.

Prop

Type


Hooks

useIntentCtrl

Returns the full chat interface. Throws if used outside IntentCtrlProvider.

Prop

Type

useTool

Registers a custom tool for the AI to call. The tool is available while the component is mounted.

Prop

Type

usePermissions

Reads and updates the current permission state reactively.

Prop

Type

useDataContext

Injects contextual data that is sent with every chat request. Data is cleaned up when the component unmounts.

Prop

Type


Functions

setRouter

Registers a client-side router for the navigate tool.

Prop

Type


Types

RuntimePermissions

Controls which built-in tools are available to the AI.

Prop

Type

  • undefined — allowed, approval may be required
  • true — allowed, bypasses approval
  • false — denied

SerializedTool

A tool definition serialized for transport.

Prop

Type

ChatRequest

The payload sent to your backend with every user message.

Prop

Type

SessionState

Prop

Type

PaginatedChatSessionsResponse

Prop

Type

ChatSessionResponse

Prop

Type

ApiResponse

Prop

Type

UIMessage

Re-exported from the Vercel AI SDK. Represents a chat message with structured parts.

Prop

Type

Last updated on

On this page