Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::ToolExecutor Class Reference

Processes tool calls from model output. More...

#include <entropic/mcp/tool_executor.h>

Public Member Functions

 ToolExecutor (ServerManager &server_manager, const LoopConfig &loop_config, EngineCallbacks &callbacks, ToolExecutorHooks hooks={})
 Construct with shared dependencies.
 
void set_permission_persist (const PermissionPersistInterface &persist)
 Set permission persistence interface.
 
std::vector< Messageprocess_tool_calls (LoopContext &ctx, const std::vector< ToolCall > &tool_calls)
 Process a batch of tool calls.
 
const ToolCallHistorytool_history () const
 Access the tool-call history ring buffer.
 
void set_hooks (const HookInterface &hooks)
 Set the hook dispatch interface.
 
void set_authorization_manager (MCPAuthorizationManager *auth_mgr)
 Set the MCP authorization manager.
 

Detailed Description

Processes tool calls from model output.

Handles approval flow, duplicate detection, circuit breaker, tier allowlist enforcement, and bash_commands restriction. Subsystem of AgentEngine.

Version
1.8.5

Definition at line 54 of file tool_executor.h.

Constructor & Destructor Documentation

◆ ToolExecutor()

entropic::ToolExecutor::ToolExecutor ( ServerManager server_manager,
const LoopConfig loop_config,
EngineCallbacks callbacks,
ToolExecutorHooks  hooks = {} 
)

Construct with shared dependencies.

Parameters
server_managerServer manager for tool execution.
loop_configLoop configuration.
callbacksShared callbacks.
hooksOptional engine-level hooks.
Version
1.8.5
Parameters
server_managerServer manager.
loop_configLoop configuration.
callbacksShared callbacks.
hooksOptional engine-level hooks.

Definition at line 33 of file tool_executor.cpp.

Member Function Documentation

◆ process_tool_calls()

std::vector< Message > entropic::ToolExecutor::process_tool_calls ( LoopContext ctx,
const std::vector< ToolCall > &  tool_calls 
)

Process a batch of tool calls.

Parameters
ctxMutable loop context.
tool_callsTool calls from model output.
Returns
Vector of result messages to append to context.
Version
1.8.5
Parameters
ctxLoop context (provides effective_max_tool_calls_per_turn, P3-18).
tool_callsTool calls from model output.
Returns
Result messages.

Definition at line 62 of file tool_executor.cpp.

◆ set_authorization_manager()

void entropic::ToolExecutor::set_authorization_manager ( MCPAuthorizationManager auth_mgr)
inline

Set the MCP authorization manager.

Parameters
auth_mgrAuthorization manager (must outlive ToolExecutor). @utility
Version
1.9.4

Definition at line 574 of file tool_executor.h.

◆ set_hooks()

void entropic::ToolExecutor::set_hooks ( const HookInterface &  hooks)
inline

Set the hook dispatch interface.

Parameters
hooksHook dispatch interface. @utility
Version
1.9.1

Definition at line 566 of file tool_executor.h.

◆ set_permission_persist()

void entropic::ToolExecutor::set_permission_persist ( const PermissionPersistInterface persist)

Set permission persistence interface.

Parameters
persistPermission persist callbacks (wired by facade).
Version
1.8.8
Parameters
persistPermission persist callbacks.

Definition at line 49 of file tool_executor.cpp.

◆ tool_history()

const ToolCallHistory & entropic::ToolExecutor::tool_history ( ) const
inline

Access the tool-call history ring buffer.

Returns
Const reference to history (read-only for validator retry enrichment and diagnostic tools). @utility
Version
2.0.6-rc16

Definition at line 558 of file tool_executor.h.


The documentation for this class was generated from the following files: