Skip to main content
Pause deep research at key decision points so a human can review and guide the agent.
For the conceptual overview, checkpoint shapes, and lifecycle, see the HITL Guide. This page is the Python SDK reference.
HITL is only available for individual deep research tasks, not for batch requests.

Add human-in-the-loop checkpoints to a Valyu DeepResearch task with the Python SDK.

Open in Cursor

Quick start

Enable checkpoints with a hitl dict (or HitlConfig), then let wait() drive them through an on_interaction callback. Return a response to auto-respond, or None to skip and keep polling:

Checkpoints

Checkpoints fire in order; only enabled ones fire.

Reference

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.
Each checkpoint expects a specific response dict:
After checkpoints complete, status.hitl_history records each interaction (type, auto_continued, created_at, responded_at, response):