Skip to main content

AI Assistant Events

AI assistants trigger various types of events during execution, which can be subscribed to and handled in frontend pages and backend business logic, enabling more flexible process control and user interaction.

Event type overview

AI assistants support the following main event types:

  • Node Execution Events: Triggered when nodes are reached and after execution is completed
  • Tool Call Events: Triggered before and after AI Agent uses tools
  • Action-in-conversation Events: Triggered by user confirmation operations in the assistant conversation
  • Action-in-page Events: Triggered when the assistant runs to a Action-in-page node

Frontend page events

Frontend page events are mainly used for page UI state updates and user interaction handling.

Node execution events

AIAgent nodes, Function nodes, IF-ELSE nodes, and Iteration nodes can Trigger page event when they are arrived and post-execution. The prerequisite is that page event triggering needs to be enabled, as shown below:

Loading...

After binding the assistant in a page, you can subscribe to node execution events. For subscription methods, see Subscribing to Node Execution Events in Pages

Tool call events

For AI Agent nodes, if tools are used during Agent execution, page events will also be triggered before and after tool calls. The prerequisite is that the Agent needs to enable tool trigger events.

Tool call events carry parameters of dictionary (JitDict) type with the following attributes:

  • toolName: Tool name, such as "services.ASvc.func1". In event handling logic, developers need to handle accordingly based on the tool name.
  • toolType: Tool type, with optional values: model-model function, service-service function, ui-page function, mcp-MCP service, externalApi-external API
  • args: Parameters. If it's a pre-tool-call event and "Include data in event messages" is enabled, args contains the tool's input args; if it's a post-tool-call event and "Include data in event messages" is enabled, args contains the tool's return value.

After binding the assistant in a page, you can subscribe to tool call events. For subscription methods, see Subscribing to Tool Events in Pages

Action-in-conversation events

When the process runs to a Action-in-conversation node, the dialog will display confirmation operation buttons such as Approve, Reject, Edit, Reply, and custom buttons. After the user performs confirmation operations or clicks custom buttons, page events will be triggered; the events carry parameters that are the data displayed on the node.

After binding the assistant in a page, you can subscribe to these events. For subscription methods, see Subscribing to Action-in-conversation Events in Pages

Action-in-page events

When the process runs to a Action-in-page node, an assistant paused event will be triggered, which carries the parameters configured on the node.

After binding the assistant in a page, you can subscribe to assistant pause events. For subscription methods, see Subscribing to Action-in-page Events in Pages

Backend business events

Backend business events are mainly used for business logic processing, data persistence, and system integration.

Node execution events

AI Agent nodes, function call nodes, conditional branch nodes, and multi-task execution nodes can trigger backend events when they are reached and after execution. The prerequisite is that backend event triggering needs to be enabled, as shown below:

Loading...

For how to subscribe to node execution events in the backend, refer to: AI Assistant Events

Tool call events

For AI Agent nodes, if tools are used during Agent execution, backend events will also be triggered before and after tool calls. The prerequisite is that tools need to enable trigger events.

For how to subscribe to tool call events in the backend, refer to: Agent Tool Call Events

JitAI AssistantBeta
Powered by JitAI