AI SDK 7: le app agent hanno bisogno prima di un contratto di esecuzione
Vercel AI SDK 7 aggiunge reasoning control, scoped context, tool approvals, WorkflowAgent, MCP Apps, sandbox e telemetry.
Execution contract read
Rischio: i provider restano diversi. Per un chatbot semplice è troppo, ma con file, API esterne e approval il contratto è necessario.
What happened
AI SDK 7 è stato pubblicato il 25 giugno 2026 e amplia sviluppo, runtime, harness integration e observability degli agenti.
Why it matters
La pratica chiave è separare prompt, runtime context e tool context. Credenziali e dati tenant non dovrebbero entrare nel prompt.
Community signal
La community discute costi, streaming tool output, BYOK, reasoning trace, Guardrails e workflow multi-agent: problemi operativi, non demo.
Checklist
Checklist: contextSchema per tool, approval per azioni rischiose, durable execution, timeout separati, MCP Apps in sandbox e tracing completo.
Risks
Rischio: i provider restano diversi. Per un chatbot semplice è troppo, ma con file, API esterne e approval il contratto è necessario.
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 per tool, approval per azioni rischiose, durable execution, timeout separati, MCP Apps in sandbox e tracing completo.
Fonti
- 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