NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::DeepResearchConfig Struct Reference

Configuration knobs for the Deep Research graph. More...

#include <deep_research_graph.h>

Collaboration diagram for neograph::graph::DeepResearchConfig:
[legend]

Public Attributes

std::uint64_t brief_max_output_tokens = 800
 The output cap of each step.
 
ProviderControls controls {}
 Controls every step sends with its model call (temperature, reasoning effort, routing, ...), beside its output cap.
 
bool enable_clarification = false
 When true, inserts a clarify node between __start__ and brief.
 
bool enable_human_review = false
 When true, inserts a human_review node between final_report and __end__.
 
int max_concurrent_researchers = 2
 Cap per conduct_research fan-out batch.
 
int max_researcher_iterations = 2
 Inner LLM↔tools loop cap per researcher.
 
int max_supervisor_iterations = 2
 Supervisor planning rounds.
 
std::string model
 The model every step calls. Required.
 
RetryPolicy retry {2, 15'000, 2.0f, 45'000}
 The node retry policy of every step that calls the model: by default twice, after 15 s and 30 s.
 

Detailed Description

Configuration knobs for the Deep Research graph.

The graph names no model and sends no sampling of its own: model is required, and controls holds what every step sends (only the members that are set). Leave controls.temperature unset for a model that refuses it (gpt-5*, o3, Claude 4.7 and later). The iteration and concurrency defaults are small, to stay inside low rate-limit tiers; raise them where the provider allows more.

Definition at line 33 of file deep_research_graph.h.

Member Data Documentation

◆ brief_max_output_tokens

std::uint64_t neograph::graph::DeepResearchConfig::brief_max_output_tokens = 800

The output cap of each step.

A supervisor, researcher, compression or report step that stops at its cap having written nothing asks again with twice the cap, up to max_output_budget.

Definition at line 44 of file deep_research_graph.h.

◆ controls

ProviderControls neograph::graph::DeepResearchConfig::controls {}

Controls every step sends with its model call (temperature, reasoning effort, routing, ...), beside its output cap.

Unset members are not sent. controls.max_output_tokens is ignored: the caps below apply.

Definition at line 41 of file deep_research_graph.h.

◆ enable_clarification

bool neograph::graph::DeepResearchConfig::enable_clarification = false

When true, inserts a clarify node between __start__ and brief.

The node asks the LLM whether the user's query is specific enough to research; if not it throws NodeInterrupt with a clarifying question, expecting the caller to resume() with the user's answer. On resume the answer is appended to the user_query and the run proceeds to the brief node. This is the analogue of langchain-ai/open_deep_research's clarify_with_user step.

Definition at line 77 of file deep_research_graph.h.

◆ enable_human_review

bool neograph::graph::DeepResearchConfig::enable_human_review = false

When true, inserts a human_review node between final_report and __end__.

The node throws NodeInterrupt on first execution so the engine saves a checkpoint and the caller can show the report to a human; on resume it inspects the latest user message in the messages channel and either:

  • routes to __end__ if the message is empty / "approve" / "ok"
  • appends the message to supervisor_messages and routes back to supervisor (with supervisor_iterations reset) so the agent can address the feedback in another research round. Pairs naturally with PostgresCheckpointStore for cross-process resume — see examples/26_postgres_react_hitl.

Definition at line 67 of file deep_research_graph.h.

◆ retry

RetryPolicy neograph::graph::DeepResearchConfig::retry {2, 15'000, 2.0f, 45'000}

The node retry policy of every step that calls the model: by default twice, after 15 s and 30 s.

It retries an ordinary failure of the step. The provider runtime retries a transient provider failure (a rate limit, an overload) itself, and a refused request (a wrong model id, a refused parameter) fails the run.

Definition at line 54 of file deep_research_graph.h.


The documentation for this struct was generated from the following file: