Pause deep research at key decision points for user review and guidance
DeepResearch tasks support optional human-in-the-loop checkpoints that pause execution at key decision points, allowing users to review and guide the research process.
HITL is only available for individual deep research tasks. It is not available for batch requests.
Each checkpoint maps to a stage in the research process. Only enabled checkpoints fire — the rest are skipped automatically.
Query analysis
The agent analyzes the query and prepares to research.
planning_questions checkpoint
Pause: The agent asks clarifying questions before starting research. You provide answers to guide scope and focus.
Research planning
The agent builds a research plan — areas to investigate, estimated steps, and methodology.
plan_review checkpoint
Pause: You review the research plan. Approve it or request modifications (e.g., “focus more on supply chain”).
Research execution
The agent searches, reads sources, and gathers information.
source_review checkpoint
Pause: You review the sources grouped by domain. Include or exclude domains to control what goes into the report.
Outline generation
The agent generates a structured outline for the report.
outline_review checkpoint
Pause: You review the outline. Approve it or request structural changes (e.g., “add a regulatory risks section”).
Report writing
The agent writes the final report using approved sources and outline.
Completed
The report is ready. Retrieve it from the status response.
Each pause sets the task status to awaiting_input. If you don’t respond within 5 minutes, the status transitions to paused — but you can still respond at any time to resume.
Checkpoint active, container holding capacity, fast resume on response
paused
Checkpoint timed out (5 min), state saved, respond anytime to resume
running
Research or writing in progress
queued
Re-enqueued after responding to a paused task
Responding to a paused task still works — the task re-enqueues at highest priority. The only difference is a brief cold-start delay as the container restarts.
The agent asks clarifying questions before starting research.Interaction data:
{ "questions": [ { "question": "What geographic regions should the research focus on?", "context": "The query mentions global markets — narrowing scope improves depth" }, { "question": "Are there specific competitors you want analyzed?" } ]}
Review the research plan before execution.Interaction data:
{ "plan": "I'll research this topic by first examining...", "estimated_steps": 15, "research_areas": ["Market size analysis", "Competitive landscape", "Regulatory environment"]}
Response (approve):
{ "approved": true }
Response (request modifications):
{ "approved": false, "modifications": "Focus more on battery supply chains and less on historical context"}
Instead of manual polling, use the wait() method with a HITL callback to handle checkpoints automatically:
from valyu import Valyuclient = Valyu()task = client.deepresearch.create( query="Analyze the competitive landscape of AI chip manufacturers", mode="heavy", hitl={"plan_review": True, "source_review": True},)def handle_interaction(interaction): if interaction.type in ("plan_review", "outline_review"): return {"approved": True} elif interaction.type == "source_review": return {"included_domains": [], "excluded_domains": []} elif interaction.type == "planning_questions": return { "answers": [ {"question": q["question"], "answer": "Use your best judgment"} for q in interaction.data["questions"] ] } return Noneresult = client.deepresearch.wait( task.deepresearch_id, on_interaction=handle_interaction,)print(result.output)
Both SDKs also provide convenience helpers for type-safe responses: respond_planning_questions() / respondPlanningQuestions(), approve_plan() / approvePlan(), respond_source_review() / respondSourceReview(), and approve_outline() / approveOutline(). See the Python SDK and TypeScript SDK references for details.