For the conceptual overview, checkpoint shapes, and lifecycle, see the HITL Guide. This page is the TypeScript SDK reference.
Add human-in-the-loop checkpoints to a Valyu DeepResearch task with the TypeScript SDK.
Quick start
Enable checkpoints with ahitl object, then let wait() drive them through an onInteraction callback. Return a response to auto-respond, or null to skip and keep polling:
Checkpoints
Checkpoints fire in order; only enabled ones fire.
Reference
Manual polling and respond()
Manual polling and respond()
If you’d rather drive the loop yourself, poll
status() and respond when status.status is awaiting_input or paused:respond() returns DeepResearchRespondResponse with success, status ("running" or "queued"), deepresearch_id, error.Checkpoint response shapes
Checkpoint response shapes
Each checkpoint expects a specific response object:
Typed helpers
Typed helpers
HITL history and types
HITL history and types
After checkpoints complete,
status.hitl_history records each interaction (type, auto_continued, created_at, responded_at, response):
