Breadcrumbs

Step 3: Integrating the Agent to the Process

👩‍🎓

Follow Our Example User Story

David has tested his AI agent. He is satisfied with the results the agent delivers. Now he wants to integrate it into the existing xUML service.

You are going to help him with that task.

Open the Insurance_Case_Process. You created the CaseAgent to execute process step Analyze customer request. Therefore, you will now add the agent in this step of the process.

Click Analyze customer request to open its execution model:

grafik-20251203-135247.png

You want to execute the AI agent during this process step, so drag & drop the agent’s execute operation to the execution model:

grafik-20251204-081629.png

Apply the REST Extension

Since the AI agent’s execute operation is a REST call, you need to apply the REST extension to the operation. Go to the operations’s attributes Extensions > Add:

grafik-20251204-082054.png

Select the REST Adapter extension and click Next:

grafik-20251204-082649.png

In the second pop-up, select your AI agent alias:

grafik-20251204-082926.png

You may have to reload the page to see the new pins related to the REST Adapter extension:

grafik-20251204-085159.png

The persisted variables required at this stage have already been created and are part of the service template that you imported at the beginning of this tutorial. Open the selection list in section Persisted and add the two necessary variables for the input (request: CaseRequest) and the output (caseData: AgentResponse) of the AI agent:

grafik-20251204-085439.png

Connect the persisted variables to the input and output pins of the operation:

grafik-20251204-085913.png

Mandatory Authentication with the PAS Platform

When using an AI agent operation in a model, you need to authenticate with the PAS platform. To do so, you need to set the necessary request options to the execute REST call (refer to Setting REST Request Options in the Designer Guide for details). You can do that by using the PAS platform standard operation getAuthorizationOptions that provides the necessary authentication headers.

You can find the operation in Base Types > PAS_Platform > Auth > AuthService. Drag & drop the operation to the first position in the operations flow:

grafik-20251204-092228.png

Expert Advice

You can also use operation getAuthorizationOptions in other contexts where you need to authenticate with the platform.

The operation returns an instance of the RequestOptions class, with authentication header already set (contains a valid service account token). You can use the result directly as input for REST adapter calls to authenticate at the internal PAS platform services.

Use the service panel search to find class RequestOptions. Drag & drop it to section Local:

grafik-20251204-095512.png

Now connect the return pin from operation getAuthorizationOptions with the local variable requestOptions. Draw another connection from the local variable requestOptions to the pin requestOptions of operation execute:

grafik-20251204-094617.png

You have finished the AI agent integration and can now test your process.

👩‍💻

Curious about more details?

In this step you learned how to integrate an AI agents in a Designer process.