Build and Deploy an FAQ Agent with Vercel AI SDK and Gateway
Recording available with Main or above.
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. The agent calls the chat model 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 the platform as infrastructure for agents.
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.
Upgrade to Basic to access this workshop
- Full workshop overview
- Complete page list
- Step-by-step tutorial
- Cancel anytime
Tutorial pages
More from AI Shipping Labs
Tracing a FAQ agent with Langfuse
We add Langfuse tracing to a FAQ agent, then turn its traces into reviewed evaluation examples. We start with the existing FAQ application, add the Cloud integration and repeat th…
November 4, 2026
Jev for LLM Evaluations
In the batch and flex workshop we built an eval for the FAQ agent and scored it with an LLM judge. Here we swap that judge for Jev, a model that returns typed decisions instead of…
September 22, 2026
After the Interview: Offers and Negotiation
What happens after the interviews end: how to handle rejections without losing momentum, when to accept an offer, and how to negotiate salary with confidence.
September 16, 2026