Lab 1: LLM integrations
Overview
In this exercise you will use Anypoint Studio along with the Inference connector to create some simple LLM integrations using MuleSoft.
Step 1: Launch Anypoint Studio
-
Launch Anypoint Studio from your Desktop icon
-
You are presented with the Anypoint Studio Welcome Screen.
-
Scroll to the bottom if you want to know more on Studio. After that, press Continue to Studio.
There might be updates available for Anypoint Studio, its recommended toaccept them -
Click on the "Create a Mule Project ", as shown below:

-
Specify the Project name to <YOURINITIALS>-inference and click on Finish, as shown below

-
The project will be created and an empty flow will be generated.

Step 2: Implement AI Inference Project
-
Add the Listener (HTTP) operation in the Mule Palette to the flow by dragging it to the canvas.

-
Click the “+” in the Connector configuration (Under Basic Settings)

-
Leave the default values as it is and click OK

-
Change the Path to “/agent”

-
Now we will be adding the MuleSoft Inference connector to the project. Click “Search in Exchange”

-
Click “Add Account” and login using your Anypoint Platform credentials
You can skip the password hint creation 

-
Specify "Inference" to search for the MuleSoft Inference Connector (USE VERSION 1.0.0 as shown on image), select it and click "Add" to add it to the Selected modules. Finally click "Finish".


-
MuleSoft Inference Connector is now added to the Mule Palette

-
Select the "Agent define prompt template" operation and drag it to the canvas next to the Listener

-
Configure the Dataset, Template, Instructions parameters (Under General) as shown below. Make sure to click on the "fx" icon for each of them
-
Template:
payload.template -
Instructions:
payload.instructions -
Dataset:
payload.data
-
-
Click the “+” to add a Module Configuration (Under Basic Settings)

-
Specify the following values for each of the parameters:
-
Connection:
Azure OpenAI -
Azure model name:
azure-openai -
Resource name:
gset-tenant-ai-workshop -
Deploymen ID:
gpt-4.1-mini -
API Key:
"<PROVIDED_BY_INSTRUCTOR>"Leave other values as default, click OK

The flow should now look like the below and there are no errors:

-
Step 3: Test the application
You are now ready to test the application.
-
Right click on the project and select “Debug As” - “Mule Application”. If the Confirm Perspective Switch dialog box is displayed, check "Remember my decision" and click Yes

-
In the Console , you should see the following output to indicate that the project has been deployed successfully

-
Now we are ready to test the application using curl or Postman .
An example is shown below:
curl --location --request GET "http://localhost:8081/agent" --header "Content-Type: application/json" --data "{\"template\":\"You are a customer satisfaction agent who analyses the customer feedback in the dataset. Answer via JSON output and add a type for the result only with positive or negative as well as the complete answer\", \"instructions\": \"If the customer feedback in the dataset is negative, open a service satisfaction case and apologise to the customer. If the customer feedback in the dataset is positive thank the customer and wish them a nice day. Don\\'t repeat the feedback and be more direct starting the conversation with formal greetings\", \"data\": \"Training last week was awesome.\" }"
The call result should look something similar to this:
{"response":"{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had an awesome experience. Have a nice day!\"\n}"}
Congratulations, you have just built your first project with Inference!



