Use case · Vercel AI SDK

Human-in-the-loop approvals for the Vercel AI SDK

Building agents with the Vercel AI SDK? Gate the tools that do irreversible things. Call gate.require() inside a tool's execute function and the agent waits for a human approval before acting, with a tamper-evident audit trail for every decision.

execute: async ({ amount, to }) => {
  await gate.require("payments.transfer", { amount, to });
}

Where it fits

  • Gate a tool's execute() behind human sign-off
  • Require approval only above a policy threshold
  • Ship agentic features with a verifiable approval record

Frequently asked questions

How do I add human-in-the-loop to Vercel AI SDK tools?+

Call gate.require() at the top of a tool's execute function. The tool call blocks until a human approves in Slack or the console, then proceeds — or fails closed on reject or timeout — while the AI SDK's streaming and orchestration stay unchanged.

Does it work with generateText, streamText, and agents?+

Yes. Seal lives inside the tool's execute function, so it applies wherever the AI SDK invokes tools — generateText, streamText, or a multi-step agent loop.