Interface AgenticTool
-
- All Implemented Interfaces:
-
com.embabel.agent.api.tool.Tool,com.embabel.agent.api.tool.ToolInfo,com.embabel.agent.api.tool.agentic.ToolChaining
public interface AgenticTool<THIS extends AgenticTool<THIS>> implements Tool, ToolChaining<THIS>
A tool that uses an LLM to orchestrate sub-tools.
Unlike a regular Tool which executes deterministic logic, an AgenticTool uses an LLM to decide which sub-tools to call based on a prompt.
Implementations differ in how they manage tool availability:
com.embabel.agent.api.tool.agentic.simple.SimpleAgenticTool: All tools available immediately
com.embabel.agent.api.tool.agentic.playbook.PlaybookTool: Progressive unlock via conditions
com.embabel.agent.api.tool.agentic.state.StateMachineTool: State-based availability
All implementations share a consistent fluent API for configuration. The type parameter THIS enables fluent method chaining that preserves the concrete type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAgenticTool.Companion
-
Method Summary
Modifier and Type Method Description abstract THISwithLlm(LlmOptions llm)Create a copy with different LLM options. abstract THISwithSystemPrompt(AgenticSystemPromptCreator creator)Create a copy with a dynamic system prompt creator. THISwithSystemPrompt(String prompt)Create a copy with a fixed system prompt. abstract THISwithMaxIterations(Integer maxIterations)Create a copy with a different max iterations limit. abstract THISwithParameter(Tool.Parameter parameter)Create a copy with an additional parameter in the definition. abstract THISwithToolObject(Object toolObject)Create a copy with tools extracted from an object with @LlmTool methods. abstract LlmOptionsgetLlm()LLM options for orchestration. abstract IntegergetMaxIterations()Maximum number of tool loop iterations. -
Methods inherited from class com.embabel.agent.api.tool.Tool
call, withDescription, withName, withNote -
Methods inherited from class com.embabel.agent.api.tool.agentic.ToolChaining
withToolChainingFrom, withToolChainingFrom, withToolChainingFromAny -
Methods inherited from class com.embabel.agent.api.tool.ToolInfo
getDefinition, getMetadata -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
withSystemPrompt
abstract THIS withSystemPrompt(AgenticSystemPromptCreator creator)
Create a copy with a dynamic system prompt creator. The creator receives the execution context and input string.
-
withSystemPrompt
THIS withSystemPrompt(String prompt)
Create a copy with a fixed system prompt. This is a convenience method that delegates to withSystemPrompt with a creator.
-
withMaxIterations
abstract THIS withMaxIterations(Integer maxIterations)
Create a copy with a different max iterations limit.
-
withParameter
abstract THIS withParameter(Tool.Parameter parameter)
Create a copy with an additional parameter in the definition.
-
withToolObject
abstract THIS withToolObject(Object toolObject)
Create a copy with tools extracted from an object with @LlmTool methods. If the object has no @LlmTool methods, returns this unchanged.
-
getLlm
abstract LlmOptions getLlm()
LLM options for orchestration.
-
getMaxIterations
abstract Integer getMaxIterations()
Maximum number of tool loop iterations.
-
-
-
-