ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::agent::Handoff Class Reference

Tool that transfers control from one agent to another. More...

#include <handoff.hpp>

Inheritance diagram for foresthub::agent::Handoff:
foresthub::core::ExternalToolBase foresthub::core::ExternalTool foresthub::core::Tool

Public Member Functions

 Handoff (std::string name, std::string description, std::shared_ptr< Agent > agent, foresthub::core::ModelID model="")
 Construct a handoff tool that transfers control to the given target agent.
core::ToolType GetToolType () const override
 Identifies this tool as a handoff.
Public Member Functions inherited from foresthub::core::ExternalToolBase
std::string ToolName () const override
 Returns the stored name field.
std::string ToolDescription () const override
 Returns the stored description field.
const json & ToolParameters () const override
 Returns the stored parameters field.
void ToJson (json &j) const override
 Serialize external tool definition to JSON.
Public Member Functions inherited from foresthub::core::ExternalTool
bool IsExternal () const override
 Always returns true — this type is an ExternalTool.

Public Attributes

std::shared_ptr< Agenttarget_agent
 Agent to switch to when invoked.
core::ModelID model
 Optional model override (empty = use runner default).
Public Attributes inherited from foresthub::core::ExternalToolBase
std::string name
 Tool name sent to the LLM.
std::string description
 Human-readable description sent to the LLM.
json parameters
 JSON schema defining expected parameters.

Detailed Description

Tool that transfers control from one agent to another.

Constructor & Destructor Documentation

◆ Handoff()

foresthub::agent::Handoff::Handoff ( std::string name,
std::string description,
std::shared_ptr< Agent > agent,
foresthub::core::ModelID model = "" )
inline

Construct a handoff tool that transfers control to the given target agent.

Parameters
nameTool name visible to the LLM.
descriptionHuman-readable description sent to the LLM.
agentTarget agent to transfer control to.
modelOptional model override for the target agent.

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