# Vercel AI SDK Runtime
URL: /docs/runtimes/ai-sdk/overview

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.

> For AI agents: a documentation index is available at [llms.txt](/llms.txt). Use `.md` for canonical markdown pages; `.mdx` is kept as a backwards-compatible alias on supported URL paths.

`@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.

## Pick a version

| AI SDK                       | Runtime package                       | Docs                                           |
| ---------------------------- | ------------------------------------- | ---------------------------------------------- |
| `ai@^7` + `@ai-sdk/react@^4` | `@assistant-ui/react-ai-sdk` (latest) | [v7 (current)](/docs/runtimes/ai-sdk/v7)       |
| `ai@^6` + `@ai-sdk/react@^3` | `@assistant-ui/react-ai-sdk@1.x`      | [v6 (legacy)](/docs/runtimes/ai-sdk/v6-legacy) |
| `ai@^5` + `@ai-sdk/react@^2` | `@assistant-ui/react-ai-sdk@0.x`      | [v5 (legacy)](/docs/runtimes/ai-sdk/v5-legacy) |
| `ai@^4`                      | `@assistant-ui/react-data-stream`     | [v4 (legacy)](/docs/runtimes/ai-sdk/v4-legacy) |

New projects should target v7. v6, v5, and v4 are documented for projects that have not migrated yet; all have known compatibility gaps and receive no new features.

## Architecture

`@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).

For reload-safe streaming (persist an in-flight response so the client can reconnect), see [Resumable Streams](/docs/guides/resumable-streams).

## Choosing useChatRuntime vs useAISDKRuntime

Both ship in the same package.

- **`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.
- **`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`.

## Next

- [v7 (current)](/docs/runtimes/ai-sdk/v7) — Quickstart, frontend tools, attachments, quotes, history, multi-step, useAISDKRuntime.
- [v6 (legacy)](/docs/runtimes/ai-sdk/v6-legacy) — Reference for projects still on AI SDK v6.
- [v5 (legacy)](/docs/runtimes/ai-sdk/v5-legacy) — Reference for projects still on AI SDK v5.
- [v4 (legacy)](/docs/runtimes/ai-sdk/v4-legacy) — Reference for projects still on AI SDK v4.