ChatBaseProps
Agent Runtimes / types/chat / ChatBaseProps
Interface: ChatBaseProps
Defined in: types/chat.ts:225
ChatBase props
Properties
agentRuntimeConfig?
optionalagentRuntimeConfig?:AgentRuntimeConfig
Defined in: types/chat.ts:351
Simplified agent runtime configuration. A convenience wrapper that creates a ProtocolConfig internally. When provided, will automatically set useStore=false and configure protocol mode.
Example
<ChatBase
agentRuntimeConfig={{
url: 'http://localhost:8765',
agentId: 'my-agent',
authToken: 'my-token',
}}
/>
autoFocus?
optionalautoFocus?:boolean
Defined in: types/chat.ts:443
Auto-focus the input on mount
availableModels?
optionalavailableModels?:ModelConfig[]
Defined in: types/chat.ts:284
Override the list of available models. When provided, this list replaces the models returned by the config endpoint. Use this to restrict the model selector to a specific subset of models.
avatarConfig?
optionalavatarConfig?:AvatarConfig
Defined in: types/chat.ts:373
Avatar configuration
backgroundColor?
optionalbackgroundColor?:string
Defined in: types/chat.ts:413
Panel background color
border?
optionalborder?:string
Defined in: types/chat.ts:416
Border style
borderRadius?
optionalborderRadius?:string|number
Defined in: types/chat.ts:410
Border radius for the panel container
boxShadow?
optionalboxShadow?:string
Defined in: types/chat.ts:419
Box shadow
brandIcon?
optionalbrandIcon?:ReactNode
Defined in: types/chat.ts:370
Custom brand icon for header
chatViewMode?
optionalchatViewMode?:ChatViewMode
Defined in: types/chat.ts:306
Current chat view mode. When provided, a segmented view-mode toggle is rendered in the header with icons for each mode: floating (popup), floating-small (compact), sidebar (docked).
children?
optionalchildren?:ReactNode
Defined in: types/chat.ts:407
Children to render in the messages area (for custom content)
className?
optionalclassName?:string
Defined in: types/chat.ts:293
Custom class name
codemodeEnabled?
optionalcodemodeEnabled?:boolean
Defined in: types/chat.ts:274
Indicate tools are accessed via Codemode meta-tools
compact?
optionalcompact?:boolean
Defined in: types/chat.ts:422
Compact mode (reduced padding)
connectedIdentities?
optionalconnectedIdentities?:object[]
Defined in: types/chat.ts:516
Connected identities to pass to agent tools. When provided, access tokens for these identities are automatically included in tool calls that need them.
accessToken?
optionalaccessToken?:string
provider
provider:
string
userId?
optionaluserId?:string
Example
const { identities, getAccessToken } = useIdentity();
<ChatBase connectedIdentities={identities} />
contextSnapshot?
optionalcontextSnapshot?:ContextSnapshotData
Defined in: types/chat.ts:246
External context snapshot data for the token usage bar. When provided, this overrides the built-in useContextSnapshot hook (which is a no-op since the REST endpoint was removed). Pass live data received from the monitoring WebSocket.
description?
optionaldescription?:string
Defined in: types/chat.ts:428
Description shown in empty state (protocol mode)
emptyState?
optionalemptyState?:EmptyStateConfig
Defined in: types/chat.ts:385
Empty state configuration
enableStreaming?
optionalenableStreaming?:boolean
Defined in: types/chat.ts:365
Enable streaming mode for custom message handler. When true, will provide streaming callbacks to onSendMessage.
Default
false
focusTrigger?
optionalfocusTrigger?:number
Defined in: types/chat.ts:469
Trigger to refocus the input field. When this value changes, the input will be focused. Useful for refocusing after view mode changes.
footerContent?
optionalfooterContent?:ReactNode
Defined in: types/chat.ts:391
Custom footer content (rendered above input)
frontendTools?
optionalfrontendTools?:FrontendToolDefinition<Record<string,unknown>,unknown>[]
Defined in: types/chat.ts:475
Frontend tools to register with the agent. These tools execute in the browser and their results are sent back to the agent.
headerActions?
optionalheaderActions?:ReactNode
Defined in: types/chat.ts:299
Header actions
headerButtons?
optionalheaderButtons?:HeaderButtonsConfig
Defined in: types/chat.ts:376
Header buttons configuration
headerContent?
optionalheaderContent?:ReactNode
Defined in: types/chat.ts:404
Custom header content (rendered below title row)
hideMessagesAfterToolUI?
optionalhideMessagesAfterToolUI?:boolean
Defined in: types/chat.ts:462
Whether to hide assistant messages that follow a rendered tool call UI. When true, assistant messages after tool UI are hidden to avoid duplicate information.
Default
false
historyAuthToken?
optionalhistoryAuthToken?:string
Defined in: types/chat.ts:541
Auth token for the history endpoint. If not provided, uses the protocol's authToken.
historyEndpoint?
optionalhistoryEndpoint?:string
Defined in: types/chat.ts:535
Endpoint URL for fetching conversation history.
When runtimeId is provided, this endpoint is called to fetch
the conversation history on mount.
If not provided, defaults to {protocol.endpoint}/api/v1/history.
initialModel?
optionalinitialModel?:string
Defined in: types/chat.ts:277
Initial model ID to select (e.g., 'openai:gpt-4o-mini')
initialSkills?
optionalinitialSkills?:string[]
Defined in: types/chat.ts:290
Initial skill IDs to enable
loadingState?
optionalloadingState?:ReactNode
Defined in: types/chat.ts:296
Custom loading state
mcpServers?
optionalmcpServers?:McpServerSelection[]
Defined in: types/chat.ts:287
MCP servers to enable (others will be disabled)
mcpStatusData?
optionalmcpStatusData?:McpToolsetsStatusResponse|null
Defined in: types/chat.ts:253
External MCP toolsets status data for the MCP indicator. When provided, the data is forwarded to the McpStatusIndicator so it shows live status instead of "No MCP Server defined".
onAuthorizationRequired?
optionalonAuthorizationRequired?: (provider,scopes,context?) =>Promise<string|null>
Defined in: types/chat.ts:499
Callback when the agent requests authorization for an external service. This is called when a tool needs OAuth access to a service like GitHub.
Parameters
provider
string
The OAuth provider name (e.g., 'github', 'google')
scopes
string[]
The requested OAuth scopes
context?
Additional context about why authorization is needed
reason?
string
toolName?
string
Returns
Promise<string | null>
Promise resolving to the access token, or null if user cancels
Example
<ChatBase
onAuthorizationRequired={async (provider, scopes, context) => {
// Show UI to user to authorize
const token = await showAuthDialog(provider, scopes);
return token;
}}
/>
onChatViewModeChange?
optionalonChatViewModeChange?: (mode) =>void
Defined in: types/chat.ts:311
Callback when the user clicks a different view mode in the header toggle.
Parameters
mode
Returns
void
onClear?
optionalonClear?: () =>void
Defined in: types/chat.ts:437
Callback when messages are cleared
Returns
void
onInformationClick?
optionalonInformationClick?: () =>void
Defined in: types/chat.ts:401
Callback when the information icon is clicked
Returns
void
onMessagesChange?
optionalonMessagesChange?: (messages) =>void
Defined in: types/chat.ts:440
Callback when messages change (for tracking message count)
Parameters
messages
Returns
void
onNewChat?
optionalonNewChat?: () =>void
Defined in: types/chat.ts:434
Callback when new chat is triggered
Returns
void
onSendMessage?
optionalonSendMessage?:MessageHandler
Defined in: types/chat.ts:358
Custom message handler (for props-based mode). When provided, uses custom handler instead of store or protocol. Supports streaming via options callbacks.
onStateUpdate?
optionalonStateUpdate?: (state) =>void
Defined in: types/chat.ts:431
Callback for state updates (for shared state)
Parameters
state
unknown
Returns
void
pendingPrompt?
optionalpendingPrompt?:string
Defined in: types/chat.ts:547
A prompt to append and send after the conversation history is loaded. The message is shown in the chat and sent to the agent exactly once.
placeholder?
optionalplaceholder?:string
Defined in: types/chat.ts:425
Input placeholder override
poweredByProps?
optionalpoweredByProps?:Partial<PoweredByTagProps>
Defined in: types/chat.ts:382
Powered by tag props
protocol?
optionalprotocol?:Protocol|ProtocolConfig
Defined in: types/chat.ts:333
Protocol configuration for connecting to backend. When provided and useStore is false, enables protocol mode.
Accepts either a full ProtocolConfig object or a simple Protocol string
(e.g. 'vercel-ai'). When a string is provided, it is used as the protocol
type and combined with other props (endpoint, agentRuntimeConfig) to build
the full configuration.
Default
'vercel-ai'
renderToolResult?
optionalrenderToolResult?:RenderToolResult
Defined in: types/chat.ts:388
Tool result renderer for tool calls
runtimeId?
optionalruntimeId?:string
Defined in: types/chat.ts:527
Runtime ID for conversation persistence. When provided, messages are fetched from the server API on page reload and prevents message mixing between different agent runtimes.
showErrors?
optionalshowErrors?:boolean
Defined in: types/chat.ts:259
Show error messages
showHeader?
optionalshowHeader?:boolean
Defined in: types/chat.ts:230
Show header
showInformation?
optionalshowInformation?:boolean
Defined in: types/chat.ts:398
Show the information icon in the header. When clicked, fires onInformationClick.
Default
false
showInput?
optionalshowInput?:boolean
Defined in: types/chat.ts:262
Show input area
showLoadingIndicator?
optionalshowLoadingIndicator?:boolean
Defined in: types/chat.ts:256
Show loading indicator
showModelSelector?
optionalshowModelSelector?:boolean
Defined in: types/chat.ts:265
Show model selector (for protocols that support it)
showPoweredBy?
optionalshowPoweredBy?:boolean
Defined in: types/chat.ts:379
Show powered by tag
showSkillsMenu?
optionalshowSkillsMenu?:boolean
Defined in: types/chat.ts:271
Show skills menu (for protocols that support it)
showTokenUsage?
optionalshowTokenUsage?:boolean
Defined in: types/chat.ts:238
Show token usage bar (input/output token counts from the backend). Rendered independently of showHeader, so usage is visible even without a title bar. Requires the protocol to have enableConfigQuery=true and an agentId.
Default
true
showToolsMenu?
optionalshowToolsMenu?:boolean
Defined in: types/chat.ts:268
Show tools menu (for protocols that support it)
submitOnSuggestionClick?
optionalsubmitOnSuggestionClick?:boolean
Defined in: types/chat.ts:455
Whether to automatically submit the message when a suggestion is clicked.
Default
true
suggestions?
optionalsuggestions?:Suggestion[]
Defined in: types/chat.ts:449
Suggestions to show in empty state. When clicked, the suggestion message is sent to the chat.
title?
optionaltitle?:string
Defined in: types/chat.ts:227
Chat title
useStore?
optionaluseStore?:boolean
Defined in: types/chat.ts:320
Use Zustand store for state management. When true, uses the shared store. When false with protocol, uses protocol mode.
Default
true