AI Agent Weather aggregation scenario

Step 1: Workspace and workflow setup
You need a centralized visual canvas, the Graphical Designer, to define and connect the series of individual tasks that make up your business operation.
  1. Navigate to the Graphical Designer and open a New Workspace.
  2. From the Blocks tab, drag a Workflow into the canvas.
  3. Name the workflow (e.g. WeatherAggregator) and set its Workstation to CLOUD.
Technical insight: Why CLOUD? Setting the workstation to the CLOUD enables the engine to run tasks that call external systems (like REST APIs) directly, without requiring you to install or manage an external agent.
Step 2: Weather data collection
We need to fetch real-time weather data from the external endpoints before the AI can process it. Find the RESTful Web services tasks in the Blocks tab and drag 3 of them inside the workflow. Configure each one as follows:
  1. Name: Give each task a unique name (e.g. CITY_1, CITY_2, CITY_3).
  2. Workstation: CLOUD.
  3. Action –> Service URL: Enter one of your three target URLs for each respective task:
    • Task 1: https://api.open-meteo.com/v1/forecast?latitude=41.89&longitude=12.51&current_weather=true
    • Task 2: https://api.open-meteo.com/v1/forecast?latitude=51.50&longitude=-0.12&current_weather=true
    • Task 3: https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&current_weather=true
    • Method: GET.
    • Advanced –> JSON object result query: $.
Technical insight:

Why GET?The GET method is specifically used to retrieve the header and body of a resource from a web server without modifying it.

Why JSON object result query? This uses JSONata, a query language for JSON. Setting it to $ extracts the entire root JSON object from the API response. This ensures the retrieved weather data is saved in the job properties under "JSON Result" so it can be passed as a variable to the AI Agent task later.

Step 3: Define the human approval
A Human task pauses the automated workflow to delegate decision-making to a user. Before you can create a Human task, you must define a queue. The queue acts as a container for Human tasks and manages email notifications for the assigned users. In this scenario, the Human task asks for your explicit permission before the AI Agent begins processing the aggregated data.
  1. In the Assets tab, click Add new and select Human task queue.
  2. Provide a Name (e.g. Approval_Queue), a Prefix (e.g. WEATHER), and click Add.
  3. From the Blocks tab, find Human tasks and drag it into the workflow.
  4. Name the task (e.g. APPROVE_AIAGENT), set the workstation to CLOUD, then in the Action section provide a Title (e.g. HUMAN_APPROVAL), and select the Human task queue you just created in the Queue field.
  5. Click Edit form to build the user interface.
    • Drag a Markdown component and add a Name (e.g. Approve_AI_processing) and your prompt text (e.g. "Do you want the UnO AI Agent to start processing?"). You can also edit the default Markdown component instead of dragging a new one in the form.
    • Drag a Select component, name it user_decision, and add Options like "Approve" (value: approve) and "Reject" (value: reject). Save the form.
  6. Output conditions: Add a successful condition (e.g. Proceed_to_AI) with the value: $this().user_decision = 'approve'.
Technical insight:

What is a Prefix? A Prefix is essential for generating a unique task ID for each Human task created within that queue.

What is an Output condition? Output conditions dictate how the workflow proceeds based on your form input. Setting this condition ensures the subsequent AI Agent task triggers only if you specifically select "Approve".

Step 4: Define the automation order
You can define the order in which tasks run by setting dependencies. This ensures that the workflow waits until all three weather API calls have successfully completed and gathered their data before it asks you for approval to run the AI.
  1. Select each RESTful Web services task and draw dependency arrows from the anchor points to the subsequent Human task.
  2. Click Rearrange to visually order the tasks based on the defined dependencies.
Step 5: Create the AI Agent definition
You must define the Large Language Model (LLM) entity that acts as your intelligent assistant to process the data.
  1. From the Blocks tab, drag an AI Agent block into the canvas.
  2. Assign it a Name (e.g. AIWEATHERTOOL).
  3. Type: Basic.
  4. Deploy to save the AI Agent to the database. After the successful deployment, you are asked to either keep the workspace you are using or to delete it. Select No, keep it.
Technical insight: Why Basic? The Basic agent type is ideal for straightforward, single-task automation (like summarizing text or aggregating JSON data), as its behavior is defined by simple instructions rather than complex multi-tool routing.
Step 6: Add the AI task to aggregate the weather data
This is the step that actually invokes the AIWEATHERTOOL AI Agent you defined, passing it the data you collected from the REST APIs.
  1. From the Blocks tab, drag the UnO AI Agent task into the workflow, making sure it depends on the APPROVE_AIAGENT Human task defined in step 3.
  2. Give it a unique Name (e.g. AIWEATHERTASK).
  3. Workstation: CLOUD.
  4. Agent reference: Select the AI Agent you created in Step 5.
  5. Prompt: Formulate the instructions for the LLM. To pass the data from your 3 RESTful Web services tasks, you must use the syntax ${jobs.<job_name>.<property_name>}. For this scenario, use the following:
    "You are a meteorological data aggregator. I have retrieved real-time JSON weather data for three locations. City 1: ${jobs.CITY_1.JSONResult} City 2: ${jobs.CITY_2.JSONResult} City 3: ${jobs.CITY_3.JSONResult} Please extract the current temperature and wind speed for each location, present them in a highly readable comparative bulleted list, and provide a one-sentence summary of which location is currently the coldest."
Technical insight: How are the tasks properties passed to the AI? The specific ${jobs.<job_name>.<property_name>} syntax ensures that the output of a task is passed to the UnO AI task.
Step 7: Define the AI agent Chatbot and service trigger
To transform the workflow from a standard scheduled task into an interactive, on-demand conversational process, you need to expose the workflow as a service and give the AI Agent permission to use it as a tool when a user makes a request in the chat.
  1. Add a service trigger to the workflow:
    • Select the WeatherAggregator workflow on the canvas, click Add triggers, and add a Service trigger.
    • Assign it a Name(e.g. WeatherTrigger).
    • Toggle it to Published
    • Description: type a description to give context to the function of the trigger (e.g. Starts the weather aggregation process).
  2. Create and configure the AI Agent starter:
    • Drag an AI Agent instance onto the canvas, add a Name (e.g. FlowStarter), and set the Agent type to Basic.
    • Toggle Published as Chatbot to ON.
    • Inside Role, add your instructions (e.g. You are a weather assistant. Trigger the weather workflow, wait for the data, and provide an aggregated summary. Always ask for confirmation to start the process.).
  3. In the AI Agent Workflows section, click Add new + and select the weather workflow WeatherAggregator.
  4. Pass the output properties of the workflow to the Chatbot:
    • Select the WeatherAggregator workflow you created in step 1.
    • In the Output properties section click Add new + and define a Name (e.g. Final_weather_summary) and a Value: ${jobs.AIWEATHERTASK.$stdlistContent()}.
Technical insight:

What is a Service trigger? A trigger dictates how a workflow starts. By defining it specifically as a Service, you expose the workflow so it can be launched on-demand by users (via the Self-Service Catalog) or dynamically invoked by an AI Agent.

Why toggle Published as a Chatbot? This is the critical setting that generates a dedicated chat interface for your agent in the UI. Without it, you would only be able to run the AI Agent in the background as a standard task.

Why define a Role? The LLM needs a defined role and boundaries to know how to interpret the user natural language input and what goals to pursue. The more detailed the role, the more control you have over the LLM behavior.

Why add workflows to an AI Agent? AI Agents cannot arbitrarily access your entire database. By explicitly adding workflows to an AI Agent, you grant it the necessary permissions to invoke any combination of them to perform its function in the most efficient way.

How are the AI task properties passed to the Chatbot? To pass the aggregated text generated by the UnO AI Agent task back to the Chatbot, you must extract its log content using the JSONata function $stdlistContent(). Make sure to specify the exact name you gave to your AI Agent task in the JSONata function ${jobs.<Name_Of_Your_AI_Task>.$stdlistContent()}.

Step 8 Deploy and run
You can now save the workflow and start the process by prompting the Chatbot.
  1. Click Deploy to save the workflow to the database. If you do not deploy the workspace, the items and workflow logic you just defined only live in your current session and are not saved to the database.
  2. Go to the AI Agents tab in the UI and select the FlowStarter AI Chatbot you created, and ask it to tell you weather information. For this scenario, use the following:
    Hi, I need you to show me the results and tell me which city is the coldest
  3. To let the AI agent process the data, you need to approve the Human task. Go to the Human tasks tab, find the unassigned Human task in the queue, assign it to yourself, and select Approve from the selector, and use the Accept button to finalize your approval. You can now go back to the AI Agent chat to see your results.
Technical insight:

Why Deploy? If you do not deploy the workspace, the items and workflow logic you just defined only live in your current session and are not saved to the database.

How does the Chatbot work? After you ask the Chatbot to run the flow, the AI Agent natively processes the request, waits for the RESTful web services tasks to fetch the JSON data, aggregates it, and replies directly in the chat window. The Chatbot automatically generates a pertinent name for the chat, so you can retrieve it from the chat history in the AI Agents tab.

You have successfully set up and run your first workflow in HCL Universal Orchestrator.