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

Per-invocation context for a cooperative asynchronous tool. More...

#include <tool.h>

Collaboration diagram for neograph::ToolExecutionContext:
[legend]

Public Attributes

std::optional< std::chrono::steady_clock::time_point > deadline
 The run's deadline.
 
std::shared_ptr< ToolEffectBroker > effect_broker
 Optional host broker; only mediated dispatch_tool_calls invokes it.
 
std::string effect_task_id
 Stable Core node invocation slot, populated by GraphEngine.
 
std::shared_ptr< HookRuntime > hook_runtime
 Optional host-owned lifecycle boundary: dispatch_tool_calls emits the BeforeToolExecution and AfterToolExecution events of every call here.
 
std::uint8_t inherited_priority = 0
 Bounded critical-path inheritance supplied by the parent policy.
 
std::uint8_t requested_priority = 0
 Policy-derived priority request; depth never supplies this value.
 

Detailed Description

Per-invocation context for a cooperative asynchronous tool.

Existing Tool::execute_async(arguments) overrides remain valid. Tools that need to stop in-flight work can also implement ContextualAsyncTool and poll or propagate cancel_token to their transport. Dispatchers populate controller and identity so the invocation remains inside the host's resource-admission boundary rather than bypassing it.

Definition at line 39 of file tool.h.

Member Data Documentation

◆ deadline

std::optional<std::chrono::steady_clock::time_point> neograph::ToolExecutionContext::deadline

The run's deadline.

No call starts at or after it (status expired); a ContextualAsyncTool such as MCPTool also stops waiting at it.

Definition at line 50 of file tool.h.


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