ToolWrapper

class ToolWrapper(agent: BaseAsyncLlmAgent, toolName: String, toolDescription: String) : LlmTool

Adapts a BaseAsyncLlmAgent so it can be passed as a tool to another LLM.

The wrapped agent exposes a single string parameter input — the calling LLM passes natural-language instructions, which become a user message to the inner agent. The agent's textual response is returned to the outer LLM.

Mirrors the Python reference's ToolWrapper.

Constructors

Link copied to clipboard
constructor(agent: BaseAsyncLlmAgent, toolName: String, toolDescription: String)

Properties

Link copied to clipboard
Link copied to clipboard
open override val descriptor: ToolDescriptor
Link copied to clipboard
open val name: String

Functions

Link copied to clipboard
open suspend override fun execute(arguments: JsonObject): String
Link copied to clipboard
open fun matches(toolName: String): Boolean