# Vatio vs building it yourself with the Vercel AI SDK

The Vercel AI SDK and Vatio are two ways to give your app an agent. With the AI SDK, you or your coding agent build the agent inside your app: the SDK gives you a TypeScript API for calling models, the tool-calling loop and chat UI hooks, and you build and run everything around it. With Vatio, your coding agent writes the agent into your app's project and Vatio runs it, with the parts around the loop already there: conversation storage, verified user identity, an inbox where your team takes over, channels beyond your app, tests from real conversations, and preview and live versions. Choose the AI SDK when AI is part of your product's own features or you need full control of the model, the code and the data. Choose Vatio when you want a customer-facing agent for your app's users without building and operating that runtime.

## What the Vercel AI SDK is

The AI SDK is Vercel's free, open-source TypeScript toolkit for building AI applications and agents. It works with Next.js, React, Svelte, Vue and Angular and runtimes such as Node.js, and it is provider-agnostic: the same code calls models from OpenAI, Anthropic, Google, Mistral, DeepSeek and many others.

- **AI SDK Core** is one API for generating text and structured objects, calling tools and building agents. A `ToolLoopAgent` runs the loop: the model picks a tool, your code runs it, the result goes back, until the task is done or a stop condition is met.
- **Tools** have a description, an input schema (Zod or JSON Schema) and an `execute` function that runs your code. A tool can wait for a person's approval before it runs (`toolApproval` in AI SDK 7, released in June 2026). Tools can also come from MCP servers.
- **AI SDK UI** gives framework hooks such as `useChat` for chat and generative interfaces.
- **Durable runs.** AI SDK 7 added `WorkflowAgent`, for agent runs that survive restarts and deploys, on Vercel's Workflow.
- **Testing.** Mock models in `ai/test` make unit tests of your AI code repeatable.

What it leaves to you is the operation around the loop. Its chat persistence guide saves messages through `loadChat` and `saveChat` functions you write, and notes that a real application would use a database or cloud storage. Resuming a chat stream after a page reload needs the `resumable-stream` package, a Redis instance and a persistence layer.

## What Vatio is

Vatio is an agent for the app you're building, with a coding agent or an app builder. It has two steps. The fastest, from any chat: add the remote MCP server `https://vatio.ai/mcp` as a connector in Claude, ChatGPT or Cursor, sign in with a Vatio account and ask for the agent; it is created in a preview to try, and nothing reaches your users until you publish ([Vatio in Claude and ChatGPT](https://vatio.ai/docs/mcp)). To build the agent into the app's code: in the project run `npx @vatio-ai/skills`, then `/vatio-init`, and `/vatio-improve` daily. Your coding agent reads the app, asks what the code doesn't answer and writes the agent into your project: instructions in `vatio.yml`, tools that call your API, and knowledge entries, which you can review like the rest of your code.

Your team follows the conversations in the inbox and takes one over by replying. When a reply is wrong, someone reports it and writes what should have happened, and that note becomes a test. `/vatio-improve` fixes the cause in your project, Vatio replays the reported cases against a preview, and you approve each publish.

## The main differences

An SDK gives you the model loop and tool calling; you build and operate the rest. This is what the rest is, and who provides it:

| | Built with the AI SDK | Vatio |
|---|---|---|
| Model and loop | Any provider you choose; the loop runs in your server | Vatio runs both and picks the model ([Models and data](https://vatio.ai/docs/model)) |
| Hosting | Your app's server or functions | Vatio's servers |
| Conversation storage | Your database, through code you write | Kept by Vatio, encrypted, with a retention period you set |
| User identity | Your own auth, checked in your route | A token your backend signs; Vatio verifies it |
| Inbox and takeover | Yours to build | The inbox: read, take over by replying, hand back |
| Channels | Your own UI; anything else you integrate | Widget, browser, iOS, Android and Flutter SDKs; WhatsApp and Instagram |
| Tests from real conversations | Yours to build; the SDK has mocks for unit tests | Every reported reply with a note becomes a test, replayed on preview |
| Rollouts | Your deploys | Preview and live, publish checks, rollback |
| Tool code | Any TypeScript in `execute` | One HTTP request per tool; logic stays in your backend |

## When the AI SDK is the better choice

- **AI is a feature of your product**, not a chat agent for your users' questions: drafting text in an editor, extracting fields from a document, structured objects for your UI, generative interfaces. Vatio's agent replies in text.
- **You need a specific model, or to switch between providers.** Vatio picks the model, and choosing one per agent isn't available yet.
- **Your tools need to run code in the loop**, such as several calls with branching, a calculation or a direct database read. A Vatio tool is one HTTP request that answers in seconds; anything more is an endpoint in your backend.
- **The agent isn't customer-facing**: an internal assistant, a batch job, a step in a pipeline. An inbox, handoff and extra channels matter less there.
- **You want the whole runtime in your own infrastructure** and have the engineering time to build and maintain it, from message storage to the screens your team works in.

## When Vatio fits better

You want a customer-facing agent for your app's users, and you'd rather not build and run what surrounds the loop. Vatio provides it:

- **Identity.** Your backend signs a short-lived token (RS256; `sub`, `aud` set to your workspace slug, `exp`) with the key from `vatio auth --new-key`. Private tools forward it as `Bearer $auth.token`, can't take a user id as a parameter, and your API reads the user from the verified token ([Private tools](https://vatio.ai/docs/authentication/tools)).
- **People.** The inbox shows every conversation with the tool calls behind each reply. Your team takes over by replying. To have the agent ask for a person, you give it a tool that calls your backend, which alerts whoever you choose with a link to the conversation ([Handoff](https://vatio.ai/docs/handoff)).
- **Channels.** The same agent answers in your app and on WhatsApp and Instagram, where a **Sign in** button brings the user's identity along.
- **Improvement.** Reported replies become tests. `/vatio-improve` fixes the cause, Vatio replays the cases on preview, and publishing refuses a version that breaks one live gets right unless you override it with `--force`. Rollback brings back the previous live version ([Improve](https://vatio.ai/docs/improve)).
- **Tool health.** `vatio tools` shows each tool's error rate, timeouts and latency, and the calls that failed.

It also fits when you build with a coding agent and won't be the one maintaining a chat backend: you review files and approve publishes.

## Moving from the AI SDK to Vatio

Your coding agent does the move in your project. This is what maps to what:

1. **Start.** Run `npx @vatio-ai/skills`, then `/vatio-init` in Claude Code (or, from a chat, connect the Vatio MCP server `https://vatio.ai/mcp` and ask for the agent), and point it at your agent:

   ```text
   /vatio-init move our support chat from the AI SDK route in app/api/chat to Vatio: same tools, same system prompt
   ```

   The first time it pushes the agent, your browser opens to sign in with email, Google or GitHub; signing in creates your account.
2. **Your system prompt becomes instructions.** What you pass the model as its system prompt becomes `agent.instructions` in `vatio.yml`, and its tone can go in `personality`.
3. **Your tools become Vatio tools.** Each tool's description becomes `description` and `when_to_use`, its input schema becomes `parameters`, and its `execute` becomes a `request` to your API. When `execute` makes several calls or branches, that code moves into one endpoint in your backend. An order lookup your coding agent might write as `tools/my_order.yml`:

   ```yaml
   description: The signed-in user's order, by its number.
   when_to_use: The user asks where an order of theirs is.
   parameters:
     type: object
     properties:
       order_number: { type: string }
     required: [order_number]
   access: private
   request:
     method: GET
     base_url: "$env.APP_API"
     path: /me/orders/$params.order_number
     headers:
       Authorization: "Bearer $auth.token"
   respond:
     data:
       order: "$.order"
   ```

4. **The user comes from the token.** Where your route read the user from its session, the tool is `access: private` and your endpoint reads the user from the verified token. A private tool that declares `user_id` fails the deploy. Your coding agent can add the token signing to your backend.
5. **Your docs become knowledge.** Text you put in the prompt, or retrieved from your own store, becomes Markdown knowledge entries the agent searches with `knowledge_lookup` ([Knowledge](https://vatio.ai/docs/knowledge)).
6. **Your chat UI.** Swap your `useChat` component for Vatio's widget, or keep your own components on the [browser SDK](https://vatio.ai/docs/sdk/). Either way, a publishable key lists your app's origins (`vatio keys create publishable --origin https://your-app.com`, or **Settings → API keys** in the inbox).
7. **Try, publish, retire.** The inbox's **Try the agent** web chat chats as a visitor who isn't signed in; to try signed-in behavior, put preview's widget in a development build and sign in as a test user. Approve publication when it answers the way you want, then remove the old route.

## Sources

Checked on 14 October 2026. Features and plans change: check the Vercel AI SDK's own documentation, listed below, for what it offers today.

- AI SDK introduction: https://ai-sdk.dev/docs/introduction
- Agents overview: https://ai-sdk.dev/docs/agents/overview
- Tools and tool calling: https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling
- AI SDK UI overview: https://ai-sdk.dev/docs/ai-sdk-ui/overview
- Chatbot message persistence: https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-message-persistence
- Chatbot resume streams: https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-resume-streams
- Testing: https://ai-sdk.dev/docs/ai-sdk-core/testing
- Providers: https://ai-sdk.dev/providers/ai-sdk-providers
- AI SDK 7 announcement: https://vercel.com/blog/ai-sdk-7
- Repository: https://github.com/vercel/ai

## Frequently asked questions

### Should I build my app's agent with the Vercel AI SDK or use Vatio?

Use the AI SDK when AI is part of your product's own features, when you need a specific model or provider, or when you want the whole runtime in your own infrastructure and have the time to build and run it. Use Vatio when you want a customer-facing agent for your app's users without building conversation storage, identity checks, an inbox with takeover, extra channels, tests from real conversations and preview/live rollouts yourself.

### Can a Vatio tool run code like an AI SDK tool's execute function?

No. A Vatio tool is one HTTP request to your API, described in YAML, that answers within seconds. Anything that needs branching, a second call or a computed response belongs in your backend, behind one endpoint the tool calls. Your coding agent can move the code from an execute function into that endpoint.

### Which model does a Vatio agent use?

Vatio runs the model for you and picks it: there is no model to host and no model key in your project. The Models and data page in Vatio's docs lists the current models. Choosing a model per agent isn't available yet; if you need a specific one, you can write to Vatio's support with the model and what it is for.

### Can I keep my own chat UI if I move from the AI SDK to Vatio?

Yes. Instead of the ready-made widget, the browser SDK (@vatio-ai/sdk) gives you the conversation as events and methods, and you render it in your own components. The iOS, Android and Flutter SDKs do the same in a mobile app. Each needs a publishable key that lists the origins your app runs on.

### Where are conversations stored with Vatio?

In Vatio, encrypted at rest, for as long as your workspace's retention period allows, and your team reads them in the inbox. With the AI SDK, storing messages is code you write against your own database.

## Related guides

- [Vatio vs the Claude Agent SDK](https://vatio.ai/docs/guides/vatio-vs-claude-agent-sdk): An agent harness to host yourself, or a runtime for your app's customer chat, and how to move.
- [Build an AI agent for your app](https://vatio.ai/docs/guides/build-an-ai-agent): Run npx @vatio-ai/skills and /vatio-init in your app’s project, answer what the code can’t, and try the preview before publishing.
- [Tools](https://vatio.ai/docs/tools): Give the agent your API as tools.
- [Improve](https://vatio.ai/docs/improve): Report mistakes in the inbox, /vatio-improve fixes them, and you approve the update.
