vercel/ai ? reverse-engineered prompt

Reverse engineered prompt

Build me a TypeScript AI SDK for making AI powered apps and agents. I want it to feel simple for developers to use in Node and common frontend setups, especially Next.js and React, but it should also work with Svelte and Vue.

The main thing is a clean, unified way to call different model providers without rewriting app code every time someone switches from OpenAI to Anthropic or Google. It should handle basic text generation, structured JSON style output with schema validation, and agent style workflows where the model can call tools in a loop. I also want chat and streaming UI helpers so someone can wire up a chatbot or generative UI quickly.

Please include good docs, examples, and a few starter templates that show real use cases like chat, tool calling, and image generation. Make the developer experience polished and modern, with sensible defaults, but still let people connect directly to providers if they want. If anything is unclear, look up the current AI SDK docs online and mirror that overall product feel.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab