The AI SDK is an open-source TypeScript toolkit from Vercel for building AI applications and agents, licensed under the Apache license. Its core is one API for generating text and structured output, calling tools, and running agents across many model providers, and its UI layer adds framework-agnostic hooks for chat interfaces.
It exists so that application code doesn't depend on one provider's API. The SDK standardizes how models from different providers are called, so switching models doesn't mean rewriting the integration. That also makes it the layer where a model change enters an agent.
An agent runs a loop of model calls and tool calls. The loop continues while the model asks for tools, and stops when the model finishes, a tool needs approval, or a stop condition is met. The default agent stops after a fixed number of steps, as a guard against runaway loops, and a callback before each step can change the model, the tools, or the messages for that step. The SDK also has a harness abstraction that runs coding-agent harnesses through the same interface.
Telemetry uses OpenTelemetry. Once an integration is registered, each call emits a root span for the agent, a span per step, a span per model call, and a span per tool execution, and inputs and outputs are recorded unless you turn that off. For tests, the SDK ships mock models that return controlled output without calling a provider. They make unit tests repeatable, but they test your code, not the model: whether a real model's answers are good still needs evals run against real calls.
No questions answered under this concept yet. The rest of the index is filled in.
Try Tessary on Cloud.
free · 10,000 traces a month · 1 GB · 30-day retention · $10 one-time credit for triage and RCA · no credit card