The Beanshell Tool allows you to define custom Java-based functions that can be invoked from within your AI agent using function calls. This gives you the flexibility to extend your agent's capabilities with programmable logic, calculations, or utilities, entirely outside the AI model itself.
Beanshell Tools are designed for function-style reusability. You can define multiple tools that accept arguments, process them using Java logic, and return results to the AI agent.
To use the Beanshell Element:
Adding the Beanshell tools


To properly integrate and configure the Beanshell, set the following fields:
| Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Function Name | Unique name used to call this tool function from the AI agent. | ||||||||
| Function Description | Human-readable explanation of what this function does. | ||||||||
| Function Arguments | Define the expected input parameters for this function.
| ||||||||
| Script | Beanshell (Java-like) code implementing the logic. Use argument names as variables. Return your result using the return keyword. |