@assistant-ui/mcp-docs-server 0.1.31 → 0.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/.docs/organized/code-examples/waterfall.md +23 -25
  2. package/.docs/organized/code-examples/with-a2a.md +28 -28
  3. package/.docs/organized/code-examples/with-ag-ui.md +35 -30
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +16 -14
  5. package/.docs/organized/code-examples/with-artifacts.md +44 -38
  6. package/.docs/organized/code-examples/with-assistant-transport.md +68 -56
  7. package/.docs/organized/code-examples/with-browser-extension.md +357 -0
  8. package/.docs/organized/code-examples/with-chain-of-thought.md +425 -90
  9. package/.docs/organized/code-examples/with-cloud-standalone.md +30 -29
  10. package/.docs/organized/code-examples/with-cloud.md +16 -14
  11. package/.docs/organized/code-examples/with-custom-thread-list.md +19 -17
  12. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +29 -26
  13. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +20 -18
  14. package/.docs/organized/code-examples/with-expo.md +37 -31
  15. package/.docs/organized/code-examples/with-external-store.md +13 -11
  16. package/.docs/organized/code-examples/with-ffmpeg.md +327 -290
  17. package/.docs/organized/code-examples/with-generative-ui.md +1195 -194
  18. package/.docs/organized/code-examples/with-google-adk.md +13 -11
  19. package/.docs/organized/code-examples/with-heat-graph.md +16 -14
  20. package/.docs/organized/code-examples/with-image-generation.md +456 -0
  21. package/.docs/organized/code-examples/with-interactables.md +322 -244
  22. package/.docs/organized/code-examples/with-langchain.md +18 -16
  23. package/.docs/organized/code-examples/with-langgraph.md +95 -88
  24. package/.docs/organized/code-examples/with-livekit.md +30 -27
  25. package/.docs/organized/code-examples/with-mcp.md +754 -0
  26. package/.docs/organized/code-examples/with-opencode.md +70 -70
  27. package/.docs/organized/code-examples/with-react-hook-form.md +24 -22
  28. package/.docs/organized/code-examples/with-react-ink.md +4 -4
  29. package/.docs/organized/code-examples/with-react-router.md +20 -18
  30. package/.docs/organized/code-examples/with-resumable-stream.md +661 -0
  31. package/.docs/organized/code-examples/with-store.md +22 -20
  32. package/.docs/organized/code-examples/with-tanstack.md +18 -19
  33. package/.docs/organized/code-examples/with-tap-runtime.md +31 -28
  34. package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
  35. package/.docs/raw/docs/(docs)/cli.mdx +2 -2
  36. package/.docs/raw/docs/(docs)/copilots/model-context.mdx +34 -26
  37. package/.docs/raw/docs/(docs)/copilots/motivation.mdx +32 -26
  38. package/.docs/raw/docs/(docs)/index.mdx +2 -2
  39. package/.docs/raw/docs/(docs)/installation.mdx +2 -2
  40. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
  41. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
  42. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
  43. package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
  44. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +41 -16
  45. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
  46. package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
  47. package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
  48. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
  49. package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
  50. package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
  51. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
  52. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +46 -0
  53. package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
  54. package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
  55. package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
  56. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
  57. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
  58. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +31 -52
  59. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
  60. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
  61. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
  62. package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
  63. package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
  64. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
  65. package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +109 -0
  66. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +58 -0
  67. package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
  68. package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
  69. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +109 -132
  70. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
  71. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
  72. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
  73. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
  74. package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
  75. package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
  76. package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
  77. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
  78. package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
  79. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
  80. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
  81. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +202 -588
  82. package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
  83. package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
  84. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
  85. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
  86. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
  87. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
  88. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
  89. package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
  90. package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
  91. package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
  92. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
  93. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
  94. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
  95. package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
  96. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
  97. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
  98. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
  99. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +85 -0
  100. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
  101. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +127 -0
  102. package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
  103. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +91 -0
  104. package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
  105. package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
  106. package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
  107. package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
  108. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +143 -0
  109. package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
  110. package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
  111. package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
  112. package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -3
  113. package/.docs/raw/docs/cloud/index.mdx +2 -2
  114. package/.docs/raw/docs/guides/attachments.mdx +4 -4
  115. package/.docs/raw/docs/guides/branching.mdx +1 -1
  116. package/.docs/raw/docs/guides/chain-of-thought.mdx +12 -14
  117. package/.docs/raw/docs/guides/context-api.mdx +6 -5
  118. package/.docs/raw/docs/guides/dictation.mdx +2 -2
  119. package/.docs/raw/docs/guides/editing.mdx +1 -1
  120. package/.docs/raw/docs/guides/image-generation.mdx +74 -0
  121. package/.docs/raw/docs/guides/index.mdx +5 -14
  122. package/.docs/raw/docs/guides/latex.mdx +2 -2
  123. package/.docs/raw/docs/guides/mentions.mdx +6 -6
  124. package/.docs/raw/docs/guides/message-timing.mdx +38 -5
  125. package/.docs/raw/docs/guides/quoting.mdx +1 -1
  126. package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
  127. package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
  128. package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
  129. package/.docs/raw/docs/guides/slash-commands.mdx +2 -2
  130. package/.docs/raw/docs/guides/speech.mdx +2 -2
  131. package/.docs/raw/docs/guides/suggestions.mdx +89 -5
  132. package/.docs/raw/docs/guides/voice.mdx +2 -2
  133. package/.docs/raw/docs/ink/adapters.mdx +37 -1
  134. package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
  135. package/.docs/raw/docs/ink/hooks.mdx +98 -85
  136. package/.docs/raw/docs/ink/index.mdx +10 -11
  137. package/.docs/raw/docs/ink/migration.mdx +1 -1
  138. package/.docs/raw/docs/ink/primitives.mdx +350 -9
  139. package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
  140. package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
  141. package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
  142. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +3 -3
  143. package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
  144. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
  145. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
  146. package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
  147. package/.docs/raw/docs/integrations/index.mdx +17 -5
  148. package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
  149. package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
  150. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
  151. package/.docs/raw/docs/migrations/toolkit-tools.mdx +226 -0
  152. package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
  153. package/.docs/raw/docs/primitives/composer.mdx +53 -0
  154. package/.docs/raw/docs/primitives/index.mdx +2 -2
  155. package/.docs/raw/docs/primitives/message.mdx +9 -10
  156. package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
  157. package/.docs/raw/docs/react-native/hooks.mdx +57 -82
  158. package/.docs/raw/docs/react-native/index.mdx +4 -4
  159. package/.docs/raw/docs/react-native/migration.mdx +1 -1
  160. package/.docs/raw/docs/react-native/primitives.mdx +2 -2
  161. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +7 -4
  162. package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
  163. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
  164. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
  165. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
  166. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
  167. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
  168. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +129 -1
  169. package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
  170. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
  171. package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
  172. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
  173. package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
  174. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
  175. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
  176. package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
  177. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
  178. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +2 -2
  179. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +1 -1
  180. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
  181. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
  182. package/.docs/raw/docs/runtimes/opencode/overview.mdx +2 -2
  183. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
  184. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
  185. package/.docs/raw/docs/tools/backend.mdx +136 -0
  186. package/.docs/raw/docs/tools/defining-tools.mdx +413 -0
  187. package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
  188. package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
  189. package/.docs/raw/docs/tools/index.mdx +76 -0
  190. package/.docs/raw/docs/{guides → tools}/interactables.mdx +3 -3
  191. package/.docs/raw/docs/tools/mcp-apps.mdx +231 -0
  192. package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
  193. package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +19 -21
  194. package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
  195. package/.docs/raw/docs/tools/user-managed-mcp.mdx +337 -0
  196. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
  197. package/.docs/raw/docs/ui/directive-text.mdx +3 -3
  198. package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
  199. package/.docs/raw/docs/ui/model-selector.mdx +8 -8
  200. package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
  201. package/.docs/raw/docs/ui/reasoning.mdx +4 -5
  202. package/.docs/raw/docs/ui/sources.mdx +17 -0
  203. package/.docs/raw/docs/ui/streamdown.mdx +34 -2
  204. package/.docs/raw/docs/ui/thread-list.mdx +2 -2
  205. package/.docs/raw/docs/ui/thread.mdx +2 -2
  206. package/.docs/raw/docs/ui/tool-group.mdx +5 -6
  207. package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
  208. package/README.md +14 -72
  209. package/dist/constants.d.ts +12 -9
  210. package/dist/constants.d.ts.map +1 -1
  211. package/dist/constants.js +13 -9
  212. package/dist/constants.js.map +1 -1
  213. package/dist/index.d.ts +7 -3
  214. package/dist/index.d.ts.map +1 -1
  215. package/dist/index.js +25 -24
  216. package/dist/index.js.map +1 -1
  217. package/dist/prepare-docs/code-examples.d.ts +4 -1
  218. package/dist/prepare-docs/code-examples.d.ts.map +1 -1
  219. package/dist/prepare-docs/code-examples.js +109 -121
  220. package/dist/prepare-docs/code-examples.js.map +1 -1
  221. package/dist/prepare-docs/copy-raw.d.ts +4 -1
  222. package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
  223. package/dist/prepare-docs/copy-raw.js +45 -42
  224. package/dist/prepare-docs/copy-raw.js.map +1 -1
  225. package/dist/prepare-docs/prepare.d.ts +1 -2
  226. package/dist/prepare-docs/prepare.js +17 -17
  227. package/dist/prepare-docs/prepare.js.map +1 -1
  228. package/dist/stdio.d.ts +1 -3
  229. package/dist/stdio.js +6 -3
  230. package/dist/stdio.js.map +1 -1
  231. package/dist/tools/docs.d.ts +20 -15
  232. package/dist/tools/docs.d.ts.map +1 -1
  233. package/dist/tools/docs.js +140 -161
  234. package/dist/tools/docs.js.map +1 -1
  235. package/dist/tools/examples.d.ts +20 -15
  236. package/dist/tools/examples.d.ts.map +1 -1
  237. package/dist/tools/examples.js +74 -86
  238. package/dist/tools/examples.js.map +1 -1
  239. package/dist/tools/tests/test-setup.d.ts +5 -2
  240. package/dist/tools/tests/test-setup.d.ts.map +1 -1
  241. package/dist/tools/tests/test-setup.js +21 -28
  242. package/dist/tools/tests/test-setup.js.map +1 -1
  243. package/dist/utils/logger.d.ts +8 -5
  244. package/dist/utils/logger.d.ts.map +1 -1
  245. package/dist/utils/logger.js +17 -17
  246. package/dist/utils/logger.js.map +1 -1
  247. package/dist/utils/mcp-format.d.ts +8 -5
  248. package/dist/utils/mcp-format.d.ts.map +1 -1
  249. package/dist/utils/mcp-format.js +9 -9
  250. package/dist/utils/mcp-format.js.map +1 -1
  251. package/dist/utils/mdx.d.ts +8 -6
  252. package/dist/utils/mdx.d.ts.map +1 -1
  253. package/dist/utils/mdx.js +22 -22
  254. package/dist/utils/mdx.js.map +1 -1
  255. package/dist/utils/paths.d.ts +9 -6
  256. package/dist/utils/paths.d.ts.map +1 -1
  257. package/dist/utils/paths.js +66 -76
  258. package/dist/utils/paths.js.map +1 -1
  259. package/dist/utils/security.d.ts +4 -1
  260. package/dist/utils/security.d.ts.map +1 -1
  261. package/dist/utils/security.js +19 -40
  262. package/dist/utils/security.js.map +1 -1
  263. package/package.json +5 -5
  264. package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
  265. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
  266. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
  267. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
  268. package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
  269. package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
  270. package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
  271. package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
  272. package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
  273. package/.docs/raw/docs/guides/tools.mdx +0 -675
  274. package/dist/prepare-docs/prepare.d.ts.map +0 -1
  275. package/dist/stdio.d.ts.map +0 -1
  276. /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
  277. /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
  278. /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
  279. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
  280. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
  281. /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: Tools API Reference
3
+ description: Tool definitions, React renderers, status helpers, and toolkits for exposing callable app capabilities to assistant-ui chat models.
4
+ ---
5
+
6
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
+ {/* The page list is generated from exported APIs; edit only the manual prose slot. */}
8
+
9
+ {/* api-manual:start */}
10
+ Use these APIs when your assistant needs to call application code, render a custom tool result, or expose tool state inside a React UI.
11
+
12
+ 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.
13
+
14
+ | | `Tools({ toolkit })` |
15
+ | --- | --- |
16
+ | Scope | Entire assistant subtree below the mount point |
17
+ | Lifecycle | Tied to the runtime / provider tree |
18
+ | Typical use | App-wide tools, dynamic scoped tools, MCP merging, tools defined alongside the runtime |
19
+ | Stable reference | Pass a stable `toolkit` (module scope or `useMemo`) |
20
+
21
+ `useAssistantTool`, `makeAssistantTool`, `useAssistantToolUI`, and `makeAssistantToolUI` are deprecated compatibility APIs. See [Migrating Tools to Toolkits](/docs/migrations/toolkit-tools).
22
+ {/* api-manual:end */}
23
+
24
+ ## Pages
25
+
26
+ <Cards>
27
+ <Card title={"Toolkits"} href={"/docs/api-reference/tools/toolkits"}>
28
+ {"Define model-facing tools and compose them into named toolkits registered with an assistant-ui runtime scope."}
29
+ </Card>
30
+ <Card title={"Component Tools"} href={"/docs/api-reference/tools/component-tools"}>
31
+ {"Register assistant tools from mounted React components, scoped to the lifetime of part of the UI tree."}
32
+ </Card>
33
+ <Card title={"Tool Rendering"} href={"/docs/api-reference/tools/rendering"}>
34
+ {"Register React renderers for assistant-ui tool calls, tool results, and model data parts."}
35
+ </Card>
36
+ <Card title={"Tool Status"} href={"/docs/api-reference/tools/status"}>
37
+ {"Read tool arguments, execution status, and result state inside assistant-ui tool UI components."}
38
+ </Card>
39
+ </Cards>
@@ -0,0 +1,127 @@
1
+ ---
2
+ title: Tool Rendering
3
+ description: Register React renderers for assistant-ui tool calls, tool results, and model data parts.
4
+ ---
5
+
6
+ import { McpAppRenderer, McpAppsRemoteHost, getMcpAppFromToolPart, useAssistantDataUI, useAssistantToolUI } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### DataRenderers
18
+
19
+ Registers renderers for `data` message parts.
20
+
21
+ Data renderers are looked up by the part's `name` field. Use this resource
22
+ directly for a renderer scope, or prefer [useAssistantDataUI](/docs/api-reference/tools/rendering#useassistantdataui) /
23
+ [makeAssistantDataUI](/docs/api-reference/tools/rendering#makeassistantdataui) when registering from React components.
24
+
25
+ ```ts
26
+ const DataRenderers: () => ResourceElement<ClientOutput<"dataRenderers">, undefined>;
27
+ ```
28
+
29
+ ### getMcpAppFromToolPart
30
+
31
+ Returns MCP app metadata for a tool-call part that points at a `ui://`
32
+ resource.
33
+
34
+ Returns `undefined` when the part has no MCP app metadata or the metadata
35
+ does not reference an assistant-ui MCP app resource.
36
+
37
+ <ParametersTable {...getMcpAppFromToolPart} />
38
+
39
+ ### makeAssistantDataUI
40
+
41
+ Creates a React component that registers a named data-part renderer when
42
+ rendered.
43
+
44
+ ```ts
45
+ type AssistantDataUIProps = {
46
+ /** Data part name this renderer handles. */
47
+ name: string;
48
+ /** Component rendered for matching data message parts. */
49
+ render: DataMessagePartComponent<T>;
50
+ };
51
+
52
+ const makeAssistantDataUI: <T = any>(dataUI: AssistantDataUIProps<T>) => AssistantDataUI;
53
+ ```
54
+
55
+ ### makeAssistantToolUI
56
+
57
+ <Callout type="warn">
58
+ <strong>Deprecated.</strong> Put `render`/`renderText` on the matching toolkit entry, or use
59
+ `MessagePrimitive.Parts` inline tool render overrides for per-message UI.
60
+ See https://assistant-ui.com/docs/migrations/toolkit-tools.
61
+ </Callout>
62
+
63
+ Creates a React component that registers a tool-call renderer when rendered.
64
+
65
+ Use this to package reusable display components for tools whose definitions
66
+ are registered elsewhere.
67
+
68
+ ```ts
69
+ type AssistantToolUIProps = {
70
+ /** Name of the tool whose calls should use this renderer. */
71
+ toolName: string;
72
+ /** Component rendered for matching tool-call message parts. */
73
+ render: ToolCallMessagePartComponent<TArgs, TResult>;
74
+ /**
75
+ * How the UI is presented relative to the chain-of-thought trace. Set
76
+ * `"standalone"` to surface it on its own (e.g. human-in-the-loop or
77
+ * generative UI for a backend/MCP tool). Defaults to `"inline"`.
78
+ */
79
+ display?: "standalone" | "inline";
80
+ };
81
+
82
+ const makeAssistantToolUI: <TArgs, TResult>(tool: AssistantToolUIProps<TArgs, TResult>) => AssistantToolUI;
83
+ ```
84
+
85
+ ### McpAppRenderer
86
+
87
+ Creates a tool-call renderer for MCP Apps embedded in assistant messages.
88
+
89
+ Compose this into the `Tools` resource through its `mcpApp` option. When a
90
+ tool-call part carries `mcp.app` metadata for a `ui://` resource, the
91
+ renderer loads that resource from the configured host and displays it in a
92
+ sandboxed frame.
93
+
94
+ <ParametersTable {...McpAppRenderer} />
95
+
96
+ ### McpAppsRemoteHost
97
+
98
+ Creates the default HTTP host for MCP App widgets.
99
+
100
+ The host POSTs widget requests to the configured route as `{ method,
101
+ params }`, using the method names expected by the assistant-ui MCP Apps
102
+ guide.
103
+
104
+ <ParametersTable {...McpAppsRemoteHost} />
105
+
106
+ ### useAssistantDataUI
107
+
108
+ Registers a renderer for named `data` message parts while the component is
109
+ mounted.
110
+
111
+ <ParametersTable {...useAssistantDataUI} />
112
+
113
+ ### useAssistantToolUI
114
+
115
+ <Callout type="warn">
116
+ <strong>Deprecated.</strong> Put `render`/`renderText` on the matching toolkit entry, or use
117
+ `MessagePrimitive.Parts` inline tool render overrides for per-message UI.
118
+ See https://assistant-ui.com/docs/migrations/toolkit-tools.
119
+ </Callout>
120
+
121
+ Registers a tool-call renderer while the component is mounted.
122
+
123
+ This only affects rendering. Pair it with [Tools](/docs/api-reference/tools/toolkits#tools) or a backend tool
124
+ registry to expose the actual tool definition to the model.
125
+
126
+ <ParametersTable {...useAssistantToolUI} />
127
+ {/* api-reference:end */}
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: Tool Status
3
+ description: Read tool arguments, execution status, and result state inside assistant-ui tool UI components.
4
+ ---
5
+
6
+
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### useToolArgsStatus
18
+
19
+ Reads whether each argument field for the current tool-call message part is
20
+ still streaming or complete.
21
+
22
+ Use inside a tool-call renderer to avoid showing incomplete argument values
23
+ as final.
24
+
25
+ ```tsx
26
+ function WeatherToolUI({
27
+ args,
28
+ }: ToolCallMessagePartProps<{ city: string }>) {
29
+ const { propStatus } = useToolArgsStatus<{ city: string }>();
30
+
31
+ return (
32
+ <span>
33
+ {propStatus.city === "streaming" ? "Reading city..." : args.city}
34
+ </span>
35
+ );
36
+ }
37
+ ```
38
+
39
+ ```ts
40
+ const useToolArgsStatus: <TArgs extends Record<string, unknown> = Record<string, unknown>>() => ToolArgsStatus<TArgs>;
41
+ ```
42
+ {/* api-reference:end */}
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: Toolkits
3
+ description: Define model-facing tools and compose them into named toolkits registered with an assistant-ui runtime scope.
4
+ ---
5
+
6
+ import { ToolDefinition, Tools, tool } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-manual:start */}
12
+ A `Toolkit` is a named map of model-facing tool definitions. The `Tools` resource installs a toolkit into an assistant subtree, registering each tool with the model context and each `render` component with the tool-call renderer scope.
13
+
14
+ Use these APIs when you want a tool's availability to follow your runtime or provider tree. The older component-scoped registration APIs are deprecated; see [Migrating Tools to Toolkits](/docs/migrations/toolkit-tools).
15
+ {/* api-manual:end */}
16
+
17
+ {/* api-reference:start */}
18
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
19
+ {/* Do not edit this block manually. */}
20
+
21
+ ## API Reference
22
+
23
+ ### tool
24
+
25
+ Defines a model tool with its argument schema, execution behavior, and
26
+ optional model-output conversion.
27
+
28
+ This helper keeps reusable tool definitions type-checked and convenient to
29
+ export for a [Toolkit](/docs/api-reference/tools/toolkits#toolkit) registered with [Tools](/docs/api-reference/tools/toolkits#tools).
30
+ Inference from parameter schemas is currently limited, so provide generic
31
+ arguments when you need precise args or result types.
32
+
33
+ ```ts
34
+ const getWeather = tool<{ city: string }, string>({
35
+ type: "frontend",
36
+ description: "Get the weather for a city.",
37
+ parameters: {
38
+ type: "object",
39
+ properties: { city: { type: "string" } },
40
+ required: ["city"],
41
+ },
42
+ execute: async ({ city }) => `Sunny in ${city}`,
43
+ });
44
+ ```
45
+
46
+ <ParametersTable {...tool} />
47
+
48
+ ### ToolDefinition
49
+
50
+ Tool definition accepted by the React tool registry.
51
+
52
+ Extends the core tool contract with tool-call display options. Human tools
53
+ rely on `render` to collect input from the user. Frontend tools execute in
54
+ the browser and require either `render` or `renderText` for their progress
55
+ and result. Backend tools execute server-side and may omit a renderer.
56
+
57
+ <ParametersTable {...ToolDefinition} />
58
+
59
+ ### Toolkit
60
+
61
+ Named collection of tools exposed to the assistant model.
62
+
63
+ Keys are the tool names the model receives and uses in tool calls.
64
+
65
+ ```tsx
66
+ const toolkit = {
67
+ get_weather: {
68
+ type: "frontend",
69
+ description: "Get the weather for a city.",
70
+ parameters: weatherSchema,
71
+ execute: async ({ city }: { city: string }) => fetchWeather(city),
72
+ render: WeatherToolUI,
73
+ },
74
+ } satisfies Toolkit;
75
+ ```
76
+
77
+ ```ts
78
+ type Toolkit = Record<string, ToolDefinition<any, any>>;
79
+ ```
80
+
81
+ ### Tools
82
+
83
+ Registers tools with model context and installs tool-call renderers.
84
+
85
+ Mount this resource near an assistant subtree when you want to expose a
86
+ group of tools declaratively. Tool definitions are registered with model
87
+ context, while each tool renderer is registered with the tools scope for
88
+ message rendering.
89
+
90
+ <ParametersTable {...Tools} />
91
+ {/* api-reference:end */}
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: Assistant Transport
3
+ description: Command, protocol, and transport types for connecting assistant-ui runtimes across execution boundaries.
4
+ ---
5
+
6
+ import { AssistantTransportCommand, AssistantTransportConnectionMetadata, AssistantTransportProtocol, SendCommandsRequestBody, useAssistantTransportRuntime } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### AssistantTransportCommand
18
+
19
+ <ParametersTable {...AssistantTransportCommand} />
20
+
21
+ ### AssistantTransportConnectionMetadata
22
+
23
+ <ParametersTable {...AssistantTransportConnectionMetadata} />
24
+
25
+ ### AssistantTransportProtocol
26
+
27
+ <ParametersTable {...AssistantTransportProtocol} />
28
+
29
+ ### SendCommandsRequestBody
30
+
31
+ <ParametersTable {...SendCommandsRequestBody} />
32
+
33
+ ### useAssistantTransportRuntime
34
+
35
+ <ParametersTable {...useAssistantTransportRuntime} />
36
+
37
+ ### useAssistantTransportSendCommand
38
+
39
+ ```ts
40
+ const useAssistantTransportSendCommand: () => (command: AssistantTransportCommand) => void;
41
+ ```
42
+
43
+ ### useAssistantTransportState
44
+
45
+ ```ts
46
+ function useAssistantTransportState(): UserExternalState;
47
+ ```
48
+ {/* api-reference:end */}
@@ -0,0 +1,62 @@
1
+ ---
2
+ title: Assistant Frame
3
+ description: Frame bridge APIs and serialized message types for embedding assistant-ui runtimes in external contexts.
4
+ ---
5
+
6
+ import { AssistantFrameHost, AssistantFrameProvider, FrameMessage, SerializedModelContext, SerializedTool, useAssistantFrameHost } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### AssistantFrameHost
18
+
19
+ <ParametersTable {...AssistantFrameHost} />
20
+
21
+ ### AssistantFrameProvider
22
+
23
+ <ParametersTable {...AssistantFrameProvider} />
24
+
25
+ ### FRAME_MESSAGE_CHANNEL
26
+
27
+ ```ts
28
+ const FRAME_MESSAGE_CHANNEL: "assistant-ui-frame";
29
+ ```
30
+
31
+ ### FrameMessage
32
+
33
+ <ParametersTable {...FrameMessage} />
34
+
35
+ ### SerializedModelContext
36
+
37
+ <ParametersTable {...SerializedModelContext} />
38
+
39
+ ### SerializedTool
40
+
41
+ <ParametersTable {...SerializedTool} />
42
+
43
+ ### useAssistantFrameHost
44
+
45
+ React hook that manages the lifecycle of an AssistantFrameHost and its binding to the current AssistantRuntime.
46
+
47
+ Usage example:
48
+ ```typescript
49
+ function MyComponent() {
50
+ const iframeRef = useRef<HTMLIFrameElement>(null);
51
+
52
+ useAssistantFrameHost({
53
+ iframeRef,
54
+ targetOrigin: "https://trusted-domain.com", // optional
55
+ });
56
+
57
+ return <iframe ref={iframeRef} src="..." />;
58
+ }
59
+ ```
60
+
61
+ <ParametersTable {...useAssistantFrameHost} />
62
+ {/* api-reference:end */}
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Transport API Reference
3
+ description: Transport commands, frame messages, and protocol types for synchronizing assistant-ui runtimes across process or iframe boundaries.
4
+ ---
5
+
6
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
+ {/* The page list is generated from exported APIs; edit only the manual prose slot. */}
8
+
9
+ {/* api-manual:start */}
10
+ Transport APIs are for runtimes that cross a network, worker, iframe, or other execution boundary. They document the command and frame contracts that keep assistant-ui state synchronized with an external process.
11
+ {/* api-manual:end */}
12
+
13
+ ## Pages
14
+
15
+ <Cards>
16
+ <Card title={"Assistant Transport"} href={"/docs/api-reference/transport/assistant-transport"}>
17
+ {"Command, protocol, and transport types for connecting assistant-ui runtimes across execution boundaries."}
18
+ </Card>
19
+ <Card title={"Assistant Frame"} href={"/docs/api-reference/transport/frame"}>
20
+ {"Frame bridge APIs and serialized message types for embedding assistant-ui runtimes in external contexts."}
21
+ </Card>
22
+ </Cards>
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: Utilities API Reference
3
+ description: Utility exports for custom rendering, composition, and advanced assistant-ui behavior that does not fit a larger API family.
4
+ ---
5
+
6
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
+ {/* The page list is generated from exported APIs; edit only the manual prose slot. */}
8
+
9
+ {/* api-manual:start */}
10
+ Utilities collect small public exports that are useful when building custom assistant-ui components but do not belong to a larger feature area. Start here when you recognize an export name but not its surrounding API family.
11
+ {/* api-manual:end */}
12
+
13
+ ## Pages
14
+
15
+ <Cards>
16
+ <Card title={"Utilities"} href={"/docs/api-reference/utilities/miscellaneous"}>
17
+ {"Miscellaneous @assistant-ui/react utilities for custom rendering, composition, and advanced assistant UI behavior."}
18
+ </Card>
19
+ </Cards>
@@ -0,0 +1,143 @@
1
+ ---
2
+ title: Utilities
3
+ description: Miscellaneous @assistant-ui/react utilities for custom rendering, composition, and advanced assistant UI behavior.
4
+ ---
5
+
6
+ import { AssistantCloud, ChainOfThoughtClient, DevToolsHooks, InMemoryThreadList, SingleThreadList, defineMcpToolkit, defineToolkit, providerTool } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### AssistantCloud
18
+
19
+ <ParametersTable {...AssistantCloud} />
20
+
21
+ ### ChainOfThoughtClient
22
+
23
+ <ParametersTable {...ChainOfThoughtClient} />
24
+
25
+ ### defineMcpToolkit
26
+
27
+ Defines MCP server tools as a spreadable toolkit fragment.
28
+
29
+ <ParametersTable {...defineMcpToolkit} />
30
+
31
+ ### defineToolkit
32
+
33
+ Authoring helper for a `"use generative"` toolkit. Accepts the permissive
34
+ ToolkitDefinition (a `backend` tool may carry its server `execute`)
35
+ and types the result as the canonical [Toolkit](/docs/api-reference/tools/toolkits#toolkit).
36
+
37
+ It has **no runtime implementation**. A `"use generative"` compiler (e.g.
38
+ `@assistant-ui/next` or `@assistant-ui/vite`) strips the `defineToolkit(...)`
39
+ wrapper (and its import) per build, so a correctly compiled
40
+ `export default defineToolkit({...})` never calls this. If it *does* run, the
41
+ module was not compiled by a use-generative loader — e.g. `defineToolkit` used
42
+ outside a `"use generative"` file — which would ship a backend `execute` to the
43
+ client. So it throws instead of silently leaking.
44
+
45
+ <ParametersTable {...defineToolkit} />
46
+
47
+ ### DevToolsHooks
48
+
49
+ <ParametersTable {...DevToolsHooks} />
50
+
51
+ ### hitl
52
+
53
+ <Callout type="warn">
54
+ <strong>Deprecated.</strong> Use [hitlTool](/docs/api-reference/utilities/miscellaneous#hitltool).
55
+ </Callout>
56
+
57
+ ```ts
58
+ const hitl: typeof hitlTool;
59
+ ```
60
+
61
+ ### hitlTool
62
+
63
+ Marks a tool as **human-in-the-loop**: the agent pauses and the UI (`render`)
64
+ supplies the result instead of code. Use it as the tool's `execute`:
65
+
66
+ ```tsx
67
+ confirm: { execute: hitlTool(), render: (props) => <Confirm {...props} /> }
68
+ ```
69
+
70
+ Like [defineToolkit](/docs/api-reference/utilities/miscellaneous#definetoolkit), it has **no runtime implementation**: a
71
+ `"use generative"` compiler (e.g. `@assistant-ui/next` or `@assistant-ui/vite`)
72
+ detects `execute: hitlTool()`, drops it, and stamps the tool `type: "human"`.
73
+ Reaching it at runtime means the module wasn't compiled (used outside a
74
+ `"use generative"` file), so it throws.
75
+
76
+ ```ts
77
+ function hitlTool(): never;
78
+ ```
79
+
80
+ ### InMemoryThreadList
81
+
82
+ <ParametersTable {...InMemoryThreadList} />
83
+
84
+ ### Interactables
85
+
86
+ ```ts
87
+ const Interactables: () => ResourceElement<ClientOutput<"interactables">, undefined>;
88
+ ```
89
+
90
+ ### providerTool
91
+
92
+ Marks a tool as provider-executed. The use-generative compiler converts
93
+ `execute: providerTool(...)` into a `type: "provider"` tool entry.
94
+
95
+ <ParametersTable {...providerTool} />
96
+
97
+ ### SingleThreadList
98
+
99
+ A minimal threads scope that wraps a single thread.
100
+ Automatically provided by ExternalThread when no threads scope exists.
101
+ Mounts the provided thread resource element.
102
+
103
+ <ParametersTable {...SingleThreadList} />
104
+
105
+ ### stubTool
106
+
107
+ Marks a generative toolkit entry as a frontend tool whose executor will be
108
+ supplied by `useAuiToolOverrides(...)`.
109
+
110
+ `stubTool()` has no runtime implementation. It must be used inside a
111
+ `"use generative"` toolkit file so the compiler can strip it.
112
+
113
+ ```ts
114
+ function stubTool(): never;
115
+ ```
116
+
117
+ ### Suggestions
118
+
119
+ ```ts
120
+ const Suggestions: {
121
+ (): ResourceElement<
122
+ ClientOutput<"suggestions">,
123
+ undefined
124
+ >;
125
+ (
126
+ suggestions: SuggestionConfig[],
127
+ ): ResourceElement<
128
+ ClientOutput<"suggestions">,
129
+ SuggestionConfig[]
130
+ >;
131
+ };
132
+ ```
133
+
134
+ ### unstable_defaultDirectiveFormatter
135
+
136
+ Default directive formatter using the `:type[label]{name=id}` syntax.
137
+
138
+ When `id` equals `label`, the `{name=…}` attribute is omitted for brevity.
139
+
140
+ ```ts
141
+ const unstable_defaultDirectiveFormatter: Unstable_DirectiveFormatter;
142
+ ```
143
+ {/* api-reference:end */}
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Voice API Reference
3
+ description: Realtime voice, speech synthesis, and dictation contracts for wiring spoken assistant flows into React chat UIs.
4
+ ---
5
+
6
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
+ {/* The page list is generated from exported APIs; edit only the manual prose slot. */}
8
+
9
+ {/* api-manual:start */}
10
+ Voice APIs cover the state and adapters needed for spoken assistant experiences. Use this section when connecting realtime voice sessions, speech synthesis controls, or dictation input to an assistant-ui runtime.
11
+ {/* api-manual:end */}
12
+
13
+ ## Pages
14
+
15
+ <Cards>
16
+ <Card title={"Voice Sessions"} href={"/docs/api-reference/voice/session"}>
17
+ {"Create and control realtime assistant-ui voice sessions, state, controls, and helpers."}
18
+ </Card>
19
+ <Card title={"Speech and Dictation"} href={"/docs/api-reference/voice/speech-dictation"}>
20
+ {"Connect speech synthesis and dictation adapters to assistant-ui voice and composer workflows."}
21
+ </Card>
22
+ </Cards>
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: Voice Sessions
3
+ description: Create and control realtime assistant-ui voice sessions, state, controls, and helpers.
4
+ ---
5
+
6
+ import { RealtimeVoiceAdapter, VoiceSessionControls, VoiceSessionHelpers, VoiceSessionState, createVoiceSession } from "@/generated/typeDocs";
7
+
8
+ {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
+ {/* Do not edit manually. */}
10
+
11
+ {/* api-reference:start */}
12
+ {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
+ {/* Do not edit this block manually. */}
14
+
15
+ ## API Reference
16
+
17
+ ### createVoiceSession
18
+
19
+ <ParametersTable {...createVoiceSession} />
20
+
21
+ ### RealtimeVoiceAdapter
22
+
23
+ <ParametersTable {...RealtimeVoiceAdapter} />
24
+
25
+ ### useVoiceControls
26
+
27
+ ```ts
28
+ const useVoiceControls: () => { connect: () => void; disconnect: () => void; mute: () => void; unmute: () => void; };
29
+ ```
30
+
31
+ ### useVoiceState
32
+
33
+ ```ts
34
+ const useVoiceState: () => VoiceSessionState;
35
+ ```
36
+
37
+ ### useVoiceVolume
38
+
39
+ ```ts
40
+ const useVoiceVolume: () => number;
41
+ ```
42
+
43
+ ### VoiceSessionControls
44
+
45
+ <ParametersTable {...VoiceSessionControls} />
46
+
47
+ ### VoiceSessionHelpers
48
+
49
+ <ParametersTable {...VoiceSessionHelpers} />
50
+
51
+ ### VoiceSessionState
52
+
53
+ <ParametersTable {...VoiceSessionState} />
54
+ {/* api-reference:end */}