AI SDK 7: aplikasi agent perlu kontrak eksekusi sebelum menambah tools
Vercel AI SDK 7 membawa reasoning control, scoped context, tool approvals, WorkflowAgent, MCP Apps, sandbox, dan telemetry.
Execution contract read
Risiko: abstraksi tidak menghapus perbedaan provider. Untuk bot sederhana mungkin berlebihan, tetapi produk agent membutuhkan batas eksekusi yang jelas.
What happened
AI SDK 7 dirilis 25 Juni 2026 dan memperluas cara agent dikembangkan, dijalankan, diintegrasikan dengan harness, dan diobservasi.
Why it matters
Pisahkan prompt, runtime context, dan tool context. Kredensial, tenant data, dan access token tidak seharusnya masuk ke prompt.
Community signal
Sinyal komunitas berpusat pada biaya, streaming tool output, BYOK, reasoning traces, Guardrails, dan workflow multi-agent.
Checklist
Checklist: contextSchema per tool, approval untuk aksi berisiko, durable execution, timeout terpisah, sandbox MCP Apps, dan trace menyeluruh.
Risks
Risiko: abstraksi tidak menghapus perbedaan provider. Untuk bot sederhana mungkin berlebihan, tetapi produk agent membutuhkan batas eksekusi yang jelas.
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 untuk aksi berisiko, durable execution, timeout terpisah, sandbox MCP Apps, dan trace menyeluruh.
Sumber
- 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