Options for the useChat hook.
API
interface UseChatOptions<Tools extends Chat.AnyTool, State = unknown> {debounceTime?: number;debugName?: string;messages?: Chat.Message<string, Tools>[];retries?: number;state?: State;system: string;threadId?: string | undefined;tools?: Tools[];transport?: TransportOrFactory;}UseChatOptions
@typeToolsChat.AnyTool@typeStatedebounceTime
numberThe debounce time between sends to the endpoint. default: 150
debugName
stringThe name of the hook, useful for debugging.
messages
Chat.Message<string, Tools>[]The initial messages for the chat. default: 1.0
retries
numberNumber of retries if an error is received. default: 0
state
StateThe initial shared agent state.
system
stringThe system message to use for the chat.
threadId
string | undefinedOptional opaque AG-UI thread identity.
tools
Tools[]The tools to make available use for the chat. default: []
transport
TransportOrFactoryOptional transport override for this hook.