Looping agents uipath

Hi
I m planning to a build a bot that takes email message as input..now where can I loop to call agent.is it maestro? Or in studio desktop i don’t see option to call agent. Is it because it runs in serverless?

1 Like

Hey,
You can see your agent via Run Agent activity in studio

I don’t see that activity.may i know which package does it belongs

Here you go

1 Like

Hi @Learning1,

if you want to loop through e-mails and start agents you must create a new type of project: "Long Running Automation" → not correct

There you can use the activity: Start job (Run Agent)

You can also use Run Agent in the normal project types (flowchart,…).

But then the loop will not work. The process always waits for the agent execution. → not correct

Important: Run Agent is only available in studio versions 2025.10 and higher.

Best practice: Use as few other activities as possible in the long running workflow since the settings differ from the normal workflows. I would use it only to initiate the agents.

You can also use “Maestro”, but it is more expensive, if you have unattended bots licensed.

1 Like

Hi @Learning1

Welcome to the community!

Do use UiPath mastro you can check out below snips for your reference



2 Likes

I m using 25.10.4 ,and now I found the reason..it seems run job replaces run agent.Thank you so much for all your input

1 Like

Thanks for the info .I ll take a look

1 Like

This is not accurate.

You can use any project type. The key here is if the job suspends for the external agent call or not, which you can configure.

On the activity you can define the run agent job to not suspend but keep running until the agent is complete.

You can also configure any project to allow suspension, its not just the long running automation project type and has been available for years. You just need to go to the project settings and enable persistence.

1 Like

@Learning1

Welcome to the community

as the use case is simple maestro is not needed but you can use maestro as well

you can do in studio using rub job activity and select the agent you need

if maestro then agentic task is what you need to use or select service task and call agent

cheers

You are right. @Jon_Smith I have had a look at it again and yes, it is possible now.
I will correct my previous entry, so no one is mislead.

I was quite sure, that the suspend option was not available, when I build my first agent use case, which was the time when you created your tutorial. Because I did search for the suspend button and did use it in the long running workflow.

But maybe I have overseen it and did therefore built a useless workaround :sweat_smile:

Hi @Learning1

Agents are not called from Studio Desktop. They are serverless and are triggered from Maestro (Orchestrator).

Typical approach:

  • Your bot (Studio process) reads emails in a loop
  • For each email, it calls the Agent via Maestro (using the Agent invocation / API)
  • The looping logic stays in Studio, not inside the Agent

You won’t see a “call agent” option in Studio Desktop because Agents are managed and executed from Maestro, not like normal workflows.

So yes, this behavior is because Agents run serverless.

Hi,

You do NOT loop inside the Agent itself.
Agents are designed to be stateless, single-invocation units.

The loop belongs in Maestro (Agentic Orchestration) or another orchestration layer.

Simple pattern:

Email trigger
: Maestro workflow
: Loop through emails
: Call Agent with email content
: Post-process result

Regards
vishnu

Hi @Learning1

In Studio/Desktop you don’t see a “Call Agent” option because it runs locally and doesn’t handle triggers. In serverless or cloud setups, bots are triggered via Orchestrator or Maestro using email/queue triggers. To process emails automatically, set up a trigger in Orchestrator or Maestro rather than calling an agent from Studio.