Skip to main content

AI agent pauses for World ID approval before booking a flight

Human-in-the-loop lets an AI agent pause mid-execution and wait for a real, verified human to approve an action before continuing. Every approval is cryptographically bound to the action via World ID — no bots, no spoofing, no replay. Built on the Workflow SDK and the Vercel AI SDK.

Install

Environment variables

Get these from the World developer portal by creating an app.

Step 1: Define the workflow

Step 2: Register the approval tool

Step 3: Render the approval on the client

This example uses the <HumanApproval> component, if you want to customize the UI you can use the useHumanApproval hook instead.

Flight booking example

Check out Flight booking example for a complete implementation of a human-in-the-loop workflow with World ID approval.