|
ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
|
LLM agent with instructions, tools, and optional response format. More...
#include <agent.hpp>
Public Member Functions | |
| Agent (std::string name) | |
| Construct an agent with the given display name. | |
| Agent & | WithInstructions (std::string instructions) |
| Set the system prompt for this agent. | |
| Agent & | WithResponseFormat (core::ResponseFormat format) |
| Set the structured output format. | |
| Agent & | WithOptions (core::Options options) |
| Set generation parameters (temperature, max_tokens, etc.). | |
| Agent & | WithTools (std::vector< std::shared_ptr< core::Tool > > tools) |
| Replace all tools with the given list. | |
| Agent & | AddTool (std::shared_ptr< core::Tool > tool) |
| Append a tool to the agent's tool list. | |
| std::shared_ptr< core::ExternalTool > | FindExternalTool (const std::string &name) const |
| Search for an ExternalTool by name within the agent's tools. | |
| std::shared_ptr< core::Tool > | AsTool (std::string tool_name, std::string description, const std::shared_ptr< Runner > &runner) |
| Convert this agent into a tool that other agents can invoke. | |
| const std::string & | name () const |
| const std::string & | instructions () const |
| const foresthub::Optional< core::ResponseFormat > & | response_format () const |
| const core::Options & | options () const |
| const std::vector< std::shared_ptr< core::Tool > > & | tools () const |
LLM agent with instructions, tools, and optional response format.
| std::shared_ptr< core::Tool > foresthub::agent::Agent::AsTool | ( | std::string | tool_name, |
| std::string | description, | ||
| const std::shared_ptr< Runner > & | runner ) |
Convert this agent into a tool that other agents can invoke.
When called, the tool runs this agent via the given runner.
| tool_name | Tool name visible to the LLM. |
| description | Human-readable description sent to the LLM. |
| runner | Runner instance used to execute this agent. |
| std::shared_ptr< core::ExternalTool > foresthub::agent::Agent::FindExternalTool | ( | const std::string & | name | ) | const |
Search for an ExternalTool by name within the agent's tools.
| name | Tool name to search for (exact match). |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |