Tools
Tool definitions, React renderers, status helpers, and toolkits for exposing callable app capabilities to assistant-ui chat models.
Use these APIs when your assistant needs to call application code, render a custom tool result, or expose tool state inside a React UI.
Toolkits are the current registration API. Tool rendering and status are independent of the tool's execution location and apply to frontend, backend, human, and MCP tools.
Tools({ toolkit }) | |
|---|---|
| Scope | Entire assistant subtree below the mount point |
| Lifecycle | Tied to the runtime / provider tree |
| Typical use | App-wide tools, dynamic scoped tools, MCP merging, tools defined alongside the runtime |
| Stable reference | Pass a stable toolkit (module scope or useMemo) |
useAssistantTool, makeAssistantTool, useAssistantToolUI, and makeAssistantToolUI are deprecated compatibility APIs. See Migrating Tools to Toolkits.
Pages
ToolkitsDefine model-facing tools and compose them into named toolkits registered with an assistant-ui runtime scope.Component ToolsRegister assistant tools from mounted React components, scoped to the lifetime of part of the UI tree.Tool RenderingRegister React renderers for assistant-ui tool calls, tool results, and model data parts.Tool StatusRead tool arguments, execution status, and result state inside assistant-ui tool UI components.