This feature is in preview. The API may change before general availability. To try it out, contact support@intunedhq.com and we’ll enable it for your workspace.
humanInTheLoop to ask a question and get a structured answer back, or handOverControlToHuman to give an operator the live browser and let them finish the task themselves.
Both helpers call an endpoint on your system, which you register in Intuned.json. Intuned doesn’t provide the operator UI—you decide who gets asked and how.
Time spent waiting on a person does not count toward the attempt’s
requestTimeout. The timeout you pass to these helpers is the only limit on the wait. See Human in the loop for the full request and callback contract.Available helpers
humanInTheLoop— Ask a person for data and wait for the answerhandOverControlToHuman— Hand the live browser to a person
Function reference
humanInTheLoop
dataSchema.
Parameters
string
required
What you need from the person, in plain language. Shown to whoever handles the request.
JsonSchema | z.ZodSchema
required
The shape of the answer you expect. Sent to your endpoint as JSON Schema, and used to validate the callback payload before the automation resumes. Accepts a JSON Schema object or a Zod schema, like
extractStructuredData.number
default:"3600"
How long to wait for an answer, in seconds. After this, the call rejects with
HumanInTheLoopTimeoutError.SupportingMaterial[]
Context to help the person answer—a screenshot of the page they’re deciding about, extracted text, or a link. See
SupportingMaterial.Record<string, unknown>
Arbitrary JSON passed through to your endpoint untouched. Use it to route the request to the right queue, team, or end user.
HumanInTheLoopTimeoutError— No valid answer arrived withintimeout.NonRetryableError— No human-in-the-loop endpoint is configured for the project.
handOverControlToHuman
- The project must run in headful mode (
"headful": trueinIntuned.json). There’s no browser to stream otherwise. - A
handoffEndpointmust be configured. See Configure your endpoints.
string
required
What the person needs to do once they take over. Shown alongside the stream.
number
default:"3600"
How long the session stays open, in seconds. The remaining time is shown to the person in the stream UI. When it expires, the stream closes and the call rejects with
HumanInTheLoopTimeoutError.SupportingMaterial[]
Context to show next to the stream. See
SupportingMaterial.Record<string, unknown>
Arbitrary JSON passed through to your endpoint untouched.
void when the person selects Complete.
Throws
HumanInTheLoopTimeoutError— The person didn’t complete the session withintimeout.NonRetryableError— No handoff endpoint is configured, or the project isn’t running in headful mode.
SupportingMaterial
{ type: "text", text }— Plain text. Use it for extracted values, a page excerpt, or an explanation of why the automation stopped.{ type: "image", url }— An image at a URL your endpoint can fetch.{ type: "image", buffer }— An image as raw bytes. Buffers are uploaded by the runtime and delivered to your endpoint as short-lived signed URLs, so apage.screenshot()result can be passed straight through.
Related
- Human in the loop — Endpoint configuration, request payloads, and the callback contract.
- Intuned.json reference —
humanInTheLoopproject configuration. - Pause tracing — Keep credentials out of traces during a handoff.
- Non-retryable errors — Stop a Run instead of asking a person twice.