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

Manages the agent execution loop: LLM calls, tool dispatch, and handoffs. More...

#include <runner.hpp>

Public Member Functions

 Runner (std::shared_ptr< foresthub::core::LLMClient > client, foresthub::core::ModelID model)
 Construct a runner with an LLM client and default model.
RunnerWithMaxTurns (int max_turns)
 Set the turn limit for agent execution.
RunResultOrError Run (const std::shared_ptr< Agent > &starting_agent, const std::shared_ptr< core::Input > &input)
 Execute an agent workflow from the given starting point.
const std::shared_ptr< foresthub::core::LLMClient > & client () const
const core::ModelIDdefault_model () const
const foresthub::Optional< int > & max_turns () const

Detailed Description

Manages the agent execution loop: LLM calls, tool dispatch, and handoffs.

Constructor & Destructor Documentation

◆ Runner()

foresthub::agent::Runner::Runner ( std::shared_ptr< foresthub::core::LLMClient > client,
foresthub::core::ModelID model )

Construct a runner with an LLM client and default model.

Parameters
clientLLM client for chat requests.
modelDefault model identifier.

Member Function Documentation

◆ client()

const std::shared_ptr< foresthub::core::LLMClient > & foresthub::agent::Runner::client ( ) const
inline
Returns
LLM client for chat requests.

◆ default_model()

const core::ModelID & foresthub::agent::Runner::default_model ( ) const
inline
Returns
Model used when agents don't specify one.

◆ max_turns()

const foresthub::Optional< int > & foresthub::agent::Runner::max_turns ( ) const
inline
Returns
Turn limit (empty = unlimited).

◆ Run()

RunResultOrError foresthub::agent::Runner::Run ( const std::shared_ptr< Agent > & starting_agent,
const std::shared_ptr< core::Input > & input )

Execute an agent workflow from the given starting point.

Parameters
starting_agentAgent that begins execution.
inputUser prompt or conversation history.
Returns
Success with RunResult, or failure with error message.

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