vercel · Vercel AI SDK Docs
AI SDK UI: Transport
Explains how to implement custom transport layers for the AI SDK UI to manage communication between the client and the server.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
AI SDK UI: Transport
Explains how to implement custom transport layers for the AI SDK UI to manage communication between the client and the server.
When To Use
Use when you need to implement custom communication protocols, proxy requests through a specific backend, or modify how data is streamed between the AI SDK UI and your server.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/ai-sdk-ui-transport-workflow-guide.md | Documentation detailing how to configure default, custom, and dynamic transports for the useChat hook in the AI SDK UI. | Questions about documentation detailing how to configure default, custom, and dynamic transports for the useChat hook in the AI SDK UI. |
examples/ai-sdk-ui-transport-usechat-default-http.text | A code example demonstrating the use of the useChat hook with the default HTTP transport in the AI SDK UI. | Exact payloads, commands, or snippets shown in A code example demonstrating the use of the useChat hook with the default HTTP transport in the AI SDK UI. |
examples/ai-sdk-ui-transport-usechat-defaultchattransport-react.text | A React code example demonstrating how to implement the DefaultChatTransport within the useChat hook from the AI SDK. | Exact payloads, commands, or snippets shown in A React code example demonstrating how to implement the DefaultChatTransport within the useChat hook from the AI SDK. |
examples/ai-sdk-ui-transport-defaultchattransport-react.text | A React code example demonstrating how to implement the DefaultChatTransport within the useChat hook to configure custom API endpoints and headers. | Exact payloads, commands, or snippets shown in A React code example demonstrating how to implement the DefaultChatTransport within the useChat hook to configure cus... |
examples/ai-sdk-ui-transport-default-chat-transport-usechat.text | A code example demonstrating how to configure the DefaultChatTransport within the useChat hook, including custom API endpoints, headers, and body parameters. | Exact payloads, commands, or snippets shown in A code example demonstrating how to configure the DefaultChatTransport within the useChat hook, including custom API... |
examples/ai-sdk-ui-transport-usechat-defaultchattransport.text | A code example demonstrating how to implement the DefaultChatTransport within the useChat hook to customize request preparation. | Exact payloads, commands, or snippets shown in A code example demonstrating how to implement the DefaultChatTransport within the useChat hook to customize request p... |
examples/ai-sdk-ui-transport-tool-loop-agent-react.text | A React code example demonstrating how to use the DirectChatTransport with a ToolLoopAgent in the AI SDK UI. | Exact payloads, commands, or snippets shown in A React code example demonstrating how to use the DirectChatTransport with a ToolLoopAgent in the AI SDK UI. |
examples/ai-sdk-ui-transport-ai-sdk-ui-direct-chat-transport.text | A code example demonstrating how to instantiate a DirectChatTransport with custom agent options and reasoning settings. | Exact payloads, commands, or snippets shown in A code example demonstrating how to instantiate a DirectChatTransport with custom agent options and reasoning settings. |
What This Skill Covers
- The useChat transport system provides fine-grained control over how messages are sent to your API endpoints and how responses are processed. This is particul...
- Main sections:
Default Transport,Custom Transport Configuration,Dynamic Configuration,Request Transformation,Direct Agent Transport.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://ai-sdk.dev/docs/ai-sdk-ui/transport