Introduction

The Beanshell Prompt allows you to run custom Java code within your AI agent or application. This is useful for performing advanced logic, manipulating data, or preparing inputs dynamically before passing them to the AI or other components.

With Beanshell, developers can write powerful scripts that interact with form data, session variables, external APIs, and more, giving full control over the flow and behavior of the AI agent.

Use Beanshell when you need custom calculations, conditional processing, or any logic that goes beyond simple configuration.

Get started

How to use it

To use the Beanshell Element:

Adding the Beanshell prompt

  1. Locate the Beanshell element under the Prompt Plugin section.
  2. Drag and drop the File element into the “Drop a prompt here” section.

Configure form properties

To properly integrate and configure the Beanshell, set the following fields: