Skip to content

Function: MastraChat()

MastraChat(__namedParameters): Element

Self-contained chat component. Mount it anywhere under the Mastra plugin and it wires itself from the plugin’s published client config (mount paths + default agent) via useMastraChat, then renders the conversation through ChatView. The GenieChat-equivalent drop-in: full streaming, tool-session pills, approvals, stop control, history pagination, and built-in conversation management (a sidebar of the resource’s threads with select / new / delete, persisted across reloads) - all with no host wiring. The model picker is opt-in via showModelPicker; thread management is on by default, laid out per threadPlacement (auto docks it left and falls back to a tab strip on a narrow chat) and turned off with threadPlacement: "disabled".

MastraChatProps

Element