How to pass aruments to run agent

Hello,

i have created UiPath app and and passing the values of apps to UiPath studio which i am getting from fields in app.
now i need to trigger UiPath agent using uipat flow and that is working ,but my requirement is to pass those values which i got from app to the agent.
so i run agent there is option of arguments , so i have to total 3 in_arguments which i got from app.now how i can pass to agent.
how to add in run agent activity?


help me on same

When you agent runs and input argumanet open then you should pass this

New Dictionary(Of String, Object) From {
{“in_ProjectName”, in_ProjectName},
{“in_BU”, in_BU},
{“in_CostList”, in_CostList}
}

Cheers

Hello @Mathkar_kunal,

you should pass multiple arguments (in_CostList, in_ProjectName, in_BU) to the Run Agent activity follow these steps:

  1. Open Run Agent → Input arguments.
  2. Add the arguments in dictionary format:

New Dictionary(Of String, Object) From {
{“in_CostList”, in_CostList},
{“in_ProjectName”, in_ProjectName},
{“in_BU”, in_BU}
}

  1. Keys must exactly match the argument names in the agent process.
  2. These values will be available in the agent workflow as input arguments.

If you click ‘Refresh arguments’ on the activity it will populate the activity with the relevant arguments from the agent, that is assuming you aren’t on an older version of Studio, I think you need to be on 24.10 to get that to work. If you are on one of the 23 versions still you must manually build the dictionary as is suggested.

Can you confirm your Studio version?

facing below issue


@Mathkar_kunal

Can you please confirm your studio version

cheers

2025.0.172 sts community version i am using

@Mathkar_kunal

then please click refresh arguments it should show the arguments to you

alternately in the new one this is merged with run jobs ..so can use that activity as well

cheers

New Dictionary(Of String, Object) From {
{“in_Project_ProjectName”, in_Project_ProjectName},
{“in_Project_EngagementName”, in_Project_EngagementName},
{“in_Project_BU”, in_Project_BU}
}

Try this when your agent runs.

ok i will try this and update you.
my requirement is my app is passing variables to studio and that is working now and then BPMN model which i have published in orchestrator should start via this run agent and it is starting

1]if i start using same UiPath process where i am getting variables from app then can i use those variables in agent which i have in bpmn model

2]should i save variables in excel which i am getting in studio and then call agent (bpmn model) and then should i add agent in bpmn model as start and in that agent i will use UiPath workflowas a tool which will read that excel so i can tell agent in system promt to get values from UiPath process and assign to agent variabels.

from above both which approch should i proceed ?or you have any another approch plese let me know

ok means i need to create ecat same name varibales. ok i will try this as well
my requirement is my app is passing variables to studio and that is working now and then BPMN model which i have published in orchestrator should start via this run agent and it is starting

1]if i start using same UiPath process where i am getting variables from app then can i use those variables in agent which i have in bpmn model

2]should i save variables in excel which i am getting in studio and then call agent (bpmn model) and then should i add agent in bpmn model as start and in that agent i will use UiPath workflowas a tool which will read that excel so i can tell agent in system promt to get values from UiPath process and assign to agent variabels.

from above both which approch should i proceed ?or you have any another approch plese let me know

Yes try the above approach and let me know if any issue.

Happy Automation

yes but which one first or second?

You can try both refresh the arguments and if still then pass the dictionary which I gave.

On the version you are on its totally unneccessary to pass the dictionary and build it manually and you make it way more likely to error.

Just press the ‘Refresh Arguments’ button.

As long as you are on a 24.10 version or above there is absolutely no need to build your dictionary from scratch as described, thats a workaround for older Studio versions and not the intended way to use this activity.

@Mathkar_kunal

your first approach with just refresh arguments shoudl do the job

cheers

i did refresh argument but nothing happened

@Mathkar_kunal

can you show your agentic process

if there is only an agent then you need not create a maestro or agentic process..you can directly select the agent which can be triggered

are arguments added?

cheers

If everything from your side is completely fine then I advice you to go to the model and check the properties panel there check your arguments also check if it is correctly spelled and also if everything is proper then I think it is a bug for that republish the model and then refresh the arguments and then try.

Cheers

Whats logical here is that you are starting either a process or agent that has no arguments.

As Anil suggested, please show us this ‘Agentic Process 2’