@assistant-ui/mcp-docs-server 0.1.30 → 0.1.32
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.
- package/.docs/organized/code-examples/waterfall.md +8 -8
- package/.docs/organized/code-examples/with-a2a.md +10 -10
- package/.docs/organized/code-examples/with-ag-ui.md +12 -12
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +14 -14
- package/.docs/organized/code-examples/with-artifacts.md +14 -14
- package/.docs/organized/code-examples/with-assistant-transport.md +11 -11
- package/.docs/organized/code-examples/with-browser-extension.md +345 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +129 -63
- package/.docs/organized/code-examples/with-cloud-standalone.md +13 -13
- package/.docs/organized/code-examples/with-cloud.md +13 -13
- package/.docs/organized/code-examples/with-custom-thread-list.md +65 -20
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +18 -17
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +18 -17
- package/.docs/organized/code-examples/with-expo.md +25 -25
- package/.docs/organized/code-examples/with-external-store.md +10 -10
- package/.docs/organized/code-examples/with-ffmpeg.md +14 -14
- package/.docs/organized/code-examples/with-generative-ui.md +211 -14
- package/.docs/organized/code-examples/with-google-adk.md +12 -12
- package/.docs/organized/code-examples/with-heat-graph.md +8 -8
- package/.docs/organized/code-examples/with-image-generation.md +454 -0
- package/.docs/organized/code-examples/with-interactables.md +14 -14
- package/.docs/organized/code-examples/with-langchain.md +12 -12
- package/.docs/organized/code-examples/with-langgraph.md +15 -12
- package/.docs/organized/code-examples/with-livekit.md +19 -18
- package/.docs/organized/code-examples/with-mcp.md +748 -0
- package/.docs/organized/code-examples/with-opencode.md +107 -62
- package/.docs/organized/code-examples/with-parent-id-grouping.md +12 -12
- package/.docs/organized/code-examples/with-react-hook-form.md +14 -14
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +16 -16
- package/.docs/organized/code-examples/with-resumable-stream.md +660 -0
- package/.docs/organized/code-examples/with-store.md +8 -8
- package/.docs/organized/code-examples/with-tanstack.md +14 -14
- package/.docs/organized/code-examples/with-tap-runtime.md +11 -10
- package/.docs/raw/docs/(docs)/cli.mdx +3 -1
- package/.docs/raw/docs/(docs)/copilots/assistant-frame.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +10 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +8 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-visible.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/use-assistant-instructions.mdx +1 -0
- package/.docs/raw/docs/(docs)/devtools.mdx +1 -0
- package/.docs/raw/docs/(docs)/index.mdx +3 -2
- package/.docs/raw/docs/(docs)/installation.mdx +2 -1
- package/.docs/raw/docs/(docs)/rtl.mdx +1 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +36 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +34 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +55 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +36 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +31 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +28 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +94 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +464 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +125 -125
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +46 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +70 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +182 -554
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +82 -86
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -314
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +43 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -42
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +68 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +92 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +131 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +230 -2
- package/.docs/raw/docs/cloud/ai-sdk.mdx +222 -4
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/cloud/langgraph.mdx +274 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/attachments.mdx +45 -40
- package/.docs/raw/docs/guides/branching.mdx +76 -0
- package/.docs/raw/docs/guides/chain-of-thought.mdx +166 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/context-api.mdx +54 -26
- package/.docs/raw/docs/{(docs)/guides → guides}/dictation.mdx +3 -1
- package/.docs/raw/docs/guides/editing.mdx +102 -0
- package/.docs/raw/docs/guides/generative-ui.mdx +142 -0
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +103 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/interactables.mdx +51 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/latex.mdx +53 -10
- package/.docs/raw/docs/guides/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/mentions.mdx +63 -88
- package/.docs/raw/docs/{(docs)/guides → guides}/message-timing.mdx +45 -6
- package/.docs/raw/docs/{(docs)/guides → guides}/multi-agent.mdx +66 -6
- package/.docs/raw/docs/{(docs)/guides → guides}/quoting.mdx +11 -18
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/slash-commands.mdx +104 -38
- package/.docs/raw/docs/guides/speech.mdx +156 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/suggestions.mdx +91 -69
- package/.docs/raw/docs/{(docs)/guides → guides}/tool-ui.mdx +110 -38
- package/.docs/raw/docs/{(docs)/guides → guides}/tools.mdx +197 -40
- package/.docs/raw/docs/{(docs)/guides → guides}/voice.mdx +41 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/index.mdx +11 -14
- package/.docs/raw/docs/ink/migration.mdx +1 -3
- package/.docs/raw/docs/ink/primitives.mdx +386 -9
- package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +520 -0
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +191 -0
- package/.docs/raw/docs/integrations/auth/clerk.mdx +172 -0
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +196 -0
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +79 -0
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +188 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +57 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +201 -0
- package/.docs/raw/docs/integrations/gateways/index.mdx +162 -0
- package/.docs/raw/docs/integrations/index.mdx +185 -0
- package/.docs/raw/docs/integrations/observability/helicone.mdx +130 -0
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +163 -0
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +150 -0
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +712 -0
- package/.docs/raw/docs/integrations/tools/mcp.mdx +267 -0
- package/.docs/raw/docs/integrations/tools/react-mcp.mdx +337 -0
- package/.docs/raw/docs/migrations/v0-14.mdx +297 -0
- package/.docs/raw/docs/primitives/action-bar.mdx +1 -0
- package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/primitives/attachment.mdx +1 -0
- package/.docs/raw/docs/primitives/branch-picker.mdx +1 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +90 -85
- package/.docs/raw/docs/primitives/composer.mdx +55 -1
- package/.docs/raw/docs/primitives/error.mdx +1 -0
- package/.docs/raw/docs/primitives/index.mdx +4 -3
- package/.docs/raw/docs/primitives/message.mdx +68 -5
- package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -0
- package/.docs/raw/docs/primitives/suggestion.mdx +10 -0
- package/.docs/raw/docs/primitives/thread-list.mdx +39 -0
- package/.docs/raw/docs/primitives/thread.mdx +16 -13
- package/.docs/raw/docs/react-native/hooks.mdx +2 -2
- package/.docs/raw/docs/react-native/index.mdx +5 -7
- package/.docs/raw/docs/react-native/migration.mdx +1 -3
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +396 -0
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +60 -0
- package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +216 -0
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +70 -0
- package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +243 -0
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +154 -0
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +52 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +73 -128
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +70 -64
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +337 -123
- package/.docs/raw/docs/runtimes/concepts/adapters.mdx +265 -0
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +125 -0
- package/.docs/raw/docs/runtimes/concepts/stability.mdx +67 -0
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +428 -0
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +703 -0
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +348 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +261 -1236
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +746 -0
- package/.docs/raw/docs/runtimes/custom/overview.mdx +71 -0
- package/.docs/raw/docs/runtimes/google-adk/api.mdx +256 -0
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +717 -0
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +69 -0
- package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +229 -0
- package/.docs/raw/docs/runtimes/langchain.mdx +533 -0
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +305 -0
- package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +104 -0
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +84 -0
- package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +496 -0
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +127 -0
- package/.docs/raw/docs/runtimes/langgraph/threads.mdx +113 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +3 -3
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -23
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
- package/.docs/raw/docs/runtimes/opencode/hooks.mdx +191 -0
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +48 -0
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +119 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +78 -203
- package/.docs/raw/docs/ui/accordion.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -0
- package/.docs/raw/docs/ui/attachment.mdx +1 -0
- package/.docs/raw/docs/ui/badge.mdx +1 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +12 -1
- package/.docs/raw/docs/ui/context-display.mdx +1 -0
- package/.docs/raw/docs/ui/diff-viewer.mdx +1 -0
- package/.docs/raw/docs/ui/directive-text.mdx +1 -0
- package/.docs/raw/docs/ui/file.mdx +1 -0
- package/.docs/raw/docs/ui/image.mdx +1 -0
- package/.docs/raw/docs/ui/markdown.mdx +2 -14
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/mermaid.mdx +1 -0
- package/.docs/raw/docs/ui/message-timing.mdx +3 -2
- package/.docs/raw/docs/ui/model-selector.mdx +9 -8
- package/.docs/raw/docs/ui/part-grouping.mdx +325 -313
- package/.docs/raw/docs/ui/quote.mdx +1 -0
- package/.docs/raw/docs/ui/reasoning.mdx +66 -33
- package/.docs/raw/docs/ui/scrollbar.mdx +1 -0
- package/.docs/raw/docs/ui/select.mdx +1 -0
- package/.docs/raw/docs/ui/sources.mdx +18 -0
- package/.docs/raw/docs/ui/streamdown.mdx +35 -2
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -0
- package/.docs/raw/docs/ui/tabs.mdx +1 -0
- package/.docs/raw/docs/ui/thread-list.mdx +19 -2
- package/.docs/raw/docs/ui/thread.mdx +58 -3
- package/.docs/raw/docs/ui/tool-fallback.mdx +1 -0
- package/.docs/raw/docs/ui/tool-group.mdx +39 -11
- package/.docs/raw/docs/ui/voice.mdx +1 -0
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -0
- package/.docs/raw/docs/utilities/react-o11y.mdx +278 -0
- package/.docs/raw/docs/utilities/tw-shimmer.mdx +1 -0
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +6 -6
- package/src/tools/tests/path-traversal.test.ts +1 -1
- package/.docs/raw/docs/(docs)/guides/branching.mdx +0 -65
- package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +0 -164
- package/.docs/raw/docs/(docs)/guides/editing.mdx +0 -66
- package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -38
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +0 -159
- package/.docs/raw/docs/runtimes/a2a/index.mdx +0 -298
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +0 -1033
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +0 -314
- package/.docs/raw/docs/runtimes/custom/local.mdx +0 -1464
- package/.docs/raw/docs/runtimes/data-stream.mdx +0 -422
- package/.docs/raw/docs/runtimes/google-adk/index.mdx +0 -686
- package/.docs/raw/docs/runtimes/helicone.mdx +0 -61
- package/.docs/raw/docs/runtimes/langchain/comparison.mdx +0 -60
- package/.docs/raw/docs/runtimes/langchain/index.mdx +0 -210
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +0 -699
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +0 -12
- package/.docs/raw/docs/runtimes/langserve.mdx +0 -116
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -218
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +0 -18
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -217
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AG-UI Agent Runtime
|
|
3
|
+
description: Wire AG-UI (Agent-User Interaction) protocol agents into a React chat UI with assistant-ui — bidirectional events, generative UI, and human-in-the-loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`@assistant-ui/react-ag-ui` is a runtime adapter for the [AG-UI (Agent-User Interaction) protocol](https://github.com/ag-ui-protocol/ag-ui). It lets your assistant-ui frontend speak to any AG-UI-compliant agent server, including CopilotKit-based backends.
|
|
7
|
+
|
|
8
|
+
## When to use it
|
|
9
|
+
|
|
10
|
+
Pick the AG-UI runtime when:
|
|
11
|
+
|
|
12
|
+
- Your backend implements the AG-UI protocol (e.g. CopilotKit agents, custom AG-UI servers).
|
|
13
|
+
- You want streaming text, thinking events, reasoning events, tool calls, and state snapshots in one protocol.
|
|
14
|
+
- You need agent-side state synchronization via `STATE_SNAPSHOT` and `STATE_DELTA` events.
|
|
15
|
+
|
|
16
|
+
If your backend is not AG-UI-compliant, see [picking a runtime](/docs/runtimes/pick-a-runtime) for alternatives.
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
`@assistant-ui/react-ag-ui` is layered on `ExternalStoreRuntime` (see [architecture](/docs/runtimes/concepts/architecture)). The runtime owns AG-UI event parsing and message reconstruction; you provide an `HttpAgent` from `@ag-ui/client` and the adapter handles the wire protocol.
|
|
21
|
+
|
|
22
|
+
Shared adapters (attachments, speech, dictation, feedback, history) work the same way described in [adapters](/docs/runtimes/concepts/adapters).
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
- An AG-UI-compatible agent server.
|
|
27
|
+
- React 18 or 19.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
<PlatformTabs>
|
|
32
|
+
<Tab value="React">
|
|
33
|
+
|
|
34
|
+
<InstallCommand npm={["@assistant-ui/react", "@assistant-ui/react-ag-ui", "@ag-ui/client"]} />
|
|
35
|
+
|
|
36
|
+
</Tab>
|
|
37
|
+
<Tab value="React Native">
|
|
38
|
+
|
|
39
|
+
<InstallCommand expo={["@assistant-ui/react-native", "@assistant-ui/react-ag-ui", "@ag-ui/client"]} />
|
|
40
|
+
|
|
41
|
+
</Tab>
|
|
42
|
+
<Tab value="React Ink">
|
|
43
|
+
|
|
44
|
+
<InstallCommand npm={["@assistant-ui/react-ink", "@assistant-ui/react-ag-ui", "@ag-ui/client", "ink", "react"]} />
|
|
45
|
+
|
|
46
|
+
</Tab>
|
|
47
|
+
</PlatformTabs>
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
[`examples/with-ag-ui`](https://github.com/assistant-ui/assistant-ui/tree/main/examples/with-ag-ui) shows a complete reference implementation. Or scaffold one directly:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npx assistant-ui@latest create my-app -e with-ag-ui
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Next
|
|
58
|
+
|
|
59
|
+
<Cards>
|
|
60
|
+
<Card
|
|
61
|
+
title="Quickstart"
|
|
62
|
+
description="Minimal HttpAgent + useAgUiRuntime setup."
|
|
63
|
+
href="/docs/runtimes/ag-ui/quickstart"
|
|
64
|
+
/>
|
|
65
|
+
<Card
|
|
66
|
+
title="Runtime options"
|
|
67
|
+
description="useAgUiRuntime options, adapters, events, thread list."
|
|
68
|
+
href="/docs/runtimes/ag-ui/runtime-options"
|
|
69
|
+
/>
|
|
70
|
+
</Cards>
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quickstart
|
|
3
|
+
description: Minimal HttpAgent + useAgUiRuntime setup against an AG-UI server.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Three steps to a working chat against an AG-UI agent. Assumes you have already installed the package and have an AG-UI server reachable; if not, start at [overview](/docs/runtimes/ag-ui).
|
|
7
|
+
|
|
8
|
+
<Steps>
|
|
9
|
+
<Step>
|
|
10
|
+
|
|
11
|
+
### Wire up the runtime provider
|
|
12
|
+
|
|
13
|
+
Create an `HttpAgent` pointing at your AG-UI endpoint and pass it to `useAgUiRuntime`:
|
|
14
|
+
|
|
15
|
+
<PlatformTabs>
|
|
16
|
+
<Tab value="React">
|
|
17
|
+
|
|
18
|
+
```tsx title="app/MyRuntimeProvider.tsx"
|
|
19
|
+
"use client";
|
|
20
|
+
|
|
21
|
+
import { useMemo } from "react";
|
|
22
|
+
import { AssistantRuntimeProvider } from "@assistant-ui/react";
|
|
23
|
+
import { useAgUiRuntime } from "@assistant-ui/react-ag-ui";
|
|
24
|
+
import { HttpAgent } from "@ag-ui/client";
|
|
25
|
+
|
|
26
|
+
export function MyRuntimeProvider({
|
|
27
|
+
children,
|
|
28
|
+
}: {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}) {
|
|
31
|
+
const agent = useMemo(
|
|
32
|
+
() =>
|
|
33
|
+
new HttpAgent({
|
|
34
|
+
url: "http://localhost:8000/agent",
|
|
35
|
+
}),
|
|
36
|
+
[],
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const runtime = useAgUiRuntime({ agent });
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
|
43
|
+
{children}
|
|
44
|
+
</AssistantRuntimeProvider>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
</Tab>
|
|
50
|
+
<Tab value="React Native">
|
|
51
|
+
|
|
52
|
+
```tsx title="runtime/MyRuntimeProvider.tsx"
|
|
53
|
+
import { useMemo } from "react";
|
|
54
|
+
import { AssistantRuntimeProvider } from "@assistant-ui/react-native";
|
|
55
|
+
import { useAgUiRuntime } from "@assistant-ui/react-ag-ui";
|
|
56
|
+
import { HttpAgent } from "@ag-ui/client";
|
|
57
|
+
|
|
58
|
+
export function MyRuntimeProvider({
|
|
59
|
+
children,
|
|
60
|
+
}: {
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
}) {
|
|
63
|
+
const agent = useMemo(
|
|
64
|
+
() =>
|
|
65
|
+
new HttpAgent({
|
|
66
|
+
url: "http://localhost:8000/agent",
|
|
67
|
+
}),
|
|
68
|
+
[],
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const runtime = useAgUiRuntime({ agent });
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
|
75
|
+
{children}
|
|
76
|
+
</AssistantRuntimeProvider>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
</Tab>
|
|
82
|
+
<Tab value="React Ink">
|
|
83
|
+
|
|
84
|
+
```tsx title="runtime/MyRuntimeProvider.tsx"
|
|
85
|
+
import { useMemo } from "react";
|
|
86
|
+
import { AssistantRuntimeProvider } from "@assistant-ui/react-ink";
|
|
87
|
+
import { useAgUiRuntime } from "@assistant-ui/react-ag-ui";
|
|
88
|
+
import { HttpAgent } from "@ag-ui/client";
|
|
89
|
+
|
|
90
|
+
export function MyRuntimeProvider({
|
|
91
|
+
children,
|
|
92
|
+
}: {
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
}) {
|
|
95
|
+
const agent = useMemo(
|
|
96
|
+
() =>
|
|
97
|
+
new HttpAgent({
|
|
98
|
+
url: "http://localhost:8000/agent",
|
|
99
|
+
}),
|
|
100
|
+
[],
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const runtime = useAgUiRuntime({ agent });
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
|
107
|
+
{children}
|
|
108
|
+
</AssistantRuntimeProvider>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
</Tab>
|
|
114
|
+
</PlatformTabs>
|
|
115
|
+
|
|
116
|
+
</Step>
|
|
117
|
+
<Step>
|
|
118
|
+
|
|
119
|
+
### Render the Thread
|
|
120
|
+
|
|
121
|
+
<PlatformTabs>
|
|
122
|
+
<Tab value="React">
|
|
123
|
+
|
|
124
|
+
```tsx title="app/page.tsx"
|
|
125
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
126
|
+
import { MyRuntimeProvider } from "./MyRuntimeProvider";
|
|
127
|
+
|
|
128
|
+
export default function Page() {
|
|
129
|
+
return (
|
|
130
|
+
<MyRuntimeProvider>
|
|
131
|
+
<Thread />
|
|
132
|
+
</MyRuntimeProvider>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</Tab>
|
|
138
|
+
<Tab value="React Native">
|
|
139
|
+
|
|
140
|
+
```tsx title="app/index.tsx"
|
|
141
|
+
import { View } from "react-native";
|
|
142
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
143
|
+
import { MyRuntimeProvider } from "@/runtime/MyRuntimeProvider";
|
|
144
|
+
|
|
145
|
+
export default function Page() {
|
|
146
|
+
return (
|
|
147
|
+
<MyRuntimeProvider>
|
|
148
|
+
<View style={{ flex: 1 }}>
|
|
149
|
+
<Thread />
|
|
150
|
+
</View>
|
|
151
|
+
</MyRuntimeProvider>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
</Tab>
|
|
157
|
+
<Tab value="React Ink">
|
|
158
|
+
|
|
159
|
+
```tsx title="app.tsx"
|
|
160
|
+
import { Box } from "ink";
|
|
161
|
+
import { Thread } from "./components/thread.js";
|
|
162
|
+
import { MyRuntimeProvider } from "./runtime/MyRuntimeProvider.js";
|
|
163
|
+
|
|
164
|
+
export function App() {
|
|
165
|
+
return (
|
|
166
|
+
<MyRuntimeProvider>
|
|
167
|
+
<Box flexDirection="column">
|
|
168
|
+
<Thread />
|
|
169
|
+
</Box>
|
|
170
|
+
</MyRuntimeProvider>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
</Tab>
|
|
176
|
+
</PlatformTabs>
|
|
177
|
+
|
|
178
|
+
</Step>
|
|
179
|
+
<Step>
|
|
180
|
+
|
|
181
|
+
### Set up UI components
|
|
182
|
+
|
|
183
|
+
<PlatformTabs>
|
|
184
|
+
<Tab value="React">
|
|
185
|
+
|
|
186
|
+
Follow the [UI Components guide](/docs/ui/thread) to wire up the Thread, composer, and supporting primitives.
|
|
187
|
+
|
|
188
|
+
</Tab>
|
|
189
|
+
<Tab value="React Native">
|
|
190
|
+
|
|
191
|
+
Follow the [React Native setup](/docs/react-native) to add a native Thread, composer, and supporting primitives.
|
|
192
|
+
|
|
193
|
+
</Tab>
|
|
194
|
+
<Tab value="React Ink">
|
|
195
|
+
|
|
196
|
+
Follow the [Ink setup](/docs/ink) to add a terminal Thread, composer, and supporting primitives.
|
|
197
|
+
|
|
198
|
+
</Tab>
|
|
199
|
+
</PlatformTabs>
|
|
200
|
+
|
|
201
|
+
</Step>
|
|
202
|
+
</Steps>
|
|
203
|
+
|
|
204
|
+
Once your AG-UI server is reachable, the runtime parses incoming events (`TEXT_MESSAGE_*`, `TOOL_CALL_*`, `STATE_SNAPSHOT`, etc.) into assistant-ui messages.
|
|
205
|
+
|
|
206
|
+
## Showing thinking and reasoning
|
|
207
|
+
|
|
208
|
+
`showThinking` (default `true`) controls whether `THINKING_*` and `REASONING_*` events render as visible reasoning in the UI:
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
const runtime = useAgUiRuntime({
|
|
212
|
+
agent,
|
|
213
|
+
showThinking: false, // hide thinking blocks
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Adding adapters
|
|
218
|
+
|
|
219
|
+
Attachments, speech, dictation, feedback, history, and a custom thread list are supported via the standard adapter slots. See [adapters](/docs/runtimes/concepts/adapters):
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
const runtime = useAgUiRuntime({
|
|
223
|
+
agent,
|
|
224
|
+
adapters: { attachments, history, speech, feedback },
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
For multi-thread, pass `adapters.threadList` (experimental); see [runtime options](/docs/runtimes/ag-ui/runtime-options#thread-list-experimental).
|
|
229
|
+
|
|
230
|
+
## Next
|
|
231
|
+
|
|
232
|
+
<Cards>
|
|
233
|
+
<Card
|
|
234
|
+
title="Runtime options"
|
|
235
|
+
description="useAgUiRuntime options, adapters, events, thread list."
|
|
236
|
+
href="/docs/runtimes/ag-ui/runtime-options"
|
|
237
|
+
/>
|
|
238
|
+
<Card
|
|
239
|
+
title="Pick a runtime"
|
|
240
|
+
description="Compare AG-UI to other runtime options."
|
|
241
|
+
href="/docs/runtimes/pick-a-runtime"
|
|
242
|
+
/>
|
|
243
|
+
</Cards>
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Runtime options
|
|
3
|
+
description: useAgUiRuntime options, adapters, supported events, thread list.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { AguiIcon } from "@/components/icons/agui";
|
|
7
|
+
|
|
8
|
+
Reference for the runtime's API surface. Start with [quickstart](/docs/runtimes/ag-ui/quickstart) if you have not already.
|
|
9
|
+
|
|
10
|
+
## useAgUiRuntime options
|
|
11
|
+
|
|
12
|
+
| Option | Type | Description |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `agent` | `HttpAgent` | An AG-UI client agent (from `@ag-ui/client`). Required. |
|
|
15
|
+
| `logger` | `Partial<Logger>` | Optional logger overrides. The runtime logs event-parser warnings and run lifecycle events. |
|
|
16
|
+
| `showThinking` | `boolean` | Whether to render `THINKING_*` and `REASONING_*` events as visible reasoning. Defaults to `true`. |
|
|
17
|
+
| `onError` | `(e: Error) => void` | Error callback fired on `RUN_ERROR` events and protocol errors. |
|
|
18
|
+
| `onCancel` | `() => void` | Cancellation callback fired when the user cancels a run. |
|
|
19
|
+
| `adapters` | `UseAgUiRuntimeAdapters` | Standard adapter slots (see below). |
|
|
20
|
+
|
|
21
|
+
## Adapter slots
|
|
22
|
+
|
|
23
|
+
| Adapter | Slot | Notes |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| Attachments | `adapters.attachments` | See [attachment adapter](/docs/runtimes/concepts/adapters#attachment-adapter). |
|
|
26
|
+
| Speech | `adapters.speech` | Text-to-speech. See [speech adapter](/docs/runtimes/concepts/adapters#speech-adapter). |
|
|
27
|
+
| Dictation | `adapters.dictation` | Speech-to-text input. |
|
|
28
|
+
| Feedback | `adapters.feedback` | Thumbs up / down. See [feedback adapter](/docs/runtimes/concepts/adapters#feedback-adapter). |
|
|
29
|
+
| History | `adapters.history` | Per-thread message persistence. |
|
|
30
|
+
| Thread list | `adapters.threadList` | Multi-thread switching (experimental, see below). |
|
|
31
|
+
|
|
32
|
+
## Thread list (experimental)
|
|
33
|
+
|
|
34
|
+
<Callout type="warn">
|
|
35
|
+
The thread list adapter is currently experimental and may change without notice.
|
|
36
|
+
</Callout>
|
|
37
|
+
|
|
38
|
+
`UseAgUiThreadListAdapter` lets you back the thread list with your own state.
|
|
39
|
+
|
|
40
|
+
| Option | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `threadId` | `string` | The currently active thread ID. |
|
|
43
|
+
| `onSwitchToNewThread` | `() => Promise<void>` | Called when the user creates a new thread. Reset your thread state here. |
|
|
44
|
+
| `onSwitchToThread` | `(threadId: string) => Promise<{ messages, state? }>` | Called when the user switches threads. Return the persisted messages (and optional opaque state). |
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
const runtime = useAgUiRuntime({
|
|
48
|
+
agent,
|
|
49
|
+
adapters: {
|
|
50
|
+
threadList: {
|
|
51
|
+
threadId: currentThreadId,
|
|
52
|
+
onSwitchToNewThread: async () => {
|
|
53
|
+
setCurrentThreadId(await createThread());
|
|
54
|
+
},
|
|
55
|
+
onSwitchToThread: async (id) => {
|
|
56
|
+
const { messages, state } = await loadThread(id);
|
|
57
|
+
setCurrentThreadId(id);
|
|
58
|
+
return { messages, state };
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Interrupts (experimental)
|
|
66
|
+
|
|
67
|
+
<Callout type="warn">
|
|
68
|
+
The interrupt API is experimental and may change without notice.
|
|
69
|
+
</Callout>
|
|
70
|
+
|
|
71
|
+
When the agent emits `RUN_FINISHED` with `outcome = { type: "interrupt", interrupts: [...] }`, the active assistant message is marked `requires-action` with `reason: "interrupt"` and the `Interrupt[]` payload is written to `metadata.custom.agui.interrupts`. Render an approval / input UI from there.
|
|
72
|
+
|
|
73
|
+
`useAgUiRuntime` returns an `AgUiAssistantRuntime` with two extra methods:
|
|
74
|
+
|
|
75
|
+
| Method | Description |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `unstable_getPendingInterrupts(): readonly AgUiInterrupt[]` | Snapshot of the open interrupts on the most recent assistant message. |
|
|
78
|
+
| `unstable_submitInterruptResponses(responses: ResumeEntry[]): Promise<void>` | Submits one `ResumeEntry` per open interrupt and resumes the run. |
|
|
79
|
+
|
|
80
|
+
`responses` must address every open interrupt; missing entries, unknown ids, or expired interrupts (`expiresAt`) reject before any network call. Each entry is `{ interruptId, status: "resolved" | "cancelled", payload? }`. The next `RunAgentInput` carries `resume: ResumeEntry[]`.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
const runtime = useAgUiRuntime({ agent });
|
|
84
|
+
const pending = runtime.unstable_getPendingInterrupts();
|
|
85
|
+
|
|
86
|
+
await runtime.unstable_submitInterruptResponses(
|
|
87
|
+
pending.map((i) => ({
|
|
88
|
+
interruptId: i.id,
|
|
89
|
+
status: "resolved",
|
|
90
|
+
payload: { approved: true },
|
|
91
|
+
})),
|
|
92
|
+
);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Supported events
|
|
96
|
+
|
|
97
|
+
The runtime parses the AG-UI event stream and maps each event type to assistant-ui state.
|
|
98
|
+
|
|
99
|
+
| Event | Effect |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `RUN_STARTED` / `RUN_FINISHED` | Toggles thread `isRunning`. `RUN_FINISHED.outcome` is honored (success / interrupt). |
|
|
102
|
+
| `RUN_CANCELLED` | Marks the in-flight assistant message as cancelled. |
|
|
103
|
+
| `RUN_ERROR` | Marks the message as errored; fires `onError`. |
|
|
104
|
+
| `TEXT_MESSAGE_START` / `_CONTENT` / `_END` | Streams text content into an assistant message. |
|
|
105
|
+
| `TEXT_MESSAGE_CHUNK` | Appends a delta without explicit lifecycle. |
|
|
106
|
+
| `THINKING_START` / `_END` | Wraps reasoning blocks (when `showThinking` is on). |
|
|
107
|
+
| `THINKING_TEXT_MESSAGE_*` | Streams thinking text deltas. |
|
|
108
|
+
| `REASONING_START` / `_MESSAGE_*` / `_END` | Streams structured reasoning per message. |
|
|
109
|
+
| `TOOL_CALL_START` / `_ARGS` / `_END` | Streams tool calls into the current assistant message. |
|
|
110
|
+
| `TOOL_CALL_CHUNK` | Streams tool deltas without explicit lifecycle. |
|
|
111
|
+
| `TOOL_CALL_RESULT` | Attaches a tool result to a tool call. |
|
|
112
|
+
| `STATE_SNAPSHOT` | Replaces the agent's external state. |
|
|
113
|
+
| `STATE_DELTA` | Applies a JSON-patch-style delta to the agent's state. |
|
|
114
|
+
| `MESSAGES_SNAPSHOT` | Replaces the full message list (used for thread restore). |
|
|
115
|
+
| `CUSTOM` | Forwarded to your custom event handling. |
|
|
116
|
+
| `RAW` | Untyped passthrough for unrecognized events. |
|
|
117
|
+
|
|
118
|
+
## Feature support
|
|
119
|
+
|
|
120
|
+
| Feature | Supported |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| Streaming text | Yes |
|
|
123
|
+
| Thinking / reasoning blocks | Yes |
|
|
124
|
+
| Tool calls and results | Yes |
|
|
125
|
+
| Tool result handoff (client-side execution) | Yes |
|
|
126
|
+
| State snapshots and deltas | Yes |
|
|
127
|
+
| Cancellation | Yes |
|
|
128
|
+
| Message editing | Yes |
|
|
129
|
+
| Message reload | Yes |
|
|
130
|
+
| Run resumption | Yes |
|
|
131
|
+
| Interrupts (human-in-the-loop) | Experimental (`unstable_*` API, see [Interrupts](#interrupts-experimental)) |
|
|
132
|
+
| Multi-thread | Experimental (`adapters.threadList`) |
|
|
133
|
+
| History persistence | Via [history adapter](/docs/runtimes/concepts/adapters#history-adapter) |
|
|
134
|
+
|
|
135
|
+
## Related
|
|
136
|
+
|
|
137
|
+
<Cards>
|
|
138
|
+
<Card
|
|
139
|
+
icon={<AguiIcon width={20} height={20} />}
|
|
140
|
+
title="AG-UI overview"
|
|
141
|
+
description="What AG-UI is and when to pick it."
|
|
142
|
+
href="/docs/runtimes/ag-ui"
|
|
143
|
+
/>
|
|
144
|
+
<Card
|
|
145
|
+
title="Quickstart"
|
|
146
|
+
description="Minimal runtime + Thread setup."
|
|
147
|
+
href="/docs/runtimes/ag-ui/quickstart"
|
|
148
|
+
/>
|
|
149
|
+
<Card
|
|
150
|
+
title="Adapters"
|
|
151
|
+
description="Attachments, speech, feedback, history, thread list."
|
|
152
|
+
href="/docs/runtimes/concepts/adapters"
|
|
153
|
+
/>
|
|
154
|
+
</Cards>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Vercel AI SDK Runtime
|
|
3
|
+
description: Connect the Vercel AI SDK to a React chat UI via assistant-ui — useChat hooks, custom transports, frontend tools, attachments, multi-step agents, and token usage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { VercelIcon } from "@/components/icons/vercel";
|
|
7
|
+
|
|
8
|
+
`@assistant-ui/react-ai-sdk` integrates assistant-ui with the [Vercel AI SDK](https://ai-sdk.dev/). It covers `useChat` flows, custom transports, frontend tools, attachments, quote context, multi-step agents, token usage, and cloud persistence.
|
|
9
|
+
|
|
10
|
+
## Pick a version
|
|
11
|
+
|
|
12
|
+
| AI SDK | Runtime package | Docs |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `ai@^6` + `@ai-sdk/react@^3` | `@assistant-ui/react-ai-sdk` (latest) | [v6 (current)](/docs/runtimes/ai-sdk/v6) |
|
|
15
|
+
| `ai@^5` + `@ai-sdk/react@^2` | `@assistant-ui/react-ai-sdk@0.x` | [v5 (legacy)](/docs/runtimes/ai-sdk/v5-legacy) |
|
|
16
|
+
| `ai@^4` | `@assistant-ui/react-data-stream` | [v4 (legacy)](/docs/runtimes/ai-sdk/v4-legacy) |
|
|
17
|
+
|
|
18
|
+
New projects should target v6. v5 and v4 are documented for projects that have not migrated yet; both have known compatibility gaps and receive no new features.
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
`@assistant-ui/react-ai-sdk` is layered on `ExternalStoreRuntime` (see [architecture](/docs/runtimes/concepts/architecture)). Features that ship as runtime adapters work the same way they do everywhere else; see [adapters](/docs/runtimes/concepts/adapters).
|
|
23
|
+
|
|
24
|
+
## Choosing useChatRuntime vs useAISDKRuntime
|
|
25
|
+
|
|
26
|
+
Both ship in the same package.
|
|
27
|
+
|
|
28
|
+
- **`useChatRuntime`** (recommended) wraps the AI SDK's `useChat` hook and adds cloud thread support, the standard adapter slots, and `AssistantChatTransport` (which forwards system messages and frontend tools by default). Use this unless you have a reason not to.
|
|
29
|
+
- **`useAISDKRuntime`** is a lower-level hook that takes an existing `useChat` instance you control directly. Use it when you need to share the chat instance with non-assistant-ui code or wire in a custom transport that does not inherit from `AssistantChatTransport`.
|
|
30
|
+
|
|
31
|
+
## Next
|
|
32
|
+
|
|
33
|
+
<Cards>
|
|
34
|
+
<Card
|
|
35
|
+
icon={<VercelIcon width={20} height={20} />}
|
|
36
|
+
title="v6 (current)"
|
|
37
|
+
description="Quickstart, frontend tools, attachments, quotes, history, multi-step, useAISDKRuntime."
|
|
38
|
+
href="/docs/runtimes/ai-sdk/v6"
|
|
39
|
+
/>
|
|
40
|
+
<Card
|
|
41
|
+
icon={<VercelIcon width={20} height={20} />}
|
|
42
|
+
title="v5 (legacy)"
|
|
43
|
+
description="Reference for projects still on AI SDK v5."
|
|
44
|
+
href="/docs/runtimes/ai-sdk/v5-legacy"
|
|
45
|
+
/>
|
|
46
|
+
<Card
|
|
47
|
+
icon={<VercelIcon width={20} height={20} />}
|
|
48
|
+
title="v4 (legacy)"
|
|
49
|
+
description="Reference for projects still on AI SDK v4."
|
|
50
|
+
href="/docs/runtimes/ai-sdk/v4-legacy"
|
|
51
|
+
/>
|
|
52
|
+
</Cards>
|