These examples track the current AI SDK release. Prefer the Agent API (`ToolLoopAgent`, `stopWhen`, `prepareStep`) over one-off versioned landing pages — version URLs rot as soon as the next major ships.
If you are migrating from older AI SDK majors: structured output moved toward `Output.object()` / schema-first helpers, agent loops expose explicit stop conditions (`stopWhen`, `stepCountIs`), and tool-call repair is a first-class recovery path when the model emits malformed arguments. Open the featured Agent API patterns below for the working shape; skim the pattern READMEs for breaking-change callouts.