Skip to main content

ChatProps

Agent Runtimes


Agent Runtimes / chat/Chat / ChatProps

Interface: ChatProps

Defined in: src/chat/Chat.tsx:116

Chat props — extends ChatCommonProps with transport-specific configuration.

Extends

Properties

agentId?

optional agentId?: string

Defined in: src/chat/Chat.tsx:130

Agent ID


authToken?

optional authToken?: string

Defined in: src/types/chat.ts:521

Auth token for the agent runtime

Inherited from

ChatCommonProps.authToken


autoConnect?

optional autoConnect?: boolean

Defined in: src/chat/Chat.tsx:133

Whether to auto-connect on mount


autoFocus?

optional autoFocus?: boolean

Defined in: src/types/chat.ts:613

Auto-focus the input on mount

Inherited from

ChatCommonProps.autoFocus


availableModels?

optional availableModels?: ModelConfig[]

Defined in: src/types/chat.ts:432

Override the list of available models. When provided, replaces models returned by the config endpoint.

Inherited from

ChatCommonProps.availableModels


baseUrl?

optional baseUrl?: string

Defined in: src/chat/Chat.tsx:124

Base URL of the server (for HTTP-based protocols)


brandIcon?

optional brandIcon?: ReactNode

Defined in: src/types/chat.ts:347

Custom brand icon for header / empty state

Inherited from

ChatCommonProps.brandIcon


chatViewMode?

optional chatViewMode?: ChatViewMode

Defined in: src/types/chat.ts:545

Current chat view mode for header segmented toggle

Inherited from

ChatCommonProps.chatViewMode


children?

optional children?: ReactNode

Defined in: src/types/chat.ts:344

Children to render in the messages area

Inherited from

ChatCommonProps.children


className?

optional className?: string

Defined in: src/types/chat.ts:341

Custom class name

Inherited from

ChatCommonProps.className


clearOnMount?

optional clearOnMount?: boolean

Defined in: src/chat/Chat.tsx:157

Clear messages when component mounts or agentId changes


codemodeEnabled?

optional codemodeEnabled?: boolean

Defined in: src/types/chat.ts:417

Indicate tools are accessed via Codemode meta-tools

Inherited from

ChatCommonProps.codemodeEnabled


codemodeStatusData?

optional codemodeStatusData?: CodemodeStatusData | null

Defined in: src/types/chat.ts:559

External codemode status data (e.g. from WebSocket stream).

Inherited from

ChatCommonProps.codemodeStatusData


collapsed?

optional collapsed?: boolean

Defined in: src/types/chat.ts:478

Collapse chat panel while keeping the ephemeral notebook visible.

Inherited from

ChatCommonProps.collapsed


contextSnapshot?

optional contextSnapshot?: ContextSnapshotData

Defined in: src/types/chat.ts:553

External context snapshot data for the token usage bar

Inherited from

ChatCommonProps.contextSnapshot


description?

optional description?: string

Defined in: src/types/chat.ts:309

Description shown in empty state

Inherited from

ChatCommonProps.description


disableInputPrompt?

optional disableInputPrompt?: boolean

Defined in: src/types/chat.ts:318

Keep input visible but disabled

Inherited from

ChatCommonProps.disableInputPrompt


disableInternalJupyterTheme?

optional disableInternalJupyterTheme?: boolean

Defined in: src/types/chat.ts:577

Disable ChatBase's internal JupyterReactTheme wrapper. Use this when the host page already provides a JupyterReactTheme boundary.

Default

false

Inherited from

ChatCommonProps.disableInternalJupyterTheme


enableEphemeralDocument?

optional enableEphemeralDocument?: boolean

Defined in: src/types/chat.ts:460

Enable the in-memory "ephemeral document" (Lexical rich-text) companion surface. When enabled it appears as an option in the companion-surface segmented control alongside the notebook.

Default

false

Inherited from

ChatCommonProps.enableEphemeralDocument


enableEphemeralNotebook?

optional enableEphemeralNotebook?: boolean

Defined in: src/types/chat.ts:453

Show an in-memory "ephemeral notebook" next to the chat, toggled from the input footer. The notebook model lives purely in memory (never persisted) and its frontend tools are registered while visible.

Default

true

Inherited from

ChatCommonProps.enableEphemeralNotebook


enableStreaming?

optional enableStreaming?: boolean

Defined in: src/types/chat.ts:397

Enable streaming mode for custom message handler.

Default

false

Inherited from

ChatCommonProps.enableStreaming


ephemeralNotebookToolbar?

optional ephemeralNotebookToolbar?: EphemeralNotebookToolbarComponent

Defined in: src/types/chat.ts:487

Optional toolbar component used by the ephemeral notebook. Defaults to the toolbar from @datalayer/jupyter-react when omitted.

Inherited from

ChatCommonProps.ephemeralNotebookToolbar


errorBanner?

optional errorBanner?: object

Defined in: src/chat/Chat.tsx:178

Error banner to display at the top of the chat. Use this to show sandbox connection errors or other warnings.

message

message: string

variant?

optional variant?: "warning" | "danger"


extensions?

optional extensions?: Extension[]

Defined in: src/chat/Chat.tsx:121

Extensions for chat features


frontendTools?

optional frontendTools?: FrontendToolDefinition<Record<string, unknown>, unknown>[]

Defined in: src/types/chat.ts:446

Frontend tool definitions to register with the chat

Inherited from

ChatCommonProps.frontendTools


headerActions?

optional headerActions?: ReactNode

Defined in: src/types/chat.ts:608

Custom header actions (rendered in title row, right side)

Inherited from

ChatCommonProps.headerActions


headerContent?

optional headerContent?: ReactNode

Defined in: src/types/chat.ts:605

Custom header content (rendered below title row)

Inherited from

ChatCommonProps.headerContent


height?

optional height?: string | number

Defined in: src/chat/Chat.tsx:154

Height of the chat container


hideMessagesAfterToolUI?

optional hideMessagesAfterToolUI?: boolean

Defined in: src/types/chat.ts:510

Hide assistant messages that follow a rendered tool call UI.

Default

false

Inherited from

ChatCommonProps.hideMessagesAfterToolUI


historyAuthToken?

optional historyAuthToken?: string

Defined in: src/types/chat.ts:524

Optional auth token for the legacy history endpoint

Inherited from

ChatCommonProps.historyAuthToken


historyEndpoint?

optional historyEndpoint?: string

Defined in: src/types/chat.ts:518

Optional legacy endpoint URL for fetching conversation history

Inherited from

ChatCommonProps.historyEndpoint


identityProviders?

optional identityProviders?: object

Defined in: src/chat/Chat.tsx:160

Identity providers configuration for OAuth

custom?

optional custom?: object

custom.clientId

clientId: string

custom.config?

optional config?: Partial<OAuthProviderConfig>

custom.scopes?

optional scopes?: string[]

github?

optional github?: object

github.clientId

clientId: string

github.config?

optional config?: Partial<OAuthProviderConfig>

github.scopes?

optional scopes?: string[]

google?

optional google?: object

google.clientId

clientId: string

google.config?

optional config?: Partial<OAuthProviderConfig>

google.scopes?

optional scopes?: string[]

kaggle?

optional kaggle?: object

kaggle.clientId

clientId: string

kaggle.config?

optional config?: Partial<OAuthProviderConfig>

kaggle.scopes?

optional scopes?: string[]

linkedin?

optional linkedin?: object

linkedin.clientId

clientId: string

linkedin.config?

optional config?: Partial<OAuthProviderConfig>

linkedin.scopes?

optional scopes?: string[]

notion?

optional notion?: object

notion.clientId

clientId: string

notion.config?

optional config?: Partial<OAuthProviderConfig>

notion.scopes?

optional scopes?: string[]

slack?

optional slack?: object

slack.clientId

clientId: string

slack.config?

optional config?: Partial<OAuthProviderConfig>

slack.scopes?

optional scopes?: string[]


initialEphemeralNotebookOpen?

optional initialEphemeralNotebookOpen?: boolean

Defined in: src/types/chat.ts:472

Initial open state of the ephemeral notebook.

Default

true

Inherited from

ChatCommonProps.initialEphemeralNotebookOpen


initialEphemeralSurfaceMode?

optional initialEphemeralSurfaceMode?: EphemeralSurfaceMode

Defined in: src/types/chat.ts:466

Initial companion surface shown next to the chat. Defaults to 'notebook' when enableEphemeralNotebook is true, otherwise 'none'.

Inherited from

ChatCommonProps.initialEphemeralSurfaceMode


initialModel?

optional initialModel?: string

Defined in: src/types/chat.ts:426

Initial model ID to select (e.g., 'bedrock:us.anthropic.claude-sonnet-4-5-20250929-v1:0')

Inherited from

ChatCommonProps.initialModel


initialSkills?

optional initialSkills?: string[]

Defined in: src/types/chat.ts:438

Initial skill IDs to enable

Inherited from

ChatCommonProps.initialSkills


kernel?

optional kernel?: IKernelConnection | null

Defined in: src/types/chat.ts:569

Live kernel connection of the companion notebook/document sandbox. When provided, it is forwarded to the chat header's <KernelIndicator> so the indicator reflects the surface's runtime.

Inherited from

ChatCommonProps.kernel


launching?

optional launching?: boolean

Defined in: src/types/chat.ts:326

Whether the underlying agent runtime is still launching. When true, the chat shell is rendered with the input and controls disabled and a spinner overlay is shown, so the plain chat view appears as soon as the agent starts being created and stays interactive-disabled until it is ready.

Inherited from

ChatCommonProps.launching


launchingMessage?

optional launchingMessage?: ReactNode

Defined in: src/types/chat.ts:331

Optional message shown next to the spinner while launching is true.

Inherited from

ChatCommonProps.launchingMessage


mcpServers?

optional mcpServers?: McpServerSelection[]

Defined in: src/types/chat.ts:435

MCP server selections to enable (others disabled)

Inherited from

ChatCommonProps.mcpServers


mcpStatusData?

optional mcpStatusData?: McpToolsetsStatusResponse | null

Defined in: src/types/chat.ts:556

External MCP toolsets status data

Inherited from

ChatCommonProps.mcpStatusData


onApproveApproval?

optional onApproveApproval?: (approvalId, note?) => void | Promise<boolean | void>

Defined in: src/types/chat.ts:591

Called when the user approves a pending request.

Parameters

approvalId

string

note?

string

Returns

void | Promise<boolean | void>

Inherited from

ChatCommonProps.onApproveApproval


onChatViewModeChange?

optional onChatViewModeChange?: (mode) => void

Defined in: src/types/chat.ts:548

Callback when user switches chat view mode

Parameters

mode

ChatViewMode

Returns

void

Inherited from

ChatCommonProps.onChatViewModeChange


onClose?

optional onClose?: () => void

Defined in: src/types/chat.ts:383

Callback when the component closes

Returns

void

Inherited from

ChatCommonProps.onClose


onCollapsePanel?

optional onCollapsePanel?: () => void

Defined in: src/chat/Chat.tsx:151

Callback when collapse panel is clicked

Returns

void


onDisconnect?

optional onDisconnect?: () => void

Defined in: src/chat/Chat.tsx:145

Callback when disconnect is clicked

Returns

void


onEphemeralNotebookOpenChange?

optional onEphemeralNotebookOpenChange?: (open) => void

Defined in: src/types/chat.ts:475

Controlled callback for ephemeral notebook open-state changes.

Parameters

open

boolean

Returns

void

Inherited from

ChatCommonProps.onEphemeralNotebookOpenChange


onEphemeralSurfaceModeChange?

optional onEphemeralSurfaceModeChange?: (mode) => void

Defined in: src/types/chat.ts:469

Controlled callback for companion surface mode changes.

Parameters

mode

EphemeralSurfaceMode

Returns

void

Inherited from

ChatCommonProps.onEphemeralSurfaceModeChange


onExpandFromCollapsed?

optional onExpandFromCollapsed?: () => void

Defined in: src/types/chat.ts:481

Callback to reopen chat panel from collapsed notebook mode.

Returns

void

Inherited from

ChatCommonProps.onExpandFromCollapsed


onIdentityConnect?

optional onIdentityConnect?: (identity) => void

Defined in: src/chat/Chat.tsx:169

Callback when identity connects

Parameters

identity

Identity

Returns

void


onIdentityDisconnect?

optional onIdentityDisconnect?: (provider) => void

Defined in: src/chat/Chat.tsx:172

Callback when identity disconnects

Parameters

provider

OAuthProvider

Returns

void


onInformationClick?

optional onInformationClick?: () => void

Defined in: src/types/chat.ts:540

Callback when the information icon is clicked

Returns

void

Inherited from

ChatCommonProps.onInformationClick


onLogout?

optional onLogout?: () => void

Defined in: src/chat/Chat.tsx:148

Callback when logout is clicked

Returns

void


onMessageReceived?

optional onMessageReceived?: (message) => void

Defined in: src/chat/Chat.tsx:142

Callback when a response is received

Parameters

message

unknown

Returns

void


onMessageSent?

optional onMessageSent?: (content) => void

Defined in: src/chat/Chat.tsx:139

Callback when a message is sent

Parameters

content

string

Returns

void


onNewChat?

optional onNewChat?: () => void

Defined in: src/types/chat.ts:377

Callback when new chat is triggered

Returns

void

Inherited from

ChatCommonProps.onNewChat


onOpen?

optional onOpen?: () => void

Defined in: src/types/chat.ts:380

Callback when the component opens

Returns

void

Inherited from

ChatCommonProps.onOpen


onRejectApproval?

optional onRejectApproval?: (approvalId, note?) => void | Promise<boolean | void>

Defined in: src/types/chat.ts:597

Called when the user rejects a pending request.

Parameters

approvalId

string

note?

string

Returns

void | Promise<boolean | void>

Inherited from

ChatCommonProps.onRejectApproval


onSendMessage?

optional onSendMessage?: MessageHandler

Defined in: src/types/chat.ts:391

Custom message handler. When provided, uses this handler instead of protocol mode.

Inherited from

ChatCommonProps.onSendMessage


onSettingsClick?

optional onSettingsClick?: () => void

Defined in: src/types/chat.ts:374

Callback when settings is clicked

Returns

void

Inherited from

ChatCommonProps.onSettingsClick


onStateUpdate?

optional onStateUpdate?: (state) => void

Defined in: src/types/chat.ts:616

Callback for state updates

Parameters

state

unknown

Returns

void

Inherited from

ChatCommonProps.onStateUpdate


onToggleCodemode?

optional onToggleCodemode?: (enabled) => void | Promise<void>

Defined in: src/types/chat.ts:423

Callback fired when the user toggles codemode from the Tools menu. When omitted, the toggle renders in read-only mode.

Parameters

enabled

boolean

Returns

void | Promise<void>

Inherited from

ChatCommonProps.onToggleCodemode


onToolCallComplete?

optional onToolCallComplete?: (context) => void

Defined in: src/types/chat.ts:493

Post-hook: fires when a tool result is received

Parameters

context

ToolCallCompleteContext

Returns

void

Inherited from

ChatCommonProps.onToolCallComplete


onToolCallStart?

optional onToolCallStart?: (context) => void

Defined in: src/types/chat.ts:490

Pre-hook: fires when a tool call starts executing

Parameters

context

ToolCallStartContext

Returns

void

Inherited from

ChatCommonProps.onToolCallStart


overlay?

optional overlay?: ReactNode

Defined in: src/types/chat.ts:338

Optional overlay rendered above the chat surface (messages + input). Use this to show a gating UI such as a sign-in form for anonymous users while keeping the chat visible and its controls disabled behind it.

Inherited from

ChatCommonProps.overlay


panelProps?

optional panelProps?: Partial<ChatBaseProps>

Defined in: src/types/chat.ts:622

Additional ChatBase props (escape hatch). Props set here are spread onto ChatBase as overrides.

Inherited from

ChatCommonProps.panelProps


pendingApprovals?

optional pendingApprovals?: PendingApproval[]

Defined in: src/types/chat.ts:588

Pending tool approval requests to render in the top banner.

Inherited from

ChatCommonProps.pendingApprovals


pendingPrompt?

optional pendingPrompt?: string

Defined in: src/types/chat.ts:529

A prompt to send after conversation history is loaded (sent once).

Inherited from

ChatCommonProps.pendingPrompt


placeholder?

optional placeholder?: string

Defined in: src/types/chat.ts:350

Input placeholder

Inherited from

ChatCommonProps.placeholder


poweredByProps?

optional poweredByProps?: Partial<PoweredByTagProps>

Defined in: src/types/chat.ts:369

Powered by tag props

Inherited from

ChatCommonProps.poweredByProps


protocol

protocol: Protocol

Defined in: src/chat/Chat.tsx:118

Transport to use — REQUIRED (narrows protocol to string enum)

Overrides

ChatCommonProps.protocol


renderToolResult?

optional renderToolResult?: RenderToolResult

Defined in: src/types/chat.ts:443

Custom render function for tool results

Inherited from

ChatCommonProps.renderToolResult


runtimeId?

optional runtimeId?: string

Defined in: src/types/chat.ts:515

Runtime ID for conversation persistence

Inherited from

ChatCommonProps.runtimeId


sandboxStatusData?

optional sandboxStatusData?: SandboxWsStatus | null

Defined in: src/types/chat.ts:562

Optional sandbox status override for immediate UI updates.

Inherited from

ChatCommonProps.sandboxStatusData


showClearButton?

optional showClearButton?: boolean

Defined in: src/types/chat.ts:358

Show clear button in header

Inherited from

ChatCommonProps.showClearButton


showHeader?

optional showHeader?: boolean

Defined in: src/types/chat.ts:312

Show header

Inherited from

ChatCommonProps.showHeader


showInformation?

optional showInformation?: boolean

Defined in: src/types/chat.ts:537

Show the information icon in the header.

Default

false

Inherited from

ChatCommonProps.showInformation


showInput?

optional showInput?: boolean

Defined in: src/types/chat.ts:315

Show input area

Inherited from

ChatCommonProps.showInput


showModelSelector?

optional showModelSelector?: boolean

Defined in: src/types/chat.ts:402

Show model selector

Inherited from

ChatCommonProps.showModelSelector


showNewChatButton?

optional showNewChatButton?: boolean

Defined in: src/types/chat.ts:355

Show new chat button in header

Inherited from

ChatCommonProps.showNewChatButton


showPoweredBy?

optional showPoweredBy?: boolean

Defined in: src/types/chat.ts:366

Show powered by tag

Inherited from

ChatCommonProps.showPoweredBy


showSettingsButton?

optional showSettingsButton?: boolean

Defined in: src/types/chat.ts:361

Show settings button in header

Inherited from

ChatCommonProps.showSettingsButton


showSkillsMenu?

optional showSkillsMenu?: boolean

Defined in: src/types/chat.ts:408

Show skills menu

Inherited from

ChatCommonProps.showSkillsMenu


showTokenUsage?

optional showTokenUsage?: boolean

Defined in: src/types/chat.ts:414

Show token usage bar.

Default

true

Inherited from

ChatCommonProps.showTokenUsage


showToolApprovalBanner?

optional showToolApprovalBanner?: boolean

Defined in: src/types/chat.ts:585

Whether to render the top-of-chat tool approval banner when there are pending approvals.

Default

true

Inherited from

ChatCommonProps.showToolApprovalBanner


showToolsMenu?

optional showToolsMenu?: boolean

Defined in: src/types/chat.ts:405

Show tools menu

Inherited from

ChatCommonProps.showToolsMenu


streaming?

optional streaming?: boolean

Defined in: src/chat/Chat.tsx:136

Whether to use streaming (for protocols that support it)


submitOnSuggestionClick?

optional submitOnSuggestionClick?: boolean

Defined in: src/types/chat.ts:504

Whether to auto-submit when a suggestion is clicked.

Default

true

Inherited from

ChatCommonProps.submitOnSuggestionClick


subtitle?

optional subtitle?: string

Defined in: src/types/chat.ts:306

Chat subtitle (rendered under the title in the header)

Inherited from

ChatCommonProps.subtitle


suggestions?

optional suggestions?: Suggestion[]

Defined in: src/types/chat.ts:498

Suggestions to show in empty state

Inherited from

ChatCommonProps.suggestions


title?

optional title?: string

Defined in: src/types/chat.ts:303

Chat title

Inherited from

ChatCommonProps.title


useStore?

optional useStore?: boolean

Defined in: src/types/chat.ts:298

Use Zustand store for state management instead of protocol endpoint.

Default

true

Inherited from

ChatCommonProps.useStore


wsUrl?

optional wsUrl?: string

Defined in: src/chat/Chat.tsx:127

WebSocket URL (for WebSocket-based protocols like ACP)