Skip to main content
useAiql returns the current token, theme, and optional onArtifactOpen handler from the nearest AiqlProvider. It throws if you call it outside a provider. Prefer this hook for custom components that need the shared token. Canvas, Dashboard, Chat, and Frame already call it internally.

Import

Usage

Basic

Must be under AiqlProvider

Calling useAiql() outside AiqlProvider throws:

API Reference

Return value

See AiqlProvider, useToken, and useEmbedNavigator.