AI SDK 7: agent apps сначала требуют контракт выполнения
Vercel AI SDK 7 добавляет reasoning control, scoped context, tool approvals, WorkflowAgent, MCP Apps, sandbox и telemetry.
Execution contract read
Риск: provider differences остаются. Для простого бота это много, но при files, external APIs и approvals контракт дешевле инцидентов.
What happened
AI SDK 7 вышел 25 июня 2026 года и расширил разработку, выполнение, harness integration и наблюдаемость агентов.
Why it matters
Главная практика: разделить prompt, runtime context и tool context. Credentials и tenant data не должны попадать в prompt.
Community signal
Сообщество обсуждает cost, streaming tool output, BYOK, reasoning traces, Guardrails и multi-agent workflows. Боль уже операционная.
Checklist
Checklist: contextSchema на tool, approvals для рискованных действий, durable execution, отдельные timeout budgets, MCP Apps sandbox и full trace.
Risks
Риск: provider differences остаются. Для простого бота это много, но при files, external APIs и approvals контракт дешевле инцидентов.
Runtime contract map
| Area | AI SDK 7 surface | Operational question |
|---|---|---|
| Context | runtimeContext, toolsContext, contextSchema | Keep tenant state and credentials out of prompt text. |
| Approval | Tool-level policy and human gates | Revalidate risky tool calls before execution continues. |
| Durability | WorkflowAgent or workflow layer | Survive deploys, restarts, and delayed approvals. |
| UI boundary | MCP Apps plus sandboxed iframe | Separate user review surfaces from model-visible tools. |
| Observability | OpenTelemetry, lifecycle events, usage | Trace steps, tool calls, approvals, errors, and cost together. |
Checklist
• Checklist: contextSchema на tool, approvals для рискованных действий, durable execution, отдельные timeout budgets, MCP Apps sandbox и full trace.
Источники
- Vercel Blog: AI SDK 7
- Vercel Changelog: AI SDK 7 is now available
- AI SDK Docs: Migrate AI SDK 6.x to 7.0
- Vercel KB: Pass state to AI SDK tools and agents with context
- AI SDK Docs: Model Context Protocol tools
- AI SDK Docs: MCP Apps
- AI SDK Docs: Getting started with coding agents
- Vercel Community: AI SDK topics