# Overview
URL: /docs/api-reference/overview
API reference for primitives, runtime hooks, and context providers.
import { Component, ContextLevel, RuntimeHooks } from "./context";
export const contextColors = {
"Assistant Context": "#4a86e8",
"Thread Context": "#45a049",
"Composer Context": "#ff9933",
"Message Context": "#bb2244",
"MessagePart Context": "#268bd2",
"Attachment Context": "#FFB6C1",
"ThreadListItem Context": "#c678dd",
};
This page is under construction. Most links will not work yet.
Cloud \[#cloud]
* [`AssistantCloud`](#assistant-cloud)
Runtime API \[#runtime-api]
AI SDK \[#ai-sdk]
* [`useChatRuntime`](#use-chat-runtime)
* [`useAISDKRuntime`](#use-aisdk-runtime)
Data Stream \[#data-stream]
* [`useDataStreamRuntime`](#use-data-stream-runtime)
* [`useCloudRuntime`](#use-cloud-runtime)
* [`toLanguageModelMessages`](#to-language-model-messages) (AI SDK specific)
assistant-stream (Framework-Agnostic) \[#assistant-stream-framework-agnostic]
* [`toGenericMessages`](#to-generic-messages)
* [`toToolsJSONSchema`](#to-tools-json-schema)
* [`GenericMessage`](#generic-message)
LangGraph \[#langgraph]
* [`useLangGraphRuntime`](#use-lang-graph-runtime)
Local Runtime \[#local-runtime]
* [`useLocalRuntime`](#use-local-runtime)
External Store Runtime \[#external-store-runtime]
* [`useExternalStoreRuntime`](#use-external-store-runtime)
* [`createMessageConverter`](#create-message-converter)
Thread List Runtime \[#thread-list-runtime]
* [`useRemoteThreadListRuntime`](#use-remote-thread-list-runtime)
* [`useCloudThreadListRuntime`](#use-cloud-thread-list-runtime)
Runtime Adapters \[#runtime-adapters]
Attachment \[#attachment]
* [`AttachmentAdapter`](#attachment-adapter)
* [`SimpleImageAttachmentAdapter`](#simple-image-attachment-adapter)
* [`SimpleTextAttachmentAdapter`](#simple-text-attachment-adapter)
* [`CompositeAttachmentAdapter`](#composite-attachment-adapter)
Feedback \[#feedback]
* [`FeedbackAdapter`](#feedback-adapter)
Speech \[#speech]
* [`SpeechSynthesisAdapter`](#speech-synthesis-adapter)
* [`WebSpeechSynthesisAdapter`](#web-speech-synthesis-adapter)
Highest Level Context Providers \[#highest-level-context-providers]
Assistant Context \[#assistant-context]
The context available to components inside ``. You usually wrap your entire application in this context.
AssistantRuntime \[#assistantruntime]
Programmatically access the assistant's state and actions.
* [`useAssistantRuntime`](#use-assistant-runtime)
Instructions \[#instructions]
Add system prompt instructions
* [`useAssistantInstructions`](#use-assistant-instructions)
Tool UI \[#tool-ui]
Register tool UIs
* [`makeAssistantTool`](#make-assistant-tool)
* [`makeAssistantToolUI`](#make-assistant-tool-ui)
* [`useAssistantTool`](#use-assistant-tool)
* [`useAssistantToolUI`](#use-assistant-tool-ui)
Programmatically access the list of registered tool UIs (Experimental)
* [`useToolUIs`](#use-tool-uis)
* [`useToolUIsStore`](#use-tool-uis-store)
ThreadListPrimitive \[#threadlistprimitive]
Shows a list of threads and allows the user to switch between them.
Thread Context \[#thread-context]
The context for a single thread. Currently always corresponds to the runtime's main thread.
ThreadRuntime \[#threadruntime]
Programmatically access the thread's state and actions.
* [`useThread`](#use-thread)
* [`useThreadComposer`](#use-thread-composer)
* [`useThreadRuntime`](#use-thread-runtime)
ModelContext \[#modelcontext]
* [`useThreadModelContext`](#use-thread-model-context)
ThreadViewportStore \[#threadviewportstore]
* [`useThreadViewport`](#use-thread-viewport)
* [`useThreadViewportStore`](#use-thread-viewport-store)
ThreadPrimitive \[#threadprimitive]
A conversation thread.
AssistantModalPrimitive \[#assistantmodalprimitive]
A floating modal that usually appears in the lower right corner of the screen. Common for support use cases.
Composer Context \[#composer-context]
Manages the state and actions for the message composer
ComposerRuntime \[#composerruntime]
* [`useComposer`](#use-composer)
* [`useComposerRuntime`](#use-composer-runtime)
ComposerPrimitive \[#composerprimitive]
Message Context \[#message-context]
Manages the state and actions for individual messages
MessageRuntime \[#messageruntime]
* [`useMessage`](#use-message)
* [`useEditComposer`](#use-edit-composer)
* [`useMessageRuntime`](#use-message-runtime)
MessageUtilsStore \[#messageutilsstore]
* [`useMessageUtils`](#use-message-utils)
* [`useMessageUtilsStore`](#use-message-utils-store)
MessagePrimitive \[#messageprimitive]
ActionBarPrimitive \[#actionbarprimitive]
BranchPickerPrimitive \[#branchpickerprimitive]
MessagePart Context \[#messagepart-context]
Manages the state and actions for message parts within messages
MessagePartRuntime \[#messagepartruntime]
* [`useMessagePart`](#use-content-part)
* [`useMessagePartText`](#use-content-part-text)
* [`useMessagePartReasoning`](#use-content-part-reasoning)
* [`useMessagePartRuntime`](#use-content-part-runtime)
MessagePartPrimitive \[#messagepartprimitive]
MarkdownText \[#markdowntext]
Attachment Context \[#attachment-context]
Manages the state and actions for attachments in messages and composer
AttachmentRuntime \[#attachmentruntime]
* [`useAttachment`](#use-attachment)
* [`useAttachmentRuntime`](#use-attachment-runtime)
AttachmentPrimitive \[#attachmentprimitive]
ThreadListItem Context \[#threadlistitem-context]
Manages the state and actions for individual thread list items
ThreadListItemRuntime \[#threadlistitemruntime]
* [`useThreadListItem`](#use-thread-list-item)
* [`useThreadListItemRuntime`](#use-thread-list-item-runtime)
ThreadListItem \[#threadlistitem]
Utilities \[#utilities]
* [`useThreadViewportAutoscroll`](#use-thread-viewport-autoscroll)
* [`useInlineRender`](#use-inline-render)