Operations
An operation is a single AI invocation as part of an agent. It is possible to define multiple operations on a single agent instance, allowing to reuse model and other settings. Depending on the agent type, like orchestrator agents and document agents there are pre-defined operations. Those pre-defined agents are used as part of automatic invocation within Flowable.
Creating a new operation
To create a new operation, operations must be selected on the left hand side and then press the 'Add operation' button below the list of operations. A modal opens to add operations, to fill in the basic information.
The name describes the purpose of this operation and is used to identify it when linking it to an agent task in BPMN and CMMN. With the key, a unique identifier, the agent is linked to the task, and it is used to execute the agent.
Input and output mapping
The "Input type" and "Output type" allows to define the different types available. There are two main options available:
- Text: Simple, potentially unstructured text is used as input/output.
For inputs the text is available as part of the prompt with the expression
${text}
. - Structured: A structure is specified for input/output. A new tab will be visible to define the structure.
For the document agent there are different input and outputs, they are described as part of the document agent reference.
Text input
The text input can be used in the system and user message with the pre-defined variable ${text}
Structured input/output
For a structured input/output there is a separate corresponding tab, in which it's possible to add parameters:
There are three different fields which need to be provided:
- Label: A human-readable label of the property, this name will be shown for example inside the agent task in BPMN and CMMN when linking the operation. Furthermore, for output parameter the name will be also sent to the AI as part of the schema to clarify which data is required.
- Name: A name, will be automatically generated based on the label. This name is a variable and should not contain any spaces etc.
Assuming the name is
city
, the corresponding attribute will be available in the user and system message with the expression${city}
. - Type: The type of the variable, this can be a string, date, boolean etc. It will be used provide an appropriate input field to the user, as well as for output fields to tell the LLM which format is required.
Prompt
There are up to three different prompt types available, depending on the context: default prompt, simple prompt, prompt template.
For the prompt simple prompt and prompt template it is possible to specify a system message and user message. A user message is an input provided by the end user that initiates interaction with the AI. A system message is a special instruction used to guide or control the behavior of the AI, only visible through Flowable Control in case audit for exchanges is enabled. System messages can set context, define tone, or impose rules on how the AI should respond, helping shape the overall interaction without being part of the user-facing conversation.
For external agents the system message can't be defined since this should be defined in the external agent itself. Only a user message needs to be provided
Simple prompt
A simple prompt is the direct way to define the prompt directly in the operation. This allows to use JUEL expressions inside the template.
For a structured prompt the name is available as variables, while for a simple text prompt the input can be referred to with ${text}
.
Prompt template
The prompt template allows to link a text based template model. With a template model there is the option to use a Freemarker template with more options to specify if conditions etc.
For a structured prompt the name is available as variables, while for a simple text prompt the input can be referred to with ${text}
.
Default prompt
The default prompt is only available for pre-defined operations. It allows to use a prompt which is from Flowable engineered and maintained over the time of the releases. There is the possibility that this prompt template gets improved in the releases, when we find better prompts based on our tests. To customize prompts use either a simple prompt or a prompt template, both options will disable the default prompt and will not get adapted and changed automatically in new versions.