Interface: MastraChatProps
Props for MastraChat.
Extends
Section titled “Extends”Properties
Section titled “Properties”agentId?
Section titled “agentId?”
optionalagentId?:string
Agent to converse with. Defaults to the Mastra plugin’s registered
default agent (clientConfig().defaultAgent).
Inherited from
Section titled “Inherited from”className?
Section titled “className?”
optionalclassName?:string
Extra classes merged onto the chat’s root layout container.
enableExport?
Section titled “enableExport?”
optionalenableExport?:boolean
Enable chat export. Off by default (opt-in). When on, the header shows an “Export” menu for the whole conversation and each assistant bubble shows a per-message export menu. Both offer PDF (via the browser print dialog) and Markdown; charts and data tables are inlined into the export so it renders reliably offline.
Inherited from
Section titled “Inherited from”UseMastraChatOptions.enableExport
enableFeedback?
Section titled “enableFeedback?”
optionalenableFeedback?:boolean
Surface per-message feedback controls (thumbs up/down + a comment popover) that log to MLflow as trace assessments.
Defaults to whatever enableExport is (feedback and export
are the two “quality loop” affordances, so turning on export opts
into feedback too); pass an explicit true / false to override.
Regardless of this flag, controls only actually render when the
server reports MLflow logging is enabled (clientConfig.feedbackEnabled)
and the turn produced a trace id - so enabling it on a deployment
without MLflow tracing is a safe no-op.
Inherited from
Section titled “Inherited from”UseMastraChatOptions.enableFeedback
enableThreads?
Section titled “enableThreads?”
optionalenableThreads?:boolean
Enable built-in conversation (thread) management: the chat tracks a
client-selected thread id, persists it across reloads, lists the
resource’s conversations, and renders a sidebar to switch between
them / start new ones / delete them. On by default. Set false for
the classic single-thread chat anchored to the per-session cookie
(no sidebar, no thread tracking).
Shorthand for threadPlacement: false is "disabled". When both
are passed, enableThreads: false wins.
Inherited from
Section titled “Inherited from”UseMastraChatOptions.enableThreads
showModelPicker?
Section titled “showModelPicker?”
optionalshowModelPicker?:boolean
Surface the built-in model picker in the header, letting the user
override the serving endpoint per turn (via X-Mastra-Model).
Off by default so the drop-in renders a clean single-model chat;
when false the model catalogue isn’t even fetched.
Inherited from
Section titled “Inherited from”UseMastraChatOptions.showModelPicker
suggestions?
Section titled “suggestions?”
optionalsuggestions?:string[]
Starter questions shown as one-tap buttons on the empty state.
When omitted, the drop-in auto-sources them from the agent’s
Genie space sample questions (via the plugin’s /suggestions
endpoint); when the agent has no Genie space the empty state
stays bare. Pass an explicit list to override that lookup, or
[] to force no suggestions.
Inherited from
Section titled “Inherited from”UseMastraChatOptions.suggestions
threadPlacement?
Section titled “threadPlacement?”
optionalthreadPlacement?:ThreadPlacement
Where conversation management renders: "left" / "right" dock the list
to that edge, "top" shows the open conversations as an editor-style tab
strip with a history menu, "disabled" turns thread management off, and
the default "auto" picks "left" while the chat is wide enough for a
side panel and "top" once it gets too narrow for one (measured on the
chat’s own width, so an embedded panel decides on its own space).