Build and Deploy an FAQ Agent with Vercel AI SDK and Gateway
Continue with the workshop writeup
Open the canonical pages, recording, materials, and code repo.
We take the FAQ agent from the earlier deployment workshops and ship it on Vercel. The same agent answers Data Engineering Zoomcamp questions. Now a Next.js app serves the UI and a serverless function runs the agent loop, with the chat model reached through the Vercel AI Gateway.
Last week we put the agent on Cloudflare Workers. This week we test whether Vercel is a better fit. Vercel is JavaScript-first, like Cloudflare, but it markets agentic infrastructure.
We use four parts of that stack:
- The AI SDK for building the agent.
- The AI Gateway as one keyless endpoint in front of every model provider.
- Workflows for durable runs.
- Eve, a convention-over-configuration agent framework where an agent is just a directory.
We build the same agent four ways, each in its own deployable folder, so we can compare the frameworks against one fixed problem:
- The Vercel AI SDK, with a
ToolLoopAgentand in-memory MiniSearch. - The same agent rebuilt on Eve, with durable sessions and a built-in HTTP API.
- Eve again, but we move retrieval to Upstash Vector for semantic search.
- A Python (FastAPI) backend with a hand-written agent loop, for teams that prefer Python.
Here's how a browser request flows through the app to the agent loop, the model, and retrieval:
The first three build on each other, so we go through them in order. For the last one we rewrite the first version in Python. We swap the TypeScript backend for FastAPI while keeping the Next.js frontend. The same Python service then serves both the UI and the API as a single Vercel Function.
We start on the free tier, where Vercel's free plan covers the build and local testing. Its active-CPU billing only counts time the function is computing, not the time it waits on the model. You pay only while the agent runs, which suits a chat agent well.
The only thing you pay for is the model. That costs a few dollars of OpenAI usage, or the Vercel AI Gateway's free credits once a card is on file. We discuss the limits and pricing in Part 3: Deploy to Vercel.
Links
Resources used here:
- End-to-End Agent Deployment - the original FastAPI FAQ agent this one descends from.
- Lambda Agent Deployment - the Docker/serverless session whose Python backend the fourth version reuses.
- Deploy an FAQ Agent with Cloudflare Workers and Vectorize - last week's session, the version we port to Vercel here.
- Vercel AI SDK - the TypeScript toolkit for the agent loop and the chat UI.
- Eve - Vercel's convention-over-configuration agent framework.
- Upstash Vector - the managed semantic vector index used in Option 3.
Hosted by
Alexey Grigorev
Chief Agent Officer at AI Shipping Labs
Software engineer and machine learning practitioner with 15+ years of experience building production ML systems. I focus on practical, production-grade ML and AI systems, from early prototypes to reliable systems in production.
I'm the founder of DataTalks.Club, a free community that connects tens of thousands of practitioners worldwide, and the creator of the Zoomcamp series, free, code-first programs that have reached 100,000+ learners globally.
At AI Shipping Labs, I'm building the kind of environment that would have accelerated my own career growth. After years of teaching at scale, I wanted something more focused: a space for action-oriented builders who want to turn AI ideas into real projects. The community gives members the structure, accountability, and peer support to ship practical AI products consistently, even alongside their main jobs.
More from AI Shipping Labs
Inference Engineering Book Club — Week 1
For this first session, finish Chapters 0, 1, and 2 (Inference, Prerequisites, Architecture). We kick off the weekly reading rhythm. Come with your questions and takeaways. Can't …
August 17, 2026
Inference Engineering Book Club — Kickoff
We are starting a book reading club, and the first book is Inference Engineering by Philip Kiely (Baseten). It is a book for engineers who want to understand the technologies behi…
August 10, 2026
LLM Zoomcamp 2026 office hours — Session 6
August 3, 2026