@assistant-ui/mcp-docs-server 0.2.1 → 0.2.3

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 (187) hide show
  1. package/.docs/organized/code-examples/waterfall.md +3 -3
  2. package/.docs/organized/code-examples/with-a2a.md +5 -4
  3. package/.docs/organized/code-examples/with-ag-ui.md +7 -6
  4. package/.docs/organized/code-examples/with-ai-sdk-v7.md +14 -13
  5. package/.docs/organized/code-examples/with-artifacts.md +12 -11
  6. package/.docs/organized/code-examples/with-assistant-transport.md +6 -5
  7. package/.docs/organized/code-examples/with-browser-extension.md +6 -6
  8. package/.docs/organized/code-examples/with-chain-of-thought.md +16 -14
  9. package/.docs/organized/code-examples/with-cloud-standalone.md +7 -7
  10. package/.docs/organized/code-examples/with-cloud.md +11 -10
  11. package/.docs/organized/code-examples/with-custom-thread-list.md +11 -10
  12. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +14 -13
  13. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +15 -14
  14. package/.docs/organized/code-examples/with-eve.md +6 -5
  15. package/.docs/organized/code-examples/with-expo.md +213 -36
  16. package/.docs/organized/code-examples/with-external-store.md +6 -5
  17. package/.docs/organized/code-examples/with-ffmpeg.md +11 -10
  18. package/.docs/organized/code-examples/with-generative-ui.md +263 -29
  19. package/.docs/organized/code-examples/with-google-adk.md +5 -4
  20. package/.docs/organized/code-examples/with-heat-graph.md +3 -3
  21. package/.docs/organized/code-examples/with-image-generation.md +8 -7
  22. package/.docs/organized/code-examples/with-interactables.md +11 -10
  23. package/.docs/organized/code-examples/with-langchain.md +10 -9
  24. package/.docs/organized/code-examples/with-langgraph.md +7 -6
  25. package/.docs/organized/code-examples/with-livekit.md +15 -14
  26. package/.docs/organized/code-examples/with-mcp.md +14 -12
  27. package/.docs/organized/code-examples/with-nuxt.md +511 -575
  28. package/.docs/organized/code-examples/with-opencode.md +4 -4
  29. package/.docs/organized/code-examples/with-openui.md +450 -0
  30. package/.docs/organized/code-examples/with-pi.md +6 -5
  31. package/.docs/organized/code-examples/with-react-hook-form.md +16 -13
  32. package/.docs/organized/code-examples/with-react-ink-web.md +65 -15
  33. package/.docs/organized/code-examples/with-react-ink.md +5 -4
  34. package/.docs/organized/code-examples/with-react-router.md +8 -7
  35. package/.docs/organized/code-examples/with-resumable-stream.md +13 -12
  36. package/.docs/organized/code-examples/with-store.md +3 -3
  37. package/.docs/organized/code-examples/with-svelte.md +415 -0
  38. package/.docs/organized/code-examples/with-sveltekit.md +1061 -0
  39. package/.docs/organized/code-examples/with-tanstack.md +10 -9
  40. package/.docs/organized/code-examples/with-tap-runtime.md +5 -4
  41. package/.docs/organized/code-examples/with-virtualized-thread.md +6 -5
  42. package/.docs/organized/code-examples/with-vue.md +2 -2
  43. package/.docs/raw/docs/{(docs) → (getting-started)}/cli.mdx +6 -1
  44. package/.docs/raw/docs/{(docs) → (getting-started)}/devtools.mdx +1 -1
  45. package/.docs/raw/docs/{(docs) → (getting-started)}/index.mdx +4 -2
  46. package/.docs/raw/docs/{(docs) → (getting-started)}/installation.mdx +26 -26
  47. package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +6 -0
  48. package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +1 -1
  49. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +6 -1
  50. package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +5 -1
  51. package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +9 -2
  52. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +2 -2
  53. package/.docs/raw/docs/(reference)/api-reference/integrations/{react-ai-sdk.mdx → ai-sdk.mdx} +43 -18
  54. package/.docs/raw/docs/(reference)/api-reference/integrations/eve.mdx +61 -2
  55. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +3 -3
  56. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +2 -2
  57. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +20 -2
  58. package/.docs/raw/docs/(reference)/api-reference/tools/interactables.mdx +1 -1
  59. package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +1 -1
  60. package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +1 -1
  61. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +32 -1
  62. package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +1 -1
  63. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +10 -10
  64. package/.docs/raw/docs/cloud/ai-sdk.mdx +4 -2
  65. package/.docs/raw/docs/cloud/index.mdx +1 -1
  66. package/.docs/raw/docs/copilots/assistant-frame.mdx +19 -8
  67. package/.docs/raw/docs/guides/attachments.mdx +4 -4
  68. package/.docs/raw/docs/guides/branching.mdx +1 -1
  69. package/.docs/raw/docs/guides/chatgpt-subscription.mdx +1 -1
  70. package/.docs/raw/docs/guides/context-api.mdx +15 -17
  71. package/.docs/raw/docs/guides/dictation.mdx +2 -2
  72. package/.docs/raw/docs/guides/electron.mdx +1 -1
  73. package/.docs/raw/docs/guides/latex.mdx +1 -1
  74. package/.docs/raw/docs/guides/mentions.mdx +2 -0
  75. package/.docs/raw/docs/guides/message-timing.mdx +11 -5
  76. package/.docs/raw/docs/guides/quoting.mdx +1 -1
  77. package/.docs/raw/docs/guides/resumable-streams.mdx +3 -3
  78. package/.docs/raw/docs/guides/speech.mdx +1 -1
  79. package/.docs/raw/docs/guides/suggestions.mdx +8 -5
  80. package/.docs/raw/docs/guides/voice.mdx +1 -1
  81. package/.docs/raw/docs/ink/hooks.mdx +1 -1
  82. package/.docs/raw/docs/ink/index.mdx +3 -2
  83. package/.docs/raw/docs/ink/migration.mdx +1 -1
  84. package/.docs/raw/docs/ink/primitives.mdx +1 -1
  85. package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +3 -3
  86. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +3 -3
  87. package/.docs/raw/docs/integrations/frameworks/{cloudflare-agents/overview.mdx → cloudflare-agents.mdx} +4 -3
  88. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +1 -1
  89. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
  90. package/.docs/raw/docs/integrations/index.mdx +2 -2
  91. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +149 -131
  92. package/.docs/raw/docs/migrations/toolkit-tools.mdx +2 -2
  93. package/.docs/raw/docs/migrations/v0-15.mdx +34 -0
  94. package/.docs/raw/docs/primitives/action-bar.mdx +1 -1
  95. package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -1
  96. package/.docs/raw/docs/primitives/attachment.mdx +1 -1
  97. package/.docs/raw/docs/primitives/branch-picker.mdx +1 -1
  98. package/.docs/raw/docs/primitives/chain-of-thought.mdx +3 -3
  99. package/.docs/raw/docs/primitives/composer.mdx +1 -1
  100. package/.docs/raw/docs/primitives/error.mdx +1 -1
  101. package/.docs/raw/docs/primitives/message.mdx +1 -1
  102. package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -1
  103. package/.docs/raw/docs/primitives/suggestion.mdx +4 -2
  104. package/.docs/raw/docs/primitives/thread-list.mdx +1 -1
  105. package/.docs/raw/docs/primitives/thread.mdx +2 -2
  106. package/.docs/raw/docs/react-native/adapters.mdx +1 -1
  107. package/.docs/raw/docs/react-native/index.mdx +2 -2
  108. package/.docs/raw/docs/react-native/migration.mdx +2 -2
  109. package/.docs/raw/docs/react-native/primitives.mdx +142 -5
  110. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +48 -6
  111. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +3 -3
  112. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +4 -4
  113. package/.docs/raw/docs/runtimes/ai-sdk/v7.mdx +31 -16
  114. package/.docs/raw/docs/runtimes/claude-managed-agents.mdx +118 -0
  115. package/.docs/raw/docs/runtimes/concepts/adapters.mdx +3 -3
  116. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +3 -3
  117. package/.docs/raw/docs/runtimes/concepts/stability.mdx +2 -1
  118. package/.docs/raw/docs/runtimes/concepts/threads.mdx +73 -33
  119. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +1 -1
  120. package/.docs/raw/docs/runtimes/custom/external-store.mdx +6 -2
  121. package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
  122. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +4 -0
  123. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
  124. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +9 -2
  125. package/.docs/raw/docs/tools/backend.mdx +4 -4
  126. package/.docs/raw/docs/tools/defining-tools.mdx +21 -2
  127. package/.docs/raw/docs/tools/generative-ui-primitive.mdx +180 -0
  128. package/.docs/raw/docs/tools/generative-ui-slack.mdx +167 -0
  129. package/.docs/raw/docs/tools/generative-ui-teams.mdx +160 -0
  130. package/.docs/raw/docs/tools/generative-ui.mdx +224 -211
  131. package/.docs/raw/docs/tools/index.mdx +2 -1
  132. package/.docs/raw/docs/tools/interactables.mdx +8 -7
  133. package/.docs/raw/docs/tools/mcp-apps.mdx +18 -1
  134. package/.docs/raw/docs/tools/mcp.mdx +2 -2
  135. package/.docs/raw/docs/tools/openui.mdx +175 -0
  136. package/.docs/raw/docs/tools/tool-ui.mdx +18 -7
  137. package/.docs/raw/docs/tools/user-managed-mcp.mdx +7 -3
  138. package/.docs/raw/docs/ui/assistant-modal.mdx +3 -3
  139. package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -1
  140. package/.docs/raw/docs/ui/attachment.mdx +50 -3
  141. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +36 -1
  142. package/.docs/raw/docs/ui/context-display.mdx +1 -1
  143. package/.docs/raw/docs/ui/directive-text.mdx +1 -1
  144. package/.docs/raw/docs/ui/file.mdx +2 -2
  145. package/.docs/raw/docs/ui/follow-up-suggestions.mdx +1 -1
  146. package/.docs/raw/docs/ui/image.mdx +2 -2
  147. package/.docs/raw/docs/ui/markdown.mdx +40 -1
  148. package/.docs/raw/docs/ui/mermaid.mdx +1 -1
  149. package/.docs/raw/docs/ui/message-timing.mdx +1 -1
  150. package/.docs/raw/docs/ui/model-selector.mdx +4 -4
  151. package/.docs/raw/docs/ui/part-grouping.mdx +1 -1
  152. package/.docs/raw/docs/ui/quote.mdx +3 -3
  153. package/.docs/raw/docs/ui/reasoning.mdx +31 -3
  154. package/.docs/raw/docs/ui/scrollbar.mdx +1 -1
  155. package/.docs/raw/docs/ui/sources.mdx +10 -1
  156. package/.docs/raw/docs/ui/streamdown.mdx +2 -2
  157. package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -1
  158. package/.docs/raw/docs/ui/thread-list.mdx +40 -1
  159. package/.docs/raw/docs/ui/thread.mdx +49 -2
  160. package/.docs/raw/docs/ui/tool-fallback.mdx +23 -9
  161. package/.docs/raw/docs/ui/tool-group.mdx +1 -1
  162. package/.docs/raw/docs/ui/voice.mdx +1 -1
  163. package/.docs/raw/docs/utilities/react-o11y.mdx +2 -2
  164. package/dist/xulux/catalog-client.d.ts.map +1 -1
  165. package/dist/xulux/catalog-client.js +51 -6
  166. package/dist/xulux/catalog-client.js.map +1 -1
  167. package/dist/xulux/types.d.ts +7 -7
  168. package/dist/xulux/types.d.ts.map +1 -1
  169. package/dist/xulux/types.js.map +1 -1
  170. package/package.json +5 -5
  171. package/src/tools/tests/docs.test.ts +10 -7
  172. package/src/tools/tests/path-traversal.test.ts +5 -2
  173. package/src/tools/tests/xulux-templates.test.ts +63 -0
  174. package/src/xulux/catalog-client.ts +68 -23
  175. package/src/xulux/types.ts +17 -13
  176. package/.docs/raw/docs/tools/interactables-legacy.mdx +0 -423
  177. package/.docs/raw/docs/ui/accordion.mdx +0 -266
  178. package/.docs/raw/docs/ui/badge.mdx +0 -150
  179. package/.docs/raw/docs/ui/diff-viewer.mdx +0 -280
  180. package/.docs/raw/docs/ui/dot-matrix.mdx +0 -133
  181. package/.docs/raw/docs/ui/number-roll.mdx +0 -154
  182. package/.docs/raw/docs/ui/select.mdx +0 -254
  183. package/.docs/raw/docs/ui/tabs.mdx +0 -271
  184. /package/.docs/raw/docs/{(docs) → (getting-started)}/architecture.mdx +0 -0
  185. /package/.docs/raw/docs/{(docs) → (getting-started)}/base-ui.mdx +0 -0
  186. /package/.docs/raw/docs/{(docs) → (getting-started)}/llm.mdx +0 -0
  187. /package/.docs/raw/docs/{(docs) → (getting-started)}/rtl.mdx +0 -0
@@ -1902,8 +1902,8 @@ export default withAui(nextConfig);
1902
1902
  "@pierre/diffs": "^1.3.5",
1903
1903
  "class-variance-authority": "^0.7.1",
1904
1904
  "clsx": "^2.1.1",
1905
- "lucide-react": "^1.29.0",
1906
- "next": "^16.3.0",
1905
+ "lucide-react": "^1.33.0",
1906
+ "next": "^16.3.2",
1907
1907
  "react": "^19.2.8",
1908
1908
  "react-dom": "^19.2.8",
1909
1909
  "tailwind-merge": "^3.6.0",
@@ -1913,9 +1913,9 @@ export default withAui(nextConfig);
1913
1913
  "@assistant-ui/next": "workspace:*",
1914
1914
  "@assistant-ui/x-buildutils": "workspace:*",
1915
1915
  "@tailwindcss/postcss": "^4.3.3",
1916
- "@types/node": "^26.1.2",
1916
+ "@types/node": "^26.2.0",
1917
1917
  "@types/react": "^19.2.18",
1918
- "@types/react-dom": "^19.2.4",
1918
+ "@types/react-dom": "^19.2.5",
1919
1919
  "postcss": "^8.5.26",
1920
1920
  "tailwindcss": "^4.3.3",
1921
1921
  "tw-animate-css": "^1.4.0",
@@ -0,0 +1,450 @@
1
+ # Example: with-openui
2
+
3
+ ## app/api/chat/route.ts
4
+
5
+ ```typescript
6
+ import { openai } from "@ai-sdk/openai";
7
+ import { frontendTools } from "@assistant-ui/ai-sdk";
8
+ import {
9
+ type JSONSchema7,
10
+ streamText,
11
+ convertToModelMessages,
12
+ type UIMessage,
13
+ createUIMessageStreamResponse,
14
+ toUIMessageStream,
15
+ } from "ai";
16
+
17
+ // Allow streaming responses up to 30 seconds
18
+ export const maxDuration = 30;
19
+
20
+ export async function POST(req: Request) {
21
+ const {
22
+ messages,
23
+ system,
24
+ tools,
25
+ }: {
26
+ messages: UIMessage[];
27
+ system?: string;
28
+ tools?: Record<string, { description?: string; parameters: JSONSchema7 }>;
29
+ } = await req.json();
30
+
31
+ const result = streamText({
32
+ model: openai("gpt-5.6-luna"),
33
+ messages: await convertToModelMessages(messages),
34
+ ...(system ? { system } : {}),
35
+ tools: frontendTools(tools ?? {}),
36
+ });
37
+
38
+ return createUIMessageStreamResponse({
39
+ stream: toUIMessageStream({ stream: result.stream }),
40
+ });
41
+ }
42
+
43
+ ```
44
+
45
+ ## app/globals.css
46
+
47
+ ```css
48
+ @import "tailwindcss";
49
+ @import "tw-animate-css";
50
+ @import "@openuidev/react-ui/layered/styles/index.css";
51
+
52
+ @source "../../../packages/ui/src";
53
+
54
+ @custom-variant dark (&:is(.dark *));
55
+
56
+ @theme inline {
57
+ --radius-sm: calc(var(--radius) - 4px);
58
+ --radius-md: calc(var(--radius) - 2px);
59
+ --radius-lg: var(--radius);
60
+ --radius-xl: calc(var(--radius) + 4px);
61
+ --color-background: var(--background);
62
+ --color-foreground: var(--foreground);
63
+ --color-card: var(--card);
64
+ --color-card-foreground: var(--card-foreground);
65
+ --color-popover: var(--popover);
66
+ --color-popover-foreground: var(--popover-foreground);
67
+ --color-primary: var(--primary);
68
+ --color-primary-foreground: var(--primary-foreground);
69
+ --color-secondary: var(--secondary);
70
+ --color-secondary-foreground: var(--secondary-foreground);
71
+ --color-muted: var(--muted);
72
+ --color-muted-foreground: var(--muted-foreground);
73
+ --color-accent: var(--accent);
74
+ --color-accent-foreground: var(--accent-foreground);
75
+ --color-destructive: var(--destructive);
76
+ --color-border: var(--border);
77
+ --color-input: var(--input);
78
+ --color-ring: var(--ring);
79
+ --color-chart-1: var(--chart-1);
80
+ --color-chart-2: var(--chart-2);
81
+ --color-chart-3: var(--chart-3);
82
+ --color-chart-4: var(--chart-4);
83
+ --color-chart-5: var(--chart-5);
84
+ --color-sidebar: var(--sidebar);
85
+ --color-sidebar-foreground: var(--sidebar-foreground);
86
+ --color-sidebar-primary: var(--sidebar-primary);
87
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
88
+ --color-sidebar-accent: var(--sidebar-accent);
89
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
90
+ --color-sidebar-border: var(--sidebar-border);
91
+ --color-sidebar-ring: var(--sidebar-ring);
92
+ }
93
+
94
+ :root {
95
+ --radius: 0.625rem;
96
+ --background: oklch(1 0 0);
97
+ --foreground: oklch(0.141 0.005 285.823);
98
+ --card: oklch(1 0 0);
99
+ --card-foreground: oklch(0.141 0.005 285.823);
100
+ --popover: oklch(1 0 0);
101
+ --popover-foreground: oklch(0.141 0.005 285.823);
102
+ --primary: oklch(0.21 0.006 285.885);
103
+ --primary-foreground: oklch(0.985 0 0);
104
+ --secondary: oklch(0.967 0.001 286.375);
105
+ --secondary-foreground: oklch(0.21 0.006 285.885);
106
+ --muted: oklch(0.967 0.001 286.375);
107
+ --muted-foreground: oklch(0.552 0.016 285.938);
108
+ --accent: oklch(0.967 0.001 286.375);
109
+ --accent-foreground: oklch(0.21 0.006 285.885);
110
+ --destructive: oklch(0.577 0.245 27.325);
111
+ --border: oklch(0.92 0.004 286.32);
112
+ --input: oklch(0.92 0.004 286.32);
113
+ --ring: oklch(0.705 0.015 286.067);
114
+ --chart-1: oklch(0.646 0.222 41.116);
115
+ --chart-2: oklch(0.6 0.118 184.704);
116
+ --chart-3: oklch(0.398 0.07 227.392);
117
+ --chart-4: oklch(0.828 0.189 84.429);
118
+ --chart-5: oklch(0.769 0.188 70.08);
119
+ --sidebar: oklch(0.985 0 0);
120
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
121
+ --sidebar-primary: oklch(0.21 0.006 285.885);
122
+ --sidebar-primary-foreground: oklch(0.985 0 0);
123
+ --sidebar-accent: oklch(0.967 0.001 286.375);
124
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
125
+ --sidebar-border: oklch(0.92 0.004 286.32);
126
+ --sidebar-ring: oklch(0.705 0.015 286.067);
127
+ }
128
+
129
+ .dark {
130
+ --background: oklch(0.141 0.005 285.823);
131
+ --foreground: oklch(0.985 0 0);
132
+ --card: oklch(0.21 0.006 285.885);
133
+ --card-foreground: oklch(0.985 0 0);
134
+ --popover: oklch(0.21 0.006 285.885);
135
+ --popover-foreground: oklch(0.985 0 0);
136
+ --primary: oklch(0.92 0.004 286.32);
137
+ --primary-foreground: oklch(0.21 0.006 285.885);
138
+ --secondary: oklch(0.274 0.006 286.033);
139
+ --secondary-foreground: oklch(0.985 0 0);
140
+ --muted: oklch(0.274 0.006 286.033);
141
+ --muted-foreground: oklch(0.705 0.015 286.067);
142
+ --accent: oklch(0.274 0.006 286.033);
143
+ --accent-foreground: oklch(0.985 0 0);
144
+ --destructive: oklch(0.704 0.191 22.216);
145
+ --border: oklch(1 0 0 / 10%);
146
+ --input: oklch(1 0 0 / 15%);
147
+ --ring: oklch(0.552 0.016 285.938);
148
+ --chart-1: oklch(0.488 0.243 264.376);
149
+ --chart-2: oklch(0.696 0.17 162.48);
150
+ --chart-3: oklch(0.769 0.188 70.08);
151
+ --chart-4: oklch(0.627 0.265 303.9);
152
+ --chart-5: oklch(0.645 0.246 16.439);
153
+ --sidebar: oklch(0.21 0.006 285.885);
154
+ --sidebar-foreground: oklch(0.985 0 0);
155
+ --sidebar-primary: oklch(0.488 0.243 264.376);
156
+ --sidebar-primary-foreground: oklch(0.985 0 0);
157
+ --sidebar-accent: oklch(0.274 0.006 286.033);
158
+ --sidebar-accent-foreground: oklch(0.985 0 0);
159
+ --sidebar-border: oklch(1 0 0 / 10%);
160
+ --sidebar-ring: oklch(0.552 0.016 285.938);
161
+ }
162
+
163
+ @layer base {
164
+ * {
165
+ @apply border-border outline-ring/50;
166
+ }
167
+ body {
168
+ @apply bg-background text-foreground;
169
+ }
170
+ }
171
+
172
+ ```
173
+
174
+ ## app/layout.tsx
175
+
176
+ ```tsx
177
+ import type { Metadata } from "next";
178
+ import "./globals.css";
179
+
180
+ export const metadata: Metadata = {
181
+ title: "OpenUI Example",
182
+ description:
183
+ "Example using @assistant-ui/react with the OpenUI renderer via @openuidev/assistant-ui",
184
+ };
185
+
186
+ export default function RootLayout({
187
+ children,
188
+ }: Readonly<{
189
+ children: React.ReactNode;
190
+ }>) {
191
+ return (
192
+ <html lang="en">
193
+ <body className="h-dvh">{children}</body>
194
+ </html>
195
+ );
196
+ }
197
+
198
+ ```
199
+
200
+ ## app/page.tsx
201
+
202
+ ```tsx
203
+ "use client";
204
+
205
+ import { Thread } from "@/components/assistant-ui/thread";
206
+ import {
207
+ AssistantRuntimeProvider,
208
+ AuiConfig,
209
+ Suggestions,
210
+ Tools,
211
+ } from "@assistant-ui/react";
212
+ import { useChatRuntime } from "@assistant-ui/ai-sdk";
213
+ import { OpenUIInstructions, openuiIntegration } from "@openuidev/assistant-ui";
214
+ import { shouldContinueAfterOpenUIPrompt } from "@openuidev/assistant-ui/ai-sdk";
215
+
216
+ export default function Home() {
217
+ const runtime = useChatRuntime({
218
+ sendAutomaticallyWhen: shouldContinueAfterOpenUIPrompt,
219
+ });
220
+
221
+ const config = AuiConfig({
222
+ tools: Tools({ toolkit: openuiIntegration.toolkit }),
223
+ suggestions: Suggestions([
224
+ {
225
+ title: "Trip summary",
226
+ label: "as a display-only card",
227
+ prompt:
228
+ "Show a trip summary for my Tokyo trip: flying March 14 to 21, staying at Park Hyatt Tokyo at $310 a night, total budget $4,200, with three confirmed activities: teamLab Planets, a Tsukiji food tour, and a Hakone day trip.",
229
+ },
230
+ {
231
+ title: "Pick a slot",
232
+ label: "with an interactive choice",
233
+ prompt:
234
+ "Ask me to pick a meeting slot from Tuesday 10:00, Wednesday 14:30, or Friday 09:15.",
235
+ },
236
+ {
237
+ title: "Registration form",
238
+ label: "collect structured input",
239
+ prompt:
240
+ "Collect my conference registration with a form: full name, email, company, and a t-shirt size choice of S, M, L, or XL.",
241
+ },
242
+ {
243
+ title: "Sprint metrics",
244
+ label: "summarized visually",
245
+ prompt:
246
+ "Summarize our sprint: 34 of 41 planned issues closed, velocity 62 points versus 55 last sprint, 3 escaped bugs, and a median cycle time of 2.4 days.",
247
+ },
248
+ ]),
249
+ });
250
+
251
+ return (
252
+ <AssistantRuntimeProvider config={config} runtime={runtime}>
253
+ <OpenUIInstructions />
254
+ <div className="h-full">
255
+ <Thread />
256
+ </div>
257
+ </AssistantRuntimeProvider>
258
+ );
259
+ }
260
+
261
+ ```
262
+
263
+ ## components.json
264
+
265
+ ```json
266
+ {
267
+ "$schema": "https://ui.shadcn.com/schema.json",
268
+ "style": "new-york",
269
+ "rsc": true,
270
+ "tsx": true,
271
+ "tailwind": {
272
+ "config": "",
273
+ "css": "app/globals.css",
274
+ "baseColor": "zinc",
275
+ "cssVariables": true,
276
+ "prefix": ""
277
+ },
278
+ "aliases": {
279
+ "components": "@/components",
280
+ "utils": "@/lib/utils",
281
+ "ui": "@/components/ui",
282
+ "lib": "@/lib",
283
+ "hooks": "@/hooks"
284
+ },
285
+ "iconLibrary": "lucide",
286
+ "registries": {
287
+ "@assistant-ui": "https://r.assistant-ui.com/{name}.json"
288
+ }
289
+ }
290
+
291
+ ```
292
+
293
+ ## next.config.js
294
+
295
+ ```javascript
296
+ /** @type {import('next').NextConfig} */
297
+ const nextConfig = {
298
+ transpilePackages: ["@assistant-ui/react", "@assistant-ui/ai-sdk"],
299
+ };
300
+
301
+ export default nextConfig;
302
+
303
+ ```
304
+
305
+ ## package.json
306
+
307
+ ```json
308
+ {
309
+ "name": "with-openui",
310
+ "version": "0.0.0",
311
+ "private": true,
312
+ "type": "module",
313
+ "scripts": {
314
+ "dev": "next dev",
315
+ "build": "next build",
316
+ "start": "next start"
317
+ },
318
+ "dependencies": {
319
+ "@ai-sdk/openai": "^4.0.46",
320
+ "@assistant-ui/ai-sdk": "workspace:*",
321
+ "@assistant-ui/react": "workspace:*",
322
+ "@assistant-ui/react-markdown": "workspace:*",
323
+ "@assistant-ui/ui": "workspace:*",
324
+ "@openuidev/assistant-ui": "^0.0.3",
325
+ "@openuidev/react-headless": "^0.9.11",
326
+ "@openuidev/react-lang": "^0.2.14",
327
+ "@openuidev/react-ui": "^0.13.8",
328
+ "ai": "^7.0.77",
329
+ "class-variance-authority": "^0.7.1",
330
+ "clsx": "^2.1.1",
331
+ "lucide-react": "^1.33.0",
332
+ "next": "^16.3.2",
333
+ "react": "^19.2.8",
334
+ "react-dom": "^19.2.8",
335
+ "tailwind-merge": "^3.6.0",
336
+ "zod": "^4.4.3",
337
+ "zustand": "^5.0.15"
338
+ },
339
+ "devDependencies": {
340
+ "@assistant-ui/x-buildutils": "workspace:*",
341
+ "@tailwindcss/postcss": "^4.3.3",
342
+ "@types/node": "^26.2.0",
343
+ "@types/react": "^19.2.18",
344
+ "@types/react-dom": "^19.2.5",
345
+ "postcss": "^8.5.26",
346
+ "tailwindcss": "^4.3.3",
347
+ "tw-animate-css": "^1.4.0",
348
+ "typescript": "^7.0.2"
349
+ }
350
+ }
351
+
352
+ ```
353
+
354
+ ## README.md
355
+
356
+ ```markdown
357
+ # OpenUI Example
358
+
359
+ This example renders streaming [OpenUI Lang](https://www.openui.com) interfaces inside an assistant-ui conversation using [`@openuidev/assistant-ui`](https://www.npmjs.com/package/@openuidev/assistant-ui), the integration package published and maintained by OpenUI.
360
+
361
+ assistant-ui owns the chat shell, runtime, messages, streaming, and tool lifecycle. OpenUI renders the `ui` argument of two tool calls: `present_openui` for display-only interfaces and `prompt_openui` for forms and choices that wait for the user to submit.
362
+
363
+ ## Quick Start
364
+
365
+ ### Using CLI (Recommended)
366
+
367
+ ```bash
368
+ npx assistant-ui@latest create my-app --example with-openui
369
+ cd my-app
370
+ ```
371
+
372
+ ### Environment Variables
373
+
374
+ Create `.env.local`:
375
+
376
+ ```sh
377
+ OPENAI_API_KEY=your-api-key-here
378
+ ```
379
+
380
+ ### Run
381
+
382
+ ```bash
383
+ pnpm install
384
+ pnpm dev
385
+ ```
386
+
387
+ Open [http://localhost:3000](http://localhost:3000) to see the result.
388
+
389
+ ### Run inside the monorepo
390
+
391
+ To develop against the workspace packages directly, clone the repository and build the packages the example imports before starting the dev server. Create `examples/with-openui/.env.local` with your `OPENAI_API_KEY` first.
392
+
393
+ ```bash
394
+ git clone https://github.com/assistant-ui/assistant-ui.git
395
+ cd assistant-ui
396
+ pnpm install
397
+ pnpm exec turbo build --filter='with-openui^...'
398
+ pnpm -C examples/with-openui dev
399
+ ```
400
+
401
+ ## Key Features
402
+
403
+ - Registers `openuiIntegration.toolkit` so the model can call `present_openui` and `prompt_openui`
404
+ - Mounts `OpenUIInstructions` so the model learns the OpenUI component vocabulary through assistant instructions
405
+ - Uses `sendAutomaticallyWhen: shouldContinueAfterOpenUIPrompt` so a display-only call ends the turn while an interactive submission continues the conversation
406
+ - Forwards the instructions and both frontend tools to the backend through `AssistantChatTransport`, so the API route stays generic
407
+ - Loads the OpenUI layered stylesheet once in `app/globals.css`
408
+
409
+ ## How it works
410
+
411
+ - `app/page.tsx` wires the runtime, toolkit, instructions, and suggestions
412
+ - `app/api/chat/route.ts` streams with the AI SDK and exposes the forwarded frontend tools with `frontendTools`
413
+ - Submitted form state is returned through `addResult` and hydrates again on replay
414
+
415
+ ## Related Documentation
416
+
417
+ - [assistant-ui OpenUI guide](https://www.assistant-ui.com/docs/tools/openui)
418
+ - [OpenUI assistant-ui integration reference](https://www.openui.com/docs/api-reference/assistant-ui)
419
+
420
+ ```
421
+
422
+ ## tsconfig.json
423
+
424
+ ```json
425
+ {
426
+ "extends": "@assistant-ui/x-buildutils/ts/next",
427
+ "compilerOptions": {
428
+ "paths": {
429
+ "@/*": ["./*"],
430
+ "@/components/assistant-ui/*": [
431
+ "../../packages/ui/src/components/assistant-ui/*"
432
+ ],
433
+ "@/hooks/*": ["../../packages/ui/src/hooks/*"],
434
+ "@/components/ui/*": [
435
+ "../../packages/ui/src/components/ui/base/*",
436
+ "../../packages/ui/src/components/ui/radix/*"
437
+ ],
438
+ "@/components/ui/radix/*": [
439
+ "../../packages/ui/src/components/ui/radix/*"
440
+ ],
441
+ "@/lib/utils": ["../../packages/ui/src/lib/utils"],
442
+ "@assistant-ui/ui/*": ["../../packages/ui/src/*"]
443
+ }
444
+ },
445
+ "include": ["**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
446
+ "exclude": ["node_modules"]
447
+ }
448
+
449
+ ```
450
+
@@ -1961,11 +1961,11 @@ export default withAui(nextConfig);
1961
1961
  "@assistant-ui/react-markdown": "workspace:*",
1962
1962
  "@assistant-ui/react-pi": "workspace:*",
1963
1963
  "@assistant-ui/ui": "workspace:*",
1964
- "@earendil-works/pi-coding-agent": "^0.84.1",
1964
+ "@earendil-works/pi-coding-agent": "^0.84.2",
1965
1965
  "class-variance-authority": "^0.7.1",
1966
1966
  "clsx": "^2.1.1",
1967
- "lucide-react": "^1.29.0",
1968
- "next": "^16.3.0",
1967
+ "lucide-react": "^1.33.0",
1968
+ "next": "^16.3.2",
1969
1969
  "radix-ui": "^1.6.7",
1970
1970
  "react": "^19.2.8",
1971
1971
  "react-dom": "^19.2.8",
@@ -1975,9 +1975,9 @@ export default withAui(nextConfig);
1975
1975
  "@assistant-ui/next": "workspace:*",
1976
1976
  "@assistant-ui/x-buildutils": "workspace:*",
1977
1977
  "@tailwindcss/postcss": "^4.3.3",
1978
- "@types/node": "^26.1.2",
1978
+ "@types/node": "^26.2.0",
1979
1979
  "@types/react": "^19.2.18",
1980
- "@types/react-dom": "^19.2.4",
1980
+ "@types/react-dom": "^19.2.5",
1981
1981
  "postcss": "^8.5.26",
1982
1982
  "tailwindcss": "^4.3.3",
1983
1983
  "tw-animate-css": "^1.4.0",
@@ -2064,6 +2064,7 @@ Point it at a scratch directory.
2064
2064
  "@/components/assistant-ui/*": [
2065
2065
  "../../packages/ui/src/components/assistant-ui/*"
2066
2066
  ],
2067
+ "@/hooks/*": ["../../packages/ui/src/hooks/*"],
2067
2068
  "@/components/ui/*": [
2068
2069
  "../../packages/ui/src/components/ui/base/*",
2069
2070
  "../../packages/ui/src/components/ui/radix/*"
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```typescript
6
6
  import { createOpenAI } from "@ai-sdk/openai";
7
- import { frontendTools } from "@assistant-ui/react-ai-sdk";
7
+ import { frontendTools } from "@assistant-ui/ai-sdk";
8
8
  import { convertToModelMessages, streamText } from "ai";
9
9
 
10
10
  export const maxDuration = 30;
@@ -18,7 +18,7 @@ export async function POST(req: Request) {
18
18
  const { messages, system, tools } = await req.json();
19
19
 
20
20
  const result = streamText({
21
- model: openai("gpt-5.4-nano"),
21
+ model: openai("gpt-5.6-luna"),
22
22
  messages: await convertToModelMessages(messages),
23
23
  system,
24
24
  tools: {
@@ -212,7 +212,7 @@ export default function RootLayout({
212
212
  "use client";
213
213
 
214
214
  import { AssistantRuntimeProvider } from "@assistant-ui/react";
215
- import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
215
+ import { useChatRuntime } from "@assistant-ui/ai-sdk";
216
216
 
217
217
  export function MyRuntimeProvider({
218
218
  children,
@@ -617,29 +617,31 @@ export default withAui(nextConfig);
617
617
  "start": "next start"
618
618
  },
619
619
  "dependencies": {
620
- "@ai-sdk/openai": "^4.0.34",
620
+ "@ai-sdk/openai": "^4.0.46",
621
+ "@assistant-ui/ai-sdk": "workspace:*",
621
622
  "@assistant-ui/react": "workspace:*",
622
- "@assistant-ui/react-ai-sdk": "workspace:*",
623
623
  "@assistant-ui/react-hook-form": "workspace:*",
624
624
  "@assistant-ui/react-markdown": "workspace:*",
625
625
  "@assistant-ui/ui": "workspace:*",
626
- "ai": "^7.0.56",
626
+ "@hookform/resolvers": "^5.9.1",
627
+ "ai": "^7.0.77",
627
628
  "class-variance-authority": "^0.7.1",
628
629
  "clsx": "^2.1.1",
629
- "lucide-react": "^1.29.0",
630
- "next": "^16.3.0",
630
+ "lucide-react": "^1.33.0",
631
+ "next": "^16.3.2",
631
632
  "react": "^19.2.8",
632
633
  "react-dom": "^19.2.8",
633
- "react-hook-form": "^7.84.0",
634
- "tailwind-merge": "^3.6.0"
634
+ "react-hook-form": "^7.86.0",
635
+ "tailwind-merge": "^3.6.0",
636
+ "zod": "^4.4.3"
635
637
  },
636
638
  "devDependencies": {
637
639
  "@assistant-ui/next": "workspace:*",
638
640
  "@assistant-ui/x-buildutils": "workspace:*",
639
641
  "@tailwindcss/postcss": "^4.3.3",
640
- "@types/node": "^26.1.2",
642
+ "@types/node": "^26.2.0",
641
643
  "@types/react": "^19.2.18",
642
- "@types/react-dom": "^19.2.4",
644
+ "@types/react-dom": "^19.2.5",
643
645
  "postcss": "^8.5.26",
644
646
  "tailwindcss": "^4.3.3",
645
647
  "tw-animate-css": "^1.4.0",
@@ -690,7 +692,7 @@ npm run dev
690
692
  ## Related Documentation
691
693
 
692
694
  - [assistant-ui Documentation](https://www.assistant-ui.com/docs)
693
- - [React Hook Form Integration](https://www.assistant-ui.com/docs/integrations/react-hook-form)
695
+ - [Form-Filling AI Copilot Example](https://www.assistant-ui.com/examples/form-demo)
694
696
 
695
697
  ```
696
698
 
@@ -705,6 +707,7 @@ npm run dev
705
707
  "@/components/assistant-ui/*": [
706
708
  "../../packages/ui/src/components/assistant-ui/*"
707
709
  ],
710
+ "@/hooks/*": ["../../packages/ui/src/hooks/*"],
708
711
  "@/components/ui/*": [
709
712
  "../../packages/ui/src/components/ui/base/*",
710
713
  "../../packages/ui/src/components/ui/radix/*"