Back to prompt library
Vercel AI SDK Setup and Initial Agent
Linked challenge: Real-time Adaptive Gaming UI Agent
Prompt source
planning1 lines1 sectionsNo variables0 checklist items
Initialize a new Next.js project with Vercel AI SDK. Create an API route `api/chat` that acts as your primary agent endpoint. Define a basic agent that uses GPT-5 Pro (or a placeholder for now) to respond to a simple 'What should I do next in the game?' query. Show the `api/chat` handler code, including Vercel AI SDK imports and model initialization.