NeoGraph 0.10.0
A C++17 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>

Public Attributes

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. Default 2 so 3× parallel researchers don't collectively exceed the 30K-tokens-per-minute tier-1 Anthropic limit; raise on higher tiers.
 
int max_researcher_iterations = 2
 Inner LLM↔tools loop cap per researcher.
 
int max_supervisor_iterations = 2
 Supervisor planning rounds (keep ≤ 3 for low-tier Anthropic quotas).
 
std::string model = "claude-sonnet-4-5"
 Claude model identifier.
 

Detailed Description

Configuration knobs for the Deep Research graph.

The default values are calibrated for Anthropic tier-1 quotas (30K input TPM) running Claude Sonnet 4.5. They are the safest-shipping defaults for a fresh user pointed at Anthropic without rate-limit wallpaper, but they are NOT optimal for other providers / higher tiers:

  • tier-3 Anthropic users have ~5× headroom — bump max_concurrent_researchers to 5–8.
  • Self-hosted vLLM / OpenAI: no minute-window TPM throttle, max_concurrent_researchers 8–16.
  • Different provider: also override model to a non-Claude id; the default is set up for SchemaProvider("claude"). A future major version may move these magic-number defaults out of the public struct and into a DeepResearchConfig::for_anthropic_tier(N) factory; for now they stay here and the doc string carries the caveat.

Definition at line 43 of file deep_research_graph.h.

Member Data Documentation

◆ 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 70 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 60 of file deep_research_graph.h.


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