Skip to main content
A Review is any moment where a factory pauses work and asks for human input before continuing—whether that’s approving a sensitive tool call, answering a clarifying question, or connecting a required app. The Worker waits safely until a person responds, and your application can render and resolve Reviews directly inside your own UI through the Factory API. In the support example, the Worker prepares to refund order 1188. Because stripe_create_refund is configured to require sign-off, the Worker pauses and emits a Review. Your app notifies a support lead, captures their decision, and sends it back—unblocking the refund immediately.
Human-in-the-loop Review flow: Worker pauses on a tool approval, Worklayer emits reviews.approvals.created, your app collects approval, submits POST /reviews/{requestId}/decision, and the Worker resumes.Human-in-the-loop Review flow: Worker pauses on a tool approval, Worklayer emits reviews.approvals.created, your app collects approval, submits POST /reviews/{requestId}/decision, and the Worker resumes.

Review types

The Factory API supports three Review types today under /v1/rooms/{roomId}/reviews:

Detecting pending Reviews

When a Worker requests a Review, its status switches to waiting until the request is resolved. You can discover pending Reviews in two ways:
  • Push (recommended): subscribe to reviews.approvals.created, reviews.questions.created, and reviews.connect_apps.created via Subscriptions.
  • Poll: call GET /v1/rooms/{roomId}/reviews to list pending requests for the Room, oldest first (optionally filtered by workerId and kind).
(Tool names reflect whichever apps are connected to your factory.)

Resolving a Review from your app

Send approve or deny for the pending requestId:
The decision applies to every tool call listed in calls. For security, the request exposes tool names and input field names rather than raw input values.
Approval and question responses return 200 OK with requestId and workerId, and the Worker resumes immediately.

Who can resolve a Review

Reviews aren’t locked to a single surface—the first valid response wins:
  • Your application, via the Factory API using the factory’s API key.
  • Your team in the Worklayer web app (the owner and authorized factory members).
  • Your team in Slack, when the task originated from a Slack Channel.
Once resolved, the Review is closed and any subsequent submission returns 409 Conflict.

Handling requestId updates

Always use the latest requestId returned by GET /v1/rooms/{roomId}/reviews or your webhook payload. If the pending tool calls or questions change before someone responds, Worklayer issues a new requestId. Submitting an outdated requestId returns 409 Conflict with Request has changed.—simply re-fetch the pending Reviews and present the updated request.

Errors

Workers

Inspect the status and live output of the Worker waiting on Review.

Subscriptions

Receive instant webhooks whenever a Review is created.