# ViteHub and Vercel AI SDK

Use AI SDK for model calls, structured output, tools, an Agent loop, or
streaming UI in an existing app. Use ViteHub when you also want Agents found
from files and server services picked for your host.

You can use both. ViteHub's model Driver takes a compatible AI SDK model. AI SDK does not need Vercel hosting.

## Separate model APIs from application services

| Task | AI SDK | ViteHub |
| --- | --- | --- |
| Call models through one TypeScript API. | Core model and provider APIs. | Model Drivers take the documented model forms. |
| Run a tool loop. | Agent APIs, including `ToolLoopAgent`. | Agent Drivers run Capability-contributed tools. |
| Stream a chat interface. | Streaming and UI APIs for several frameworks. | Agent chat contracts and Vue UI components. |
| Configure server storage and background jobs. | Combine the SDK with your server stack. | KV, Blob, Database, Queue, Workflow, and more. |

AI SDK includes Agent APIs. It is more than a set of model request helpers.

## Keep an existing AI SDK app when it fits

A chat app that already has routes, auth, storage, and deploys may need only
AI SDK. You do not need ViteHub for tools or streaming.

Try ViteHub for shared server APIs, explicit Agent Capabilities, file
Workspaces, or generated host setup. You can also add one ViteHub service and
keep your chat loop.

## Test the boundary between them

Pick the model and provider first, and put its credential in the server
environment. Then test one streamed response, one tool result, cancellation,
and errors through your app route.

Do not run two tool loops for the same Agent run. Decide if your app or the
ViteHub Driver owns the loop.

Sources checked on 29 October 2026:
[AI SDK introduction](https://ai-sdk.dev/docs/introduction) and
[AI SDK Agents](https://ai-sdk.dev/docs/agents/overview).
Read [ViteHub Agent Drivers](https://vitehub.dev/docs/agents/agent-drivers) for model forms and
[Build a chat app](https://vitehub.dev/docs/agents/build-a-chat-app) for a full example.

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/compare.md)
- Agent frameworks
  - [Mastra](https://vitehub.dev/raw/docs/compare/mastra.md)
  - [VoltAgent](https://vitehub.dev/raw/docs/compare/voltagent.md)
  - [Vercel AI SDK](https://vitehub.dev/raw/docs/compare/ai-sdk.md) (this page)
  - [LangGraph JS](https://vitehub.dev/raw/docs/compare/langgraph.md)
  - [Cloudflare Agents](https://vitehub.dev/raw/docs/compare/cloudflare-agents.md)
- [Server frameworks](https://vitehub.dev/raw/docs/compare/nuxthub.md)
- [Vercel, Netlify, Cloudflare](https://vitehub.dev/raw/docs/compare/vercel-netlify-cloudflare.md)

Next: [LangGraph JS](https://vitehub.dev/raw/docs/compare/langgraph.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
