Loading...
Loading...
Stop duct-taping a Python service to your React UI. Build a Next.js agent that streams tool calls, loops over reasoning steps, runs behind guardrails, swaps providers with a flag, and remembers threads across reloads.
Message a mentor about fit, prerequisites, or where to start. Replies come on WhatsApp, usually within a day.
Engineers are learning here from
Ship a multi-step AI agent inside one Next.js app. Stream tool calls through useChat, wire Zod-typed tools, add reasoning loops, guardrails, provider swaps, and DB-backed memory.
Ship a multi-step AI agent in one Next.js app with streaming tools and memory.
What you'll ship
What you'll learn
Curriculum
Setup
Wire Next.js 15, the Vercel AI SDK, useChat, and Zod into a streaming chat endpoint
First tool call
Add a Zod-typed weather tool and watch the model plan, call, and observe
Multi-step reasoning
Set maxSteps so the model can chain tools and reason across several steps in one turn
Real tools
Replace mocks with a web search tool and an HTTP fetch tool living next to the route handler
Streaming UX
Render partial tool results, show loading states, and cancel cleanly when the user changes their mind
Guardrails
Validate inputs with Zod, force output schemas on the model, and build a clean refusal path
Provider swap
Put the LLM behind a feature flag so OpenRouter and OpenAI are one env var apart
Memory persistence
Persist threads to Postgres and replay them on reload so users resume where they left off
Who it's for
who can ship a chat UI but freeze when the product wants real tool use and memory
tired of gluing a Python agent service to a React frontend over sketchy APIs
who need to understand how the Vercel AI SDK models agent loops differently from LangGraph
FAQ
No. The whole agent runs inside a single Next.js route handler. Tools, streaming, and memory all live in TypeScript next to your UI code.
OpenRouter gives you one API key and one SDK for dozens of models. The course teaches you how to swap to OpenAI, Anthropic, or Gemini cleanly when you need to.
Primarily the Vercel AI SDK because it integrates with useChat and streaming out of the box. The LangGraph mental model of plan, call, observe shapes how you reason about maxSteps and tool loops.
Tool calls are logged through the SDK stream. The course covers reasoning traces and cancel paths. Full tracing with Langfuse is a natural follow-up, not part of this build.
Pricing
Subscribe to Pro for every paid course, or buy just this one.
Unlock this course and every paid course plus workshop replays. One subscription.
You save 54% with regional pricing
One-time purchase. Lifetime access to every lesson, exercise, and update.
You save 47% with regional pricing
Still deciding? Ask Param a question
Full-stack agentic AI with Next.js and LangGraph
$79 one-time