agent-builder-vercel-sdk
Build conversational AI agents using Vercel AI SDK + OpenRouter. Use when creating Next.js frontends with streaming UI, tool calling, and multi-provider support.
npx skills add majiayu000/claude-skill-registry --skill agent-builder-vercel-sdk-guaderrama-ai-painter --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Vercel AI SDK Agent Builder ## Purpose Create streaming AI chat interfaces with minimal code using Vercel AI SDK and OpenRouter provider. ## When to Use - Building Next.js frontend with chat UI - Need streaming responses with SSE - Want type-safe tool calling in TypeScript - Switching between multiple AI providers - Building agentic loops with stopWhen/prepareStep ## Quick Start ### Installation ```bash npm install ai @openrouter/ai-sdk-provider zod ``` ### Environment Variables ```env OPENROUTER_API_KEY=sk-or-v1-... NEXT_PUBLIC_SITE_URL=http://localhost:3000 ``` ## Backend Setup (Route Handler) ### Basic Chat Endpoint ```typescript // app/api/chat/route.ts import { OpenRouter } from '@openrouter/ai-sdk-provider' import { streamText } from 'ai' const openrouter = new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY }) export async function POST(req: Request) { const { messages } = await req.json() const result = streamText({ model: openrouter('openai/gpt-4o'), system: 'You are a helpful assistant', messages, }) return result.toDataStreamResponse() } ``` ### With Tool Calling ```typescript import { z } from 'zod' import { tool } from 'ai' const tools = { generateImage: tool({ d
- Purpose
- When to Use
- Quick Start
- Installation
- Environment Variables
- Backend Setup (Route Handler)
- Basic Chat Endpoint
- With Tool Calling
- Frontend Integration
- Using useChat Hook
- With Tool Results Display
- Advanced Patterns
- Multi-Step Agentic Loop
- Custom Streaming with streamUI
npm install ai @openrouter/ai-sdk-provider zod
What does the agent-builder-vercel-sdk skill do?
Build conversational AI agents using Vercel AI SDK + OpenRouter. Use when creating Next.js frontends with streaming UI, tool calling, and multi-provider support.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill agent-builder-vercel-sdk-guaderrama-ai-painter --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
