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

What a ToolGate is allowed to know about the run it is gating. More...

#include <tool_dispatch.h>

Public Attributes

std::shared_ptr< const std::vector< ToolCall > > batch_calls
 Immutable assistant-message batch being decided.
 
std::optional< json > resume_value
 The human's answer from GraphEngine::resume().
 
int step = 0
 Super-step index. Zero on the Agent path.
 
std::string thread_id
 Mirrors RunConfig::thread_id. Empty on the Agent path.
 

Detailed Description

What a ToolGate is allowed to know about the run it is gating.

Deliberately small and passed by value. A graph::RunContext would be the obvious thing to hand over, but dispatch_tool_calls lives in the core neograph layer while RunContext belongs to neograph::graph — and the standalone llm::Agent, which shares this dispatcher, has no RunContext at all. So the gate gets a struct of its own, which both callers can fill.

Add fields here as gates need them; a by-value struct grows without breaking anybody's gate signature.

Definition at line 55 of file tool_dispatch.h.

Member Data Documentation

◆ batch_calls

std::shared_ptr<const std::vector<ToolCall> > neograph::ToolGateContext::batch_calls

Immutable assistant-message batch being decided.

Set by the dispatcher only when a gate is present. Shared ownership keeps the snapshot alive while an asynchronous gate is suspended. A gate can reject relationships between sibling calls before any Tool starts (for example, duplicate writes to the same resource).

Definition at line 72 of file tool_dispatch.h.

◆ resume_value

std::optional<json> neograph::ToolGateContext::resume_value

The human's answer from GraphEngine::resume().

Empty on a fresh run, which is how a gate distinguishes "nobody has been asked yet" from "the answer was no" — and therefore how it avoids interrupting forever.

Definition at line 59 of file tool_dispatch.h.


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