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

A gate's verdict on one tool call. More...

#include <tool_dispatch.h>

Public Types

enum class  Kind { Allow , Deny , Interrupt }
 

Public Attributes

std::optional< json > args
 Allow: the arguments to actually pass.
 
std::optional< json > payload
 Interrupt: the structured payload, surfacing at RunResult::interrupt_value["value"] for the caller to render a prompt.
 
std::string reason
 Deny / Interrupt: why. Reaches the model (Deny) or the caller (Interrupt).
 

Detailed Description

A gate's verdict on one tool call.

One gate with three verdicts rather than four hooks: permission, audit, argument rewriting and the per-call interrupt are the same primitive — observe and intervene at the tool-call boundary — wearing different hats. Four hooks would be four things to keep in step, and the next capability would land in some of them and not others.

Definition at line 84 of file tool_dispatch.h.

Member Enumeration Documentation

◆ Kind

enum class neograph::ToolDecision::Kind
strong
Enumerator
Allow 

Run it, optionally with rewritten arguments.

Deny 

Do not run it.

The reason goes back to the model as the tool's result, so it can react instead of asking again.

Interrupt 

Do not run it, and pause the whole run for a human.

Definition at line 85 of file tool_dispatch.h.

Member Data Documentation

◆ args

std::optional<json> neograph::ToolDecision::args

Allow: the arguments to actually pass.

Empty means "what the model sent", unrewritten — and costs nothing, unlike a default-constructed json.

Definition at line 96 of file tool_dispatch.h.


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