Skip to content

Documentation / @agentick/react / useChat

Function: useChat() ​

useChat<TMode>(options?): UseChatResult<TMode>

Defined in: react/src/hooks/use-chat.ts:67

Full chat controller hook — messages, steering, and tool confirmations.

Wraps ChatSession with useSyncExternalStore for concurrent-safe React state.

Options like transform, confirmationPolicy, and deriveMode are captured at mount time. Changing them requires a new sessionId to take effect.

Type Parameters ​

TMode ​

TMode extends string = ChatMode

Parameters ​

options? ​

UseChatOptions<TMode> = ...

Returns ​

UseChatResult<TMode>

Released under the ISC License.