Nico introduces the AI SDK’s text generation functions and shows how to switch providers by changing the model configuration. He compares GPT-4o mini, which cannot answer a current-events question without web access, with Perplexity Sonar Pro and Gemini search grounding, which return answers with sources.
Vercel AI SDK Masterclass: From Fundamentals to Deep Research
Speaker
Nico, who works on the AI SDK at Vercel, explains how to build agents and a deep research workflow in a session for AI Engineer; he also identifies himself as Niko Albanese near the end and thanks Svix for the session.
Nico explains how tools give a model named actions, descriptions, parameters, and JavaScript execute functions. With `maxSteps`, the model can use tool results in later steps: his example fetches weather for San Francisco and New York in parallel, adds the temperatures, then explains the result.
Nico shows how Zod schemas and `generateObject` produce typed data, such as a numeric sum or an array of ten AI agent definitions. He uses `.describe()` to guide the definitions toward jargon, demonstrating how schema descriptions can shape generated values.
Nico builds a Node.js deep research clone around a prompt about becoming a Division I shot put athlete. It generates search queries, searches with Exa, evaluates source relevance, extracts learnings and follow-up questions, and recursively researches them with depth and breadth limits while tracking accumulated results.
The workflow passes its collected research to o3-mini to generate a report, then writes the result as a Markdown file. Nico adds a system prompt with formatting and research analyst guidance; the demo produces a report after about a minute and uses 218 lines of code.
Takeaways
- Use the AI SDK’s provider interface to compare models while keeping the surrounding application code consistent.
- Give tools clear descriptions and typed parameters, and use a step limit to control model-led tool loops.
- Validate generated data with schemas, and use field descriptions to guide the content of structured outputs.
- Keep research state across recursive passes, cap depth and breadth, and filter duplicate sources to manage cost and context.
- Give report models explicit structure and formatting instructions instead of leaving those choices implicit.
Mentioned in this talk
Search inside this talk
What was claimed 6
- built
“I work on the AI SDK at Vercel.”
YouTube Verified10 sources· Talk, Web, Job posting· archived
- previously atNico Albanese previously at
Vercel
“I work on the AI SDK at Vercel.”
YouTube Verified3 sources· Talk, Web· archived
- featureAI SDK: Unified interface for switching between language models by changing one line of code
“we're able to switch between language models by changing just one line of code”
YouTube Unverified1 source· Talk
- integrates with
“We're going to use Zod to define the schema.”
YouTube Unverified1 source· Talk
- uses
“The service we're going to use today is called Exa.”
YouTube Unverified1 source· Talk
- metricdeep research workflow: Implemented in 218 lines of code
“We were able to build this in just 218 lines of code.”
YouTube Unverified1 source· Talk











