Model Context
Register and manage assistant-ui model context providers that contribute instructions and app state.
API Reference
ModelContextRegistry
ModelContextRegistrygetModelContext?: () => ModelContextsubscribe?: (callback: () => void) => UnsubscribeaddTool?: (tool: AssistantToolProps<TArgs, TResult>) => ModelContextRegistryToolHandle<TArgs, TResult>addInstruction?: (config: string | AssistantInstructionsConfig) => ModelContextRegistryInstructionHandleaddProvider?: (provider: ModelContextProvider) => ModelContextRegistryProviderHandle