Operation Node

Overview

The Operation Node is a component that executes operational tasks and actions without AI processing. It performs predefined operations like API calls, database updates, file operations, or system integrations based on configured actions that can run sequentially or in parallel.

Configuration Details

Field
Description
Type
Required
Default

name

The unique name of the operations agent within the workflow.

String

Yes

-

start

Indicates if this is the starting agent of the workflow.

Boolean

No

false

transition

Defines the transition to the next flow node after operations complete. See TransitionDef

Object

No

-

answerAfterFinish

Whether the agent should provide an answer message after finishing operations.

Boolean

No

false

answerMessage

Custom message to display when operations are complete.

String

No

-

actionMode

Execution mode for the actions: sequential (one after another) or parallel (simultaneously).

String

Yes

"sequential"

actions

List of actions to be executed by this operations agent. Each action references a function definition. See ActionDef

List

Yes

[]

loginRequired

Whether user authentication is required to execute these operations.

Boolean

No

-

Common Configuration Objects

ActionDef

Actions are reusable definitions that can be invoked during workflow execution. An action references a function definition to be executed.

Field
Description
Type
Required

id

Unique action identifier

String

No

name

Unique action definition name

String

Yes

condition

Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded

String

No

functionRef

References a reusable function definition to be invoked. See FunctionDef

Object

Yes

arguments

Function arguments as key-value pairs where values can be expressions or static values

Map<String, JsonNode>

No

FunctionDef

Defines a reusable function that can be invoked by workflow actions. Functions can be of various types including REST, RPC, GraphQL, expression, or custom.

Field
Description
Type
Required
Default

code

Function unique code identifier

String

Yes

-

name

Function unique name

String

Yes

-

description

Function description explaining its purpose and functionality

String

No

-

asyncInvoke

Specifies if the function should be invoked asynchronously

Boolean

No

false

type

Defines the function type. Can be 'rest', 'asyncapi', 'rpc', 'graphql', 'odata', 'expression', or 'custom'

String

Yes

-

definition

The function definition containing type-specific configuration and schema information

FunctionDefinition

Yes

-

inputs

List of input parameters that the function accepts. See FunctionInputDef

List

No

-

appCode

Application code this function belongs to

String

No

-

tenantCode

Tenant code this function belongs to

String

No

-

FunctionInputDef

Defines an input parameter for a function including its name and value configuration.

Field
Description
Type
Required

name

The name of the input parameter

String

No

value

The value configuration for the input parameter. Can contain type information, validation rules, default values, and other metadata

JsonNode

No

TransitionDef

Defines the flow control mechanism for moving between different states or agents in a workflow. Specifies either a target destination or workflow termination, enabling complex branching and routing logic in AI agent conversations.

Field
Description
Type
Required
Default

end

Whether this transition marks the end of the workflow execution. When true, the workflow terminates. When false, execution continues to the target agent

Boolean

No

false

targetId

The unique identifier of the target agent or node to transition to. Must correspond to a valid agent name defined in the workflow. Ignored if 'end' is true

String

No

-

Example Configuration

{
  "name": "orderProcessingOps",
  "type": "ops",
  "start": false,
  "actionMode": "sequential",
  "actions": [
    {
      "id": "validateOrder",
      "name": "Validate Order Data",
      "functionRef": {
        "code": "orderValidation",
        "name": "Order Validation Function",
        "type": "rest",
        "definition": {
          "type": "simple_rest",
          "url": "https://api.example.com/validate",
          "method": "POST"
        }
      }
    },
    {
      "id": "updateInventory",
      "name": "Update Inventory",
      "functionRef": {
        "code": "inventoryUpdate",
        "name": "Inventory Update Function", 
        "type": "rest",
        "definition": {
          "type": "simple_rest",
          "url": "https://api.example.com/inventory/update",
          "method": "PUT"
        }
      }
    }
  ],
  "transition": {
    "targetId": "confirmationAgent"
  },
  "answerAfterFinish": false,
  "answerMessage": "All operations have been executed successfully"
}

Last updated