Course 2 - Module 2 - Lesson 2
Vercel AI SDK, Gateway, Workflows, Sandbox, and durable agents as building blocks
Agent Platforms in Plain English
Separate the building blocks
Vercel's AI SDK is a TypeScript library for building AI features, including text generation and tool use. A library is code your application uses. AI Gateway provides a shared route to supported models and providers. It is a different responsibility from designing your application's behavior.
For example, a study app might use the SDK to request a practice question and display the response. Gateway can handle the model connection. Neither component decides whether the question teaches the right topic; your instructions, examples, and checks still matter.
Give long tasks a way to continue
Workflow supports multi-step work that can pause and resume, including after failures. Durable means that progress can survive an interruption instead of living only in one running process. Durable agent approaches combine this persistence with an agent's sequence of model and tool calls.
Imagine a draft waiting overnight for an editor's approval. The system needs to retain the draft, who may approve it, and the next permitted step. Persistence helps resume the job, but it does not make a wrong draft correct or authorize publication.
Run code in a separate environment
Vercel Sandbox runs code in isolated environments, useful when checking generated programs. Isolation limits where code executes; developers still need to choose what credentials and network access to provide. Treat a sandbox as one boundary within the wider design.
A small report helper might use SDK for drafting, Gateway for model access, Workflow for an approval wait, and Sandbox only if it runs generated code. Choose components for a specific need. A plain text drafting feature may need fewer parts.
Tiny experiment
Map a draft-report app to SDK, Gateway, Workflow, and Sandbox. Explain which component could be omitted if the app never executes generated code.
Confidence check
Does your imagined task need to survive a long pause, or could it finish during one ordinary request?
