@assistant-ui/mcp-docs-server 0.1.32 → 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 (112) hide show
  1. package/.docs/organized/code-examples/waterfall.md +15 -17
  2. package/.docs/organized/code-examples/with-a2a.md +19 -19
  3. package/.docs/organized/code-examples/with-ag-ui.md +25 -20
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +6 -4
  5. package/.docs/organized/code-examples/with-artifacts.md +34 -28
  6. package/.docs/organized/code-examples/with-assistant-transport.md +59 -47
  7. package/.docs/organized/code-examples/with-browser-extension.md +17 -5
  8. package/.docs/organized/code-examples/with-chain-of-thought.md +376 -78
  9. package/.docs/organized/code-examples/with-cloud-standalone.md +20 -19
  10. package/.docs/organized/code-examples/with-cloud.md +6 -4
  11. package/.docs/organized/code-examples/with-custom-thread-list.md +9 -7
  12. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +18 -16
  13. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +9 -8
  14. package/.docs/organized/code-examples/with-expo.md +23 -17
  15. package/.docs/organized/code-examples/with-external-store.md +4 -2
  16. package/.docs/organized/code-examples/with-ffmpeg.md +317 -280
  17. package/.docs/organized/code-examples/with-generative-ui.md +1018 -214
  18. package/.docs/organized/code-examples/with-google-adk.md +4 -2
  19. package/.docs/organized/code-examples/with-heat-graph.md +8 -6
  20. package/.docs/organized/code-examples/with-image-generation.md +19 -17
  21. package/.docs/organized/code-examples/with-interactables.md +312 -234
  22. package/.docs/organized/code-examples/with-langchain.md +9 -7
  23. package/.docs/organized/code-examples/with-langgraph.md +82 -78
  24. package/.docs/organized/code-examples/with-livekit.md +19 -17
  25. package/.docs/organized/code-examples/with-mcp.md +13 -7
  26. package/.docs/organized/code-examples/with-opencode.md +61 -61
  27. package/.docs/organized/code-examples/with-react-hook-form.md +14 -12
  28. package/.docs/organized/code-examples/with-react-ink.md +2 -2
  29. package/.docs/organized/code-examples/with-react-router.md +11 -9
  30. package/.docs/organized/code-examples/with-resumable-stream.md +10 -9
  31. package/.docs/organized/code-examples/with-store.md +14 -12
  32. package/.docs/organized/code-examples/with-tanstack.md +8 -9
  33. package/.docs/organized/code-examples/with-tap-runtime.md +21 -19
  34. package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
  35. package/.docs/raw/docs/(docs)/cli.mdx +1 -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)/installation.mdx +1 -1
  39. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +5 -1
  40. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +14 -14
  41. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +11 -1
  42. package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
  43. package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
  44. package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
  45. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +41 -41
  46. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +19 -1
  47. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +122 -122
  48. package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +32 -2
  49. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +6 -0
  50. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +4 -6
  51. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +30 -0
  52. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +20 -3
  53. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +8 -8
  54. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +52 -4
  55. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +6 -7
  56. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +58 -46
  57. package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -2
  58. package/.docs/raw/docs/guides/chain-of-thought.mdx +7 -9
  59. package/.docs/raw/docs/guides/context-api.mdx +2 -1
  60. package/.docs/raw/docs/guides/index.mdx +3 -12
  61. package/.docs/raw/docs/guides/mentions.mdx +4 -4
  62. package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
  63. package/.docs/raw/docs/guides/suggestions.mdx +1 -1
  64. package/.docs/raw/docs/ink/hooks.mdx +98 -85
  65. package/.docs/raw/docs/ink/migration.mdx +1 -1
  66. package/.docs/raw/docs/ink/primitives.mdx +2 -2
  67. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +1 -1
  68. package/.docs/raw/docs/integrations/index.mdx +2 -2
  69. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
  70. package/.docs/raw/docs/migrations/toolkit-tools.mdx +226 -0
  71. package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
  72. package/.docs/raw/docs/primitives/message.mdx +9 -10
  73. package/.docs/raw/docs/react-native/hooks.mdx +57 -82
  74. package/.docs/raw/docs/react-native/migration.mdx +1 -1
  75. package/.docs/raw/docs/react-native/primitives.mdx +2 -2
  76. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +3 -0
  77. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +122 -1
  78. package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
  79. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
  80. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
  81. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
  82. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +1 -1
  83. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
  84. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
  85. package/.docs/raw/docs/tools/backend.mdx +136 -0
  86. package/.docs/raw/docs/tools/defining-tools.mdx +413 -0
  87. package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
  88. package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
  89. package/.docs/raw/docs/tools/index.mdx +76 -0
  90. package/.docs/raw/docs/{guides → tools}/interactables.mdx +1 -1
  91. package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
  92. package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +17 -19
  93. package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
  94. package/.docs/raw/docs/{integrations/tools/react-mcp.mdx → tools/user-managed-mcp.mdx} +3 -3
  95. package/.docs/raw/docs/ui/directive-text.mdx +3 -3
  96. package/.docs/raw/docs/ui/mcp-config.mdx +4 -4
  97. package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
  98. package/.docs/raw/docs/ui/reasoning.mdx +4 -5
  99. package/.docs/raw/docs/ui/tool-group.mdx +5 -6
  100. package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/prepare-docs/code-examples.d.ts.map +1 -1
  103. package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
  104. package/dist/utils/paths.d.ts.map +1 -1
  105. package/package.json +3 -3
  106. package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
  107. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
  108. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
  109. package/.docs/raw/docs/guides/generative-ui.mdx +0 -142
  110. package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
  111. package/.docs/raw/docs/guides/tools.mdx +0 -736
  112. /package/.docs/raw/docs/{guides → tools}/mcp-apps.mdx +0 -0
@@ -476,9 +476,8 @@ async function createStore(): Promise<ResumableStreamStore> {
476
476
  }
477
477
 
478
478
  const { createClient } = await import("redis");
479
- const { createRedisResumableStreamStore } = await import(
480
- "assistant-stream/resumable/redis"
481
- );
479
+ const { createRedisResumableStreamStore } =
480
+ await import("assistant-stream/resumable/redis");
482
481
 
483
482
  const client = createClient({ url });
484
483
  client.on("error", (err) => {
@@ -493,10 +492,11 @@ async function createStore(): Promise<ResumableStreamStore> {
493
492
  ## next.config.js
494
493
 
495
494
  ```javascript
495
+ import { withAui } from "@assistant-ui/next";
496
496
  /** @type {import('next').NextConfig} */
497
497
  const nextConfig = {};
498
498
 
499
- export default nextConfig;
499
+ export default withAui(nextConfig);
500
500
 
501
501
  ```
502
502
 
@@ -514,27 +514,28 @@ export default nextConfig;
514
514
  "start": "next start"
515
515
  },
516
516
  "dependencies": {
517
- "@ai-sdk/openai": "^3.0.64",
518
- "@ai-sdk/react": "^3.0.190",
517
+ "@ai-sdk/openai": "^3.0.67",
518
+ "@ai-sdk/react": "^3.0.195",
519
519
  "@assistant-ui/react": "workspace:*",
520
520
  "@assistant-ui/react-ai-sdk": "workspace:*",
521
521
  "@assistant-ui/react-markdown": "workspace:*",
522
522
  "@assistant-ui/store": "workspace:*",
523
523
  "@assistant-ui/tap": "workspace:*",
524
524
  "@assistant-ui/ui": "workspace:*",
525
- "ai": "^6.0.188",
525
+ "ai": "^6.0.193",
526
526
  "assistant-stream": "workspace:*",
527
527
  "class-variance-authority": "^0.7.1",
528
528
  "clsx": "^2.1.1",
529
- "lucide-react": "^1.16.0",
529
+ "lucide-react": "^1.17.0",
530
530
  "next": "^16.2.6",
531
531
  "react": "^19.2.6",
532
532
  "react-dom": "^19.2.6",
533
- "redis": "^5.12.1",
533
+ "redis": "^6.0.0",
534
534
  "tailwind-merge": "^3.6.0",
535
535
  "zod": "^4.4.3"
536
536
  },
537
537
  "devDependencies": {
538
+ "@assistant-ui/next": "workspace:*",
538
539
  "@assistant-ui/x-buildutils": "workspace:*",
539
540
  "@tailwindcss/postcss": "^4.3.0",
540
541
  "@types/node": "^25.9.1",
@@ -82,10 +82,10 @@ export default function Home() {
82
82
  <div className="min-h-screen bg-linear-to-br from-gray-50 to-gray-100 p-8 dark:from-gray-900 dark:to-gray-800">
83
83
  <div className="mx-auto max-w-4xl">
84
84
  <div className="mb-8">
85
- <h1 className="mb-2 font-bold text-4xl text-gray-900 dark:text-white">
85
+ <h1 className="mb-2 text-4xl font-bold text-gray-900 dark:text-white">
86
86
  @assistant-ui/store Example
87
87
  </h1>
88
- <p className="text-gray-600 text-lg dark:text-gray-400">
88
+ <p className="text-lg text-gray-600 dark:text-gray-400">
89
89
  Demonstrating tap-based state management with scopes, lists, and
90
90
  providers
91
91
  </p>
@@ -134,15 +134,15 @@ const Foo = () => {
134
134
  <div className="rounded-lg border border-gray-200 bg-white p-6 shadow-md transition-shadow hover:shadow-lg dark:border-gray-700 dark:bg-gray-800">
135
135
  <div className="space-y-3">
136
136
  <div className="flex items-center gap-2">
137
- <span className="font-semibold text-gray-500 text-sm dark:text-gray-400">
137
+ <span className="text-sm font-semibold text-gray-500 dark:text-gray-400">
138
138
  ID:
139
139
  </span>
140
- <span className="font-mono text-gray-900 text-sm dark:text-white">
140
+ <span className="font-mono text-sm text-gray-900 dark:text-white">
141
141
  {fooId}
142
142
  </span>
143
143
  </div>
144
144
  <div className="flex items-center gap-2">
145
- <span className="font-semibold text-gray-500 text-sm dark:text-gray-400">
145
+ <span className="text-sm font-semibold text-gray-500 dark:text-gray-400">
146
146
  Value:
147
147
  </span>
148
148
  <span className="text-gray-900 dark:text-white">{fooBar}</span>
@@ -151,14 +151,14 @@ const Foo = () => {
151
151
  <button
152
152
  type="button"
153
153
  onClick={handleUpdate}
154
- className="flex-1 rounded-md bg-blue-600 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
154
+ className="flex-1 rounded-md bg-blue-600 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:outline-none dark:focus:ring-offset-gray-800"
155
155
  >
156
156
  Update
157
157
  </button>
158
158
  <button
159
159
  type="button"
160
160
  onClick={() => aui.foo().remove()}
161
- className="rounded-md bg-red-600 px-4 py-2 font-medium text-white transition-colors hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
161
+ className="rounded-md bg-red-600 px-4 py-2 font-medium text-white transition-colors hover:bg-red-700 focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:outline-none dark:focus:ring-offset-gray-800"
162
162
  >
163
163
  Delete
164
164
  </button>
@@ -183,7 +183,7 @@ const AddFooButton = () => {
183
183
  <button
184
184
  type="button"
185
185
  onClick={() => aui.fooList().addFoo()}
186
- className="rounded-md bg-green-600 px-4 py-2 font-medium text-white transition-colors hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800"
186
+ className="rounded-md bg-green-600 px-4 py-2 font-medium text-white transition-colors hover:bg-green-700 focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:outline-none dark:focus:ring-offset-gray-800"
187
187
  >
188
188
  Add New
189
189
  </button>
@@ -224,7 +224,7 @@ const EventLog = () => {
224
224
  </h3>
225
225
  <div className="max-h-48 space-y-2 overflow-y-auto">
226
226
  {logs.length === 0 ? (
227
- <p className="text-gray-500 text-sm dark:text-gray-400">
227
+ <p className="text-sm text-gray-500 dark:text-gray-400">
228
228
  No events yet. Try updating or deleting a foo.
229
229
  </p>
230
230
  ) : (
@@ -266,12 +266,12 @@ export const ExampleApp = () => {
266
266
  <div className="space-y-6">
267
267
  <div className="rounded-lg border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-700 dark:bg-gray-800">
268
268
  <div className="flex items-center justify-between">
269
- <h2 className="font-semibold text-gray-900 text-xl dark:text-white">
269
+ <h2 className="text-xl font-semibold text-gray-900 dark:text-white">
270
270
  Foo List <FooListLength />
271
271
  </h2>
272
272
  <AddFooButton />
273
273
  </div>
274
- <p className="mt-1 text-gray-600 text-sm dark:text-gray-400">
274
+ <p className="mt-1 text-sm text-gray-600 dark:text-gray-400">
275
275
  Each item is rendered in its own FooProvider with scoped access
276
276
  </p>
277
277
  </div>
@@ -465,13 +465,14 @@ export const FooList = ({
465
465
  ## next.config.ts
466
466
 
467
467
  ```typescript
468
+ import { withAui } from "@assistant-ui/next";
468
469
  import type { NextConfig } from "next";
469
470
 
470
471
  const nextConfig: NextConfig = {
471
472
  /* config options here */
472
473
  };
473
474
 
474
- export default nextConfig;
475
+ export default withAui(nextConfig);
475
476
 
476
477
  ```
477
478
 
@@ -496,6 +497,7 @@ export default nextConfig;
496
497
  "react-dom": "^19.2.6"
497
498
  },
498
499
  "devDependencies": {
500
+ "@assistant-ui/next": "workspace:*",
499
501
  "@assistant-ui/x-buildutils": "workspace:*",
500
502
  "@tailwindcss/postcss": "^4.3.0",
501
503
  "@types/node": "^25.9.1",
@@ -65,13 +65,13 @@
65
65
  "@assistant-ui/react": "workspace:*",
66
66
  "@assistant-ui/react-markdown": "workspace:*",
67
67
  "@tailwindcss/vite": "^4.3.0",
68
- "@tanstack/react-router": "^1.170.6",
69
- "@tanstack/react-start": "^1.168.9",
68
+ "@tanstack/react-router": "^1.170.10",
69
+ "@tanstack/react-start": "^1.168.18",
70
70
  "class-variance-authority": "^0.7.1",
71
71
  "clsx": "^2.1.1",
72
- "lucide-react": "^1.16.0",
72
+ "lucide-react": "^1.17.0",
73
73
  "nitro": "^3.0.260311-beta",
74
- "openai": "^6.38.0",
74
+ "openai": "^6.39.1",
75
75
  "react": "^19.2.6",
76
76
  "react-dom": "^19.2.6",
77
77
  "remark-gfm": "^4.0.1",
@@ -303,7 +303,6 @@ export const Route = createRootRoute({
303
303
  function RootDocument({ children }: { children: React.ReactNode }) {
304
304
  return (
305
305
  <html lang="en">
306
- {/* biome-ignore lint/style/noHeadElement: TanStack Start uses standard HTML head */}
307
306
  <head>
308
307
  <HeadContent />
309
308
  </head>
@@ -556,15 +555,16 @@ export const chatStream = createServerFn({ method: "POST" })
556
555
  }
557
556
  body {
558
557
  @apply bg-background text-foreground m-0;
559
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
558
+ font-family:
559
+ -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
560
560
  "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
561
561
  sans-serif;
562
562
  -webkit-font-smoothing: antialiased;
563
563
  -moz-osx-font-smoothing: grayscale;
564
564
  }
565
565
  code {
566
- font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
567
- monospace;
566
+ font-family:
567
+ source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
568
568
  }
569
569
  }
570
570
 
@@ -737,7 +737,6 @@ export const chatStream = createServerFn({ method: "POST" })
737
737
  {
738
738
  "extends": "@assistant-ui/x-buildutils/ts/base",
739
739
  "compilerOptions": {
740
- "types": ["vite/client"],
741
740
  "paths": {
742
741
  "@/*": ["./src/*"],
743
742
  "@/components/assistant-ui/*": [
@@ -363,7 +363,7 @@ export function MyRuntimeProvider({ children }: { children: React.ReactNode }) {
363
363
  {children}
364
364
 
365
365
  {/* Control panel */}
366
- <div className="border-t bg-card p-4">
366
+ <div className="bg-card border-t p-4">
367
367
  <div className="mx-auto flex max-w-2xl flex-col gap-2">
368
368
  <div className="flex items-center gap-2">
369
369
  <span className="text-muted-foreground text-sm">Controls:</span>
@@ -379,7 +379,7 @@ export function MyRuntimeProvider({ children }: { children: React.ReactNode }) {
379
379
  },
380
380
  ]);
381
381
  }}
382
- className="rounded-md bg-primary px-3 py-1 font-medium text-primary-foreground text-sm hover:bg-primary/90"
382
+ className="bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 py-1 text-sm font-medium"
383
383
  >
384
384
  Add User Message
385
385
  </button>
@@ -397,21 +397,21 @@ export function MyRuntimeProvider({ children }: { children: React.ReactNode }) {
397
397
  },
398
398
  ]);
399
399
  }}
400
- className="rounded-md bg-secondary px-3 py-1 font-medium text-secondary-foreground text-sm hover:bg-secondary/80"
400
+ className="bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md px-3 py-1 text-sm font-medium"
401
401
  >
402
402
  Add Assistant Message
403
403
  </button>
404
404
  <button
405
405
  type="button"
406
406
  onClick={() => setIsRunning(!isRunning)}
407
- className="rounded-md bg-accent px-3 py-1 font-medium text-accent-foreground text-sm hover:bg-accent/80"
407
+ className="bg-accent text-accent-foreground hover:bg-accent/80 rounded-md px-3 py-1 text-sm font-medium"
408
408
  >
409
409
  {isRunning ? "Stop" : "Start"} Running
410
410
  </button>
411
411
  <button
412
412
  type="button"
413
413
  onClick={() => updateCurrentThreadMessages(() => [])}
414
- className="rounded-md bg-destructive px-3 py-1 font-medium text-sm text-white hover:bg-destructive/90"
414
+ className="bg-destructive hover:bg-destructive/90 rounded-md px-3 py-1 text-sm font-medium text-white"
415
415
  >
416
416
  Clear
417
417
  </button>
@@ -431,9 +431,9 @@ export function MyRuntimeProvider({ children }: { children: React.ReactNode }) {
431
431
 
432
432
  function ThreadListSidebar() {
433
433
  return (
434
- <ThreadListPrimitive.Root className="flex w-64 flex-col border-r bg-muted/30">
434
+ <ThreadListPrimitive.Root className="bg-muted/30 flex w-64 flex-col border-r">
435
435
  <div className="border-b p-4">
436
- <h2 className="font-semibold text-lg">Threads</h2>
436
+ <h2 className="text-lg font-semibold">Threads</h2>
437
437
  </div>
438
438
 
439
439
  <div className="flex-1 overflow-y-auto p-2">
@@ -443,7 +443,7 @@ function ThreadListSidebar() {
443
443
  </div>
444
444
 
445
445
  <div className="border-t p-2">
446
- <ThreadListPrimitive.New className="w-full rounded-md bg-primary px-3 py-2 font-medium text-primary-foreground text-sm hover:bg-primary/90">
446
+ <ThreadListPrimitive.New className="bg-primary text-primary-foreground hover:bg-primary/90 w-full rounded-md px-3 py-2 text-sm font-medium">
447
447
  + New Thread
448
448
  </ThreadListPrimitive.New>
449
449
  </div>
@@ -453,7 +453,7 @@ function ThreadListSidebar() {
453
453
 
454
454
  function ThreadListItem() {
455
455
  return (
456
- <ThreadListItemPrimitive.Root className="mb-1 w-full rounded-md p-3 text-left transition-colors hover:bg-muted data-active:bg-primary data-active:text-primary-foreground">
456
+ <ThreadListItemPrimitive.Root className="hover:bg-muted data-active:bg-primary data-active:text-primary-foreground mb-1 w-full rounded-md p-3 text-left transition-colors">
457
457
  <ThreadListItemPrimitive.Trigger className="w-full text-left">
458
458
  <div className="font-medium">
459
459
  <ThreadListItemPrimitive.Title fallback="New Thread" />
@@ -486,8 +486,8 @@ export default function Home() {
486
486
 
487
487
  return (
488
488
  <div className="flex h-full flex-col">
489
- <header className="border-b bg-card px-6 py-4">
490
- <h1 className="font-bold text-2xl">Tap-Native Runtime Example</h1>
489
+ <header className="bg-card border-b px-6 py-4">
490
+ <h1 className="text-2xl font-bold">Tap-Native Runtime Example</h1>
491
491
  <p className="text-muted-foreground text-sm">
492
492
  Built with ExternalThread and InMemoryThreadList
493
493
  </p>
@@ -497,7 +497,7 @@ export default function Home() {
497
497
  {isEmpty ? (
498
498
  <div className="flex h-full items-center justify-center">
499
499
  <div className="text-center">
500
- <h2 className="mb-2 font-semibold text-xl">No messages yet</h2>
500
+ <h2 className="mb-2 text-xl font-semibold">No messages yet</h2>
501
501
  <p className="text-muted-foreground text-sm">
502
502
  Use the controls below to add messages
503
503
  </p>
@@ -507,14 +507,14 @@ export default function Home() {
507
507
  <>
508
508
  <Thread />
509
509
  <div className="mx-auto mt-4 max-w-2xl space-y-2">
510
- <div className="rounded-lg border bg-card p-4">
511
- <h3 className="mb-2 font-semibold text-sm">
510
+ <div className="bg-card rounded-lg border p-4">
511
+ <h3 className="mb-2 text-sm font-semibold">
512
512
  About This Example
513
513
  </h3>
514
- <ul className="space-y-1 text-muted-foreground text-sm">
514
+ <ul className="text-muted-foreground space-y-1 text-sm">
515
515
  <li>
516
516
  • Uses{" "}
517
- <code className="rounded bg-muted px-1">
517
+ <code className="bg-muted rounded px-1">
518
518
  ExternalThread
519
519
  </code>{" "}
520
520
  to display messages
@@ -525,7 +525,7 @@ export default function Home() {
525
525
  </ul>
526
526
  </div>
527
527
 
528
- <div className="text-center text-muted-foreground text-xs">
528
+ <div className="text-muted-foreground text-center text-xs">
529
529
  This is a minimal implementation. Features like editing,
530
530
  branching, and attachments can be added.
531
531
  </div>
@@ -572,13 +572,14 @@ export default function Home() {
572
572
  ## next.config.ts
573
573
 
574
574
  ```typescript
575
+ import { withAui } from "@assistant-ui/next";
575
576
  import type { NextConfig } from "next";
576
577
 
577
578
  const nextConfig: NextConfig = {
578
579
  /* config options here */
579
580
  };
580
581
 
581
- export default nextConfig;
582
+ export default withAui(nextConfig);
582
583
 
583
584
  ```
584
585
 
@@ -601,13 +602,14 @@ export default nextConfig;
601
602
  "@assistant-ui/ui": "workspace:*",
602
603
  "class-variance-authority": "^0.7.1",
603
604
  "clsx": "^2.1.1",
604
- "lucide-react": "^1.16.0",
605
+ "lucide-react": "^1.17.0",
605
606
  "next": "^16.2.6",
606
607
  "react": "^19.2.6",
607
608
  "react-dom": "^19.2.6",
608
609
  "tailwind-merge": "^3.6.0"
609
610
  },
610
611
  "devDependencies": {
612
+ "@assistant-ui/next": "workspace:*",
611
613
  "@assistant-ui/x-buildutils": "workspace:*",
612
614
  "@tailwindcss/postcss": "^4.3.0",
613
615
  "@types/node": "^25.9.1",
@@ -33,7 +33,26 @@ A React state management context for assistant chat. The runtime handles data co
33
33
  A hosted service that enhances your assistant experience with comprehensive thread management and message history. Assistant Cloud stores complete message history, automatically persists threads, supports human-in-the-loop workflows, and integrates with common auth providers to seamlessly allow users to resume conversations at any point. [Cloud Docs](/docs/cloud)
34
34
 
35
35
 
36
- ### There are three common ways to architect your assistant-ui application:
36
+ ## What each layer owns
37
+
38
+ Before picking a runtime or wiring components, it helps to see which layer owns which responsibility. assistant-ui draws hard lines between rendering, conversation state, and where the model actually runs.
39
+
40
+ ### UI layer
41
+ Primitives and prebuilt components render the assistant experience: thread, messages, composer, message parts, actions, attachments, suggestions. They read and write through the runtime context, not directly against the backend or model.
42
+
43
+ ### Runtime layer
44
+ The state and behavior boundary between UI and backend. The runtime owns or adapts conversation state: messages, thread state, composer state, run lifecycle, branching, editing, regeneration. Different runtimes exist because different backends own this state differently. `LocalRuntime` keeps state internal; `ExternalStoreRuntime` delegates to your store.
45
+
46
+ ### Backend / agent layer
47
+ Produces assistant output and app-specific behavior. Depending on the runtime and protocol, the backend may emit text, message parts, tool calls, metadata, agent state, attachments, or other events that the runtime maps into UI state.
48
+
49
+ ### Integration / protocol layer
50
+ Runtime adapters and protocols bridge assistant-ui to different backend shapes: AI SDK, LangGraph, LangChain, ADK, A2A, AG-UI, OpenCode, or your own. The DataStream and AssistantTransport protocols let a generic backend talk to assistant-ui without a custom adapter per app.
51
+
52
+ ### Persistence layer
53
+ Thread and message history can be stored by Assistant Cloud or by your own database via thread and history adapters. Persistence is separate from rendering and backend generation, though the runtime coordinates with it.
54
+
55
+ ## There are three common ways to architect your assistant-ui application:
37
56
 
38
57
  #### **1. Direct Integration with External Providers**
39
58
 
@@ -90,4 +109,26 @@ graph TD
90
109
  style E fill:#fca5a5,stroke:#7f1d1d,stroke-width:2px,color:#7f1d1d,font-weight:bold
91
110
 
92
111
  class A,B,C,D,E default
93
- ```
112
+ ```
113
+
114
+ ## Going deeper
115
+
116
+ These pages go one level deeper on runtime internals, adapters, and persistence.
117
+
118
+ <Cards>
119
+ <Card
120
+ title="Runtime architecture"
121
+ description="Core runtimes, protocol layers, and framework adapters — what each layer owns."
122
+ href="/docs/runtimes/concepts/architecture"
123
+ />
124
+ <Card
125
+ title="Adapters"
126
+ description="Attachments, speech, feedback, history, suggestions across runtimes."
127
+ href="/docs/runtimes/concepts/adapters"
128
+ />
129
+ <Card
130
+ title="Threads"
131
+ description="Multi-thread support: cloud, custom database, ExternalStore."
132
+ href="/docs/runtimes/concepts/threads"
133
+ />
134
+ </Cards>
@@ -72,13 +72,12 @@ Use `--example` to create a project from one of the monorepo examples with full
72
72
  | `with-ag-ui` | [AG-UI protocol](/docs/runtimes/ag-ui) integration | `npx assistant-ui create my-app -e with-ag-ui` |
73
73
  | `with-assistant-transport` | Custom backend via Assistant Transport | `npx assistant-ui create my-app -e with-assistant-transport` |
74
74
  | `with-resumable-stream` | Resumable LLM stream that survives reload mid-response | `npx assistant-ui create my-app -e with-resumable-stream` |
75
- | `with-chain-of-thought` | Chain-of-thought with JS execution | `npx assistant-ui create my-app -e with-chain-of-thought` |
75
+ | `with-chain-of-thought` | Chain-of-thought reasoning, tool calls, and source citations | `npx assistant-ui create my-app -e with-chain-of-thought` |
76
76
  | `with-external-store` | External message store | `npx assistant-ui create my-app -e with-external-store` |
77
77
  | `with-custom-thread-list` | Custom thread list UI | `npx assistant-ui create my-app -e with-custom-thread-list` |
78
78
  | `with-react-hook-form` | React Hook Form integration | `npx assistant-ui create my-app -e with-react-hook-form` |
79
79
  | `with-ffmpeg` | FFmpeg video processing tool | `npx assistant-ui create my-app -e with-ffmpeg` |
80
80
  | `with-elevenlabs-scribe` | ElevenLabs voice transcription | `npx assistant-ui create my-app -e with-elevenlabs-scribe` |
81
- | `with-parent-id-grouping` | Message part grouping | `npx assistant-ui create my-app -e with-parent-id-grouping` |
82
81
  | `with-expo` | Expo / React Native | `npx assistant-ui create my-app -e with-expo` |
83
82
  | `with-react-ink` | Terminal UI chat | `npx assistant-ui create my-app -e with-react-ink` |
84
83
  | `with-react-router` | React Router v7 integration | `npx assistant-ui create my-app -e with-react-router` |
@@ -38,43 +38,51 @@ const ReadableComponent = makeAssistantVisible(MyComponent);
38
38
 
39
39
  Tools are functions that the assistant can use to interact with your application. They can be provided through various mechanisms:
40
40
 
41
- ```tsx
41
+ ```tsx title="app/form-toolkit.tsx"
42
+ "use generative";
43
+
44
+ import { defineToolkit } from "@assistant-ui/react";
45
+ import { z } from "zod";
46
+
47
+ export default defineToolkit({
48
+ submitForm: {
49
+ description: "Submit the form with the user's details.",
50
+ parameters: z.object({
51
+ email: z.string().email(),
52
+ name: z.string(),
53
+ }),
54
+ execute: async ({ email, name }) => {
55
+ "use client";
56
+ // Implementation
57
+ return { success: true };
58
+ },
59
+ renderText: { running: "Submitting…", complete: "Submitted" },
60
+ },
61
+ });
62
+ ```
63
+
64
+ ```tsx title="app/Form.tsx"
42
65
  import {
66
+ AuiProvider,
43
67
  makeAssistantVisible,
44
- makeAssistantTool,
45
- tool,
68
+ Tools,
69
+ useAui,
46
70
  } from "@assistant-ui/react";
47
- import { z } from "zod";
71
+ import toolkit from "./form-toolkit";
48
72
 
49
73
  // Via makeAssistantVisible's clickable option
50
74
  const ClickableButton = makeAssistantVisible(Button, {
51
75
  clickable: true, // Provides a click tool
52
76
  });
53
77
 
54
- // Via makeAssistantTool
55
- const submitForm = tool({
56
- parameters: z.object({
57
- email: z.string().email(),
58
- name: z.string(),
59
- }),
60
- execute: async ({ email, name }) => {
61
- // Implementation
62
- return { success: true };
63
- },
64
- });
65
-
66
- const SubmitFormTool = makeAssistantTool({
67
- ...submitForm,
68
- toolName: "submitForm"
69
- });
70
-
71
78
  // Use in your component
72
79
  function Form() {
80
+ const aui = useAui({ tools: Tools({ toolkit }) });
81
+
73
82
  return (
74
- <div>
83
+ <AuiProvider value={aui}>
75
84
  <form>{/* form fields */}</form>
76
- <SubmitFormTool />
77
- </div>
85
+ </AuiProvider>
78
86
  );
79
87
  }
80
88
  ```
@@ -134,8 +142,8 @@ Multiple providers can be registered, and their contexts will be composed:
134
142
 
135
143
  2. **Tools**
136
144
 
137
- - Use the tool() helper to define tool schemas and behavior
138
- - Prefer makeAssistantTool for reusable tools
145
+ - Use toolkit entries to define tool schemas and behavior
146
+ - Prefer `Tools({ toolkit })` for reusable tools
139
147
  - Handle errors gracefully
140
148
  - Consider async operations and loading states
141
149
  - Use the built-in click tool when possible
@@ -98,44 +98,50 @@ function SmartTransactionHistory() {
98
98
  }
99
99
  ```
100
100
 
101
- ### 3. Creating Tools (makeAssistantTool)
101
+ ### 3. Creating Tools
102
102
 
103
103
  Let's add transaction-specific tools for the assistant:
104
104
 
105
- ```tsx
106
- import { makeAssistantTool, tool } from "@assistant-ui/react";
105
+ ```tsx title="app/transaction-toolkit.tsx"
106
+ "use generative";
107
+
108
+ import { defineToolkit } from "@assistant-ui/react";
107
109
  import { z } from "zod";
108
110
 
109
- // Define a tool to analyze transactions
110
- const analyzeTransaction = tool({
111
- parameters: z.object({
112
- transactionId: z.string(),
113
- merchantName: z.string(),
114
- }),
115
- execute: async ({ transactionId, merchantName }) => {
116
- // Analyze transaction patterns, merchant reputation, etc.
117
- return {
118
- isSuspicious: false,
119
- merchantRating: 4.5,
120
- similarTransactions: 3,
121
- refundEligible: true,
122
- };
111
+ export default defineToolkit({
112
+ analyzeTransaction: {
113
+ description: "Analyze a transaction's risk and refund eligibility.",
114
+ parameters: z.object({
115
+ transactionId: z.string(),
116
+ merchantName: z.string(),
117
+ }),
118
+ execute: async ({ transactionId, merchantName }) => {
119
+ "use client";
120
+ // Analyze transaction patterns, merchant reputation, etc.
121
+ return {
122
+ isSuspicious: false,
123
+ merchantRating: 4.5,
124
+ similarTransactions: 3,
125
+ refundEligible: true,
126
+ };
127
+ },
128
+ renderText: { running: "Analyzing transaction…", complete: "Analysis ready" },
123
129
  },
124
130
  });
131
+ ```
125
132
 
126
- // Create a tool component
127
- const TransactionAnalyzer = makeAssistantTool({
128
- ...analyzeTransaction,
129
- toolName: "analyzeTransaction",
130
- });
133
+ ```tsx title="app/SmartTransactionHistory.tsx"
134
+ import { AuiProvider, Tools, useAui } from "@assistant-ui/react";
135
+ import toolkit from "./transaction-toolkit";
131
136
 
132
137
  function SmartTransactionHistory() {
138
+ const aui = useAui({ tools: Tools({ toolkit }) });
139
+
133
140
  // Previous instructions...
134
141
  return (
135
- <>
142
+ <AuiProvider value={aui}>
136
143
  <TransactionHistory transactions={transactions} />
137
- <TransactionAnalyzer />
138
- </>
144
+ </AuiProvider>
139
145
  );
140
146
  }
141
147
  ```
@@ -191,6 +197,6 @@ This creates a more intuitive and safer banking experience while maintaining the
191
197
  Learn more about each API:
192
198
 
193
199
  - [makeAssistantVisible](make-assistant-visible) for component understanding
194
- - [makeAssistantTool](make-assistant-tool) for transaction analysis
200
+ - [Tools](/docs/tools/defining-tools) for transaction analysis
195
201
  - [useAssistantInstructions](use-assistant-instructions) for behavior guidance
196
202
  - [Model Context](model-context) for dynamic context management
@@ -465,7 +465,7 @@ export default function MyApp() {
465
465
  <Card
466
466
  title="Generative UI"
467
467
  description="Create rich UI components for tool executions"
468
- href="/docs/guides/tool-ui"
468
+ href="/docs/tools/tool-ui"
469
469
  />
470
470
  <Card
471
471
  title="Add Persistence"
@@ -3,7 +3,7 @@ title: Persistence Adapters
3
3
  description: Persistence adapters for saving assistant-ui message history, remote thread lists, and long-running chat sessions across browser reloads.
4
4
  ---
5
5
 
6
- import { GenericThreadHistoryAdapter, InMemoryThreadListAdapter, MessageFormatAdapter, RemoteThreadListAdapter, ThreadHistoryAdapter } from "@/generated/typeDocs";
6
+ import { ExportedMessageRepository, GenericThreadHistoryAdapter, InMemoryThreadListAdapter, MessageFormatAdapter, RemoteThreadListAdapter, ThreadHistoryAdapter } from "@/generated/typeDocs";
7
7
 
8
8
  {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
9
  {/* Do not edit manually. */}
@@ -14,6 +14,10 @@ import { GenericThreadHistoryAdapter, InMemoryThreadListAdapter, MessageFormatAd
14
14
 
15
15
  ## API Reference
16
16
 
17
+ ### ExportedMessageRepository
18
+
19
+ <ParametersTable {...ExportedMessageRepository} />
20
+
17
21
  ### GenericThreadHistoryAdapter
18
22
 
19
23
  <ParametersTable {...GenericThreadHistoryAdapter} />