Skip to content
Agentmart
Submit a tool

vercel-ai-sdk-integration

Integrate Vercel AI SDK v6 with Vue.js applications (client-side).

Skill by xiaoland

IndexedApache-2.0
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/xiaoland-vercel-ai-sdk-integration

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Integrate Vercel AI SDK v6 with Vue.js applications (client-side). Use when building chat interfaces, text completions, or streaming structured data with AI models. Covers Chat class, useCompletion, useObject composables.

Use cases: frontend, cloud, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/vercel-ai-sdk-integration

What's inside

Skill name
vercel-ai-sdk-integration
Description
Integrate Vercel AI SDK v6 with Vue.js applications (client-side). Use when building chat interfaces, text completions, or streaming structured data with AI models. Covers Chat class, useCompletion, useObject composables.
License
Apache-2.0
Compatibility
Vue 3, AI SDK v6 (@ai-sdk/vue ^2.x)
Metadata
author: xiaoland · version: 1.2
Instructions
114 lines in SKILL.md · view on GitHub

Files (5)

  • SKILL.md
  • chat-component.vue · assets/
  • chat.md · references/
  • use-completion.md · references/
  • use-object.md · references/

SKILL.md (first lines)

---
name: vercel-ai-sdk-integration
description: Integrate Vercel AI SDK v6 with Vue.js applications (client-side). Use when building chat interfaces, text completions, or streaming structured data with AI models. Covers Chat class, useCompletion, useObject composables.
license: Apache-2.0
compatibility: Vue 3, AI SDK v6 (@ai-sdk/vue ^2.x)
metadata:
  author: xiaoland
  version: "1.2"
---

# Vercel AI SDK v6 for Vue.js (Client-Side)

## Critical: SDK v6 Breaking Changes

**NEVER use these deprecated patterns:**
- `useChat()` composable → Use `new Chat()` class instead
- `generateObject()` / `streamObject()` → Use `generateText()` / `streamText()` with `output` parameter

## Decision Framework

**For multi-turn chat:** Use `Chat` class. See [chat.md](references/chat.md)

**For single-prompt completion:** Use `useCompletion`. See [use-completion.md](references/use-completion.md)

**For streaming JSON objects:** Use `useObject`. See [use-object.md](references/use-object.md)

## Installation

```bash
pnpm add @ai-sdk/vue zod
```

## Quick Start

### Chat

```vue
<script setup lang="ts">
import { Chat } from "@ai-sdk/vue";
import { ref } from "vue";

const input = ref("");
const chat = new Chat({ api: "/api/chat" });

const send = () => {
  chat.sendMessage({ text: input.value });
  input.value = "";
};
</script>

<template>
  <div v-for="m in chat.messages" :key="m.id">
    <p v-for="(part, i) in m.parts" :key="i">
      <span v-if="part.type === 'text'">{{ part.text }}</span>
    </p>
  </div>
  <input v-model="input" @keyup.enter="send" />
</template>
```

### Completion

```vue
<script setup lang="ts">
import { useCompletion } from "@ai-sdk/vue";

const { completion, complete, isLoading } = useCompletion({ api: "/api/completion" });
</script>

<template>
  <button @click="complete('Summarize Vue 3')" :disabled="isLoading">Go</button>
  <p>{{ completion }}</p>
</template>
```

### Streaming Objects

```vue
<script setup lang="ts">
import { experimental_useObject as useObject } from "@ai-sdk/vue";
import { z } from "zod";

const { object, submit } = useObject({
  api: "/api/recipe",
  schema: z.object({ name: z.string(), steps: z.array(z.string()) }),
});
</script>

<template>
  <button @click="submit({ dish: 'pasta' })">Generate</button>
  <pre>{{ object }}</pre>
</template>
```

## Anti-patterns

```typescript
// WRONG: Deprecated useChat
import { useChat } from "@ai-sdk/vue"; // ❌

// CORRECT: Chat class
import { Chat } from "@ai-sdk/vue";
const chat = new Chat({ api: "/api/chat" }); // ✓
```

```typescript
// WRONG: Separate loading state
const isLoading = ref(false); // ❌

// CORRECT: Use chat.status
<button :disabled="chat.status === 'streaming'">Send</button> // ✓
```

## References

- [chat.md](references/chat.md) — Chat class API, messages, status, methods
- [use-completion.md](references/use-completion.md) — Single-prompt text generation
- [use-object.md](references/use-object.md) — Streaming JSON objects with schemas

## Assets

From xiaoland/agents, Apache-2.0.

More from xiaoland/agents

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jan 12, 2026 (9 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.2
License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from xiaoland

Cite this page

vercel-ai-sdk-integration skill. Agent Mart. https://agentmart.dev/skills/xiaoland-vercel-ai-sdk-integration (last updated 2026-10-24)