Package com.embabel.agent.core.hitl
Class TypeRequestingTool
-
- All Implemented Interfaces:
-
com.embabel.agent.api.tool.DelegatingTool,com.embabel.agent.api.tool.Tool,com.embabel.agent.api.tool.ToolInfo
public final class TypeRequestingTool<T extends Object> implements DelegatingTool
Tool decorator that requires a value of type T from the user before execution.
When called, this tool throws AwaitableResponseException with a TypeRequest. The UX presents a form for the type, and when the user provides the value, it's added to the blackboard and the tool is re-invoked.
-
-
Field Summary
Fields Modifier and Type Field Description private final Tool.Definitiondefinitionprivate final Tool.Metadatametadataprivate final Tooldelegate
-
Method Summary
Modifier and Type Method Description Tool.DefinitiongetDefinition()Tool definition for LLM Tool.MetadatagetMetadata()Optional metadata ToolgetDelegate()Tool.Resultcall(String input)Execute the tool with JSON input. -
-
Method Detail
-
getDefinition
Tool.Definition getDefinition()
Tool definition for LLM
-
getMetadata
Tool.Metadata getMetadata()
Optional metadata
-
getDelegate
Tool getDelegate()
-
call
Tool.Result call(String input)
Execute the tool with JSON input.
- Parameters:
input- JSON string matching inputSchema- Returns:
Result to send back to LLM
-
-
-
-