Agentic Tool
Deprecated
Use SimpleAgenticTool for flat tool orchestration, or PlaybookTool/StateMachineTool for controlled disclosure
Replace with
import com.embabel.agent.api.tool.agentic.simple.SimpleAgenticTool
SimpleAgenticToolAn agentic tool that uses an LLM to orchestrate other tools.
Unlike a regular Tool which executes deterministic logic, an AgenticTool tool uses an LLM to decide which sub-tools to call based on a prompt.
Parameters
Tool definition (name, description, input schema)
Optional tool metadata
Llm to use for orchestration
Sub-tools available for the LLM to orchestrate
Create prompt for the LLM to use. Specify to customize behavior
Whether to capture artifacts from nested AgenticTools. Default is false, meaning only artifacts from leaf tools are captured. Set to true to capture all artifacts including those from nested agentic sub-tools.
Constructors
Create an agentic tool that will need to be customized to add tools (and possibly specify an LLM) to be useful.
Properties
Functions
Execute the tool with JSON input.
Extension function to convert an Embabel Tool to a Spring AI ToolCallback.
Wrap this tool to conditionally await before execution.
Create a copy with different captureNestedArtifacts setting. When false (default), artifacts from nested AgenticTools are not captured. When true, all artifacts are captured including those from nested agentic sub-tools.
Wrap this tool to always require confirmation before execution.
Create a new tool with a different description. Useful for providing context-specific descriptions while keeping the same functionality.
Extension function to wrap a Tool with event publication.
Create a copy with different model.
Create a copy with fixed syste prompt. The system prompt describes the supervisor behavior.
Create a copy with tools extracted from an object with @LlmTool methods. If the object has no @LlmTool methods, returns this unchanged.
Create a copy with tools extracted from multiple objects with @LlmTool methods. Objects without @LlmTool methods are silently ignored.
Create a copy with additional tools.