Font Size:
Ask Joget AI

AI Agent Tool

Introduction

The AI Agent Tool lets you integrate AI automation directly into a process by executing a predefined AI Agent during a process activity in Process Builder or as Post form submission processing in Form Builder. This enables automated decision-making, content generation, or data processing based on the logic defined in the AI Agent, all as part of your Joget workflow.

Get started

Process Builder

To use an AI Agent as an activity tool in Process Builder, follow these steps:

  1. Ensure you have already created an AI Agent in the AI Agent Builder.
  2. Design or modify a process in Process Builder.
  3. Add a tool to the appropriate process activity.
  4. Configure the tool to call your AI Agent.
    1. Click the tool on the canvas to open the configuration page. Click the Mapping tab.
    2. Under Tools, click Add Row .
    3. From the Tools dropdown list, select AI Agent.
    4. Under Configure AI Agent Tool, select an AI Agent created in AI Agent Builder from the Choose AI Agent dropdown list.
    5. Expand the AI Agent tool name to configure the created parameters. In this example, the tool name is File Email.
    6. Click Apply Changes.

Form Builder

To use an AI Agent as a post-form processing tool in Form Builder, follow these steps:

  1. In Form Builder, click Settings.
  2. For Post Processing Tool, select AI Agent.
  3. For Run Tool on, select when the tool will run. The options are:
    • Data creation
    • Data update
    • Both data creation and update
  4. For Choose AI Agent, select the AI Agent created in the AI Agent Builder.
  5. The inputs configured in the Input Variables property from AI Agent Builder Properties are displayed under Choose AI Agent (<AI AGENT>).

Configure AI Agent Tool Properties

Process Builder properties

To set up the AI Agent Tool in Process Builder, configure the following property:

  • AI Agent: Select an existing AI Agent to be executed during the process. This dropdown lists all the agents you have already created via the AI Agent Builder. This agent will be triggered automatically when the associated activity is reached in the workflow.
  • Choose AI Agent: Select the AI Agent this activity runs that was created in the AI Agent Builder.
  • Run Mode: Controls whether the process waits for the agent or dispatches it in the background.  The options include:
    • Synchronous (wait for result): Blocks the activity until the agent finishes.
    • Asynchronous (fire and forget): Returns immediately and runs the agent in the background. Use Asynchronous to avoid page timeouts in assignment activities.
  • On Agent Failure: What the process should do when the agent fails (threw an error, was not found, or returned empty).
    • Continue (log only):  The failure is written to the server log and the process carries on as before. This is the default and the legacy behaviour.
    • Terminate the process (log and rollback): The running process is aborted, and any form or variable writes this activity made are rolled back.
    • Set Status & Continue (log and rollback): Writes a failure marker to a process variable so a route can branch on it, then continues. Applies to Synchronous mode only. The following properties are only available when this option is selected:
      • Failure Status Variable: The process variable a failure marker is written to. Appears only when On Agent Failure is Set Status & Continue. Select the process variable a route can later branch on. The success variable is left untouched.
      • Failure Marker Value: The value written to the failure status variable. Appears only when On Agent Failure is Set Status & Continue. Enter the marker text. The default is failed.

Store the result:

The tool can write the agent's output to a form record, a process variable, or both. These callback sections behave the same in synchronous and asynchronous mode.

  • Store to Form: The form whose record receives the output. Select the target form, then choose a Storage Strategy (single field or JSON mapping) and complete the related fields. Leave blank to skip form storage.
  • Store to Process Variable: The process variable that receives the output. Select the variable to hold the agent's response. Leave blank to skip variable storage.

Form Builder Post Processing Tool properties

To run an agent as a post-processing tool in Form Builder, configure these fields:

  • AI Agent: Select an existing AI Agent to be executed during the process. This dropdown lists all the agents you have already created via the AI Agent Builder. This agent will be triggered automatically when the associated activity is reached in the workflow.
  • Run Tool on: Choose when to run the tool:
    • Data creation
    • Data update
    • Both data creation and update

Configure AI Agent Tool:

  • Choose AI Agent: Select the AI Agent this activity runs that was created in the AI Agent Builder.
  • Run Mode: Controls whether the process waits for the agent or dispatches it in the background.  The options include:
    • Synchronous (wait for result): Blocks the activity until the agent finishes.
    • Asynchronous (fire and forget): Returns immediately and runs the agent in the background. Use Asynchronous to avoid page timeouts in assignment activities.
  • On Agent Failure: What the process should do when the agent fails (threw an error, was not found, or returned empty).
    • Continue (log only):  The failure is written to the server log and the process carries on as before. This is the default and the legacy behaviour.
    • Terminate the process (log and rollback): The running process is aborted, and any form or variable writes this activity made are rolled back.
    • Set Status & Continue (log and rollback): Writes a failure marker to a process variable so a route can branch on it, then continues. Applies to Synchronous mode only. The following properties are only available when this option is selected:
      • Failure Status Variable: The process variable a failure marker is written to. Appears only when On Agent Failure is Set Status & Continue. Select the process variable a route can later branch on. The success variable is left untouched.
      • Failure Marker Value: The value written to the failure status variable. Appears only when On Agent Failure is Set Status & Continue. Enter the marker text. The default is failed.
  • Store to Form: The form whose record receives the output. Select the target form, then choose a Storage Strategy (single field or JSON mapping) and complete the related fields. Leave blank to skip form storage.
  • Store to Process Variable: The process variable that receives the output. Select the variable to hold the agent's response. Leave blank to skip variable storage.

Example Use Cases

  • Auto-respond to support tickets: Use an AI agent to generate a reply when a support ticket reaches a review stage.
  • Process evaluation: Have an AI agent analyze inputs (e.g., application forms) and return decisions or summaries.
  • Data enrichment: Use an agent to fetch or derive additional data from a JSON API or external source during processing.

Best Practices

  • On Agent Failure only applies to Synchronous mode. In Asynchronous mode, the activity has already completed before the agent's outcome is known, so the setting is hidden. If you need failure handling, run synchronously, or check the async job status separately.
  • Choose Set Status & Continue to branch on failure. Point Failure Status Variable at a process variable, then add a route that reads it. The process keeps running, and your route decides what to do; for example, send the work for manual handling when the marker is present.
  • Rollback covers this activity's own writes. Terminate and Set Status restore the form and variables this tool wrote. Writes made by earlier activities are not affected.
  • An empty agent response counts as a failure. The tool treats a missing agent, a thrown error, and an empty result as the same failure condition, so all three trigger the On Agent Failure behaviour you chose.
Created by Gabriel Last modified by Debanraj Ravindran on Oct 21, 2026