Need Guidance on Maestro Variable Passing Between RPA Workflows and Agents

Scenario:

I am building an automation in UiPath Maestro where I am using:

  • RPA Workflows
  • Agents
  • Multiple tasks/workflows connected in the same process

I need to exchange data (variables/arguments) between these components during execution.

Problems I Am Facing:

1. Passing Variables from RPA Workflow to Agent

I have variables created and used inside an RPA workflow.
I want to pass those values as input to an Agent task in Maestro.

  • What is the correct method to pass arguments/variables from RPA workflow to Agent?
  • Is there any specific configuration in Maestro task mapping?

2. Passing Variables into Agent Prompt

I want to use dynamic values from workflow variables inside the Agent Prompt.

Example:

Instead of static prompt text:

Check invoice details

I need something like:

Check invoice details for Invoice Number: {InvoiceNumber}

  • How can I pass workflow variables dynamically into the Agent prompt?
  • Does Maestro support placeholders / expressions inside prompts?

3. Passing Arguments from One Task to Another Task

I have multiple tasks in Maestro.

Example:

  • Task 1 gets Customer Name

  • Task 2 should use Customer Name

  • Task 3 should use same value in another workflow

  • How can I pass output arguments from one task to another task?

  • What is the best practice for sharing variables across tasks in Maestro?

My Questions:

  1. How to pass arguments from RPA workflow to Agent task in Maestro?
  2. How to use workflow variables inside Agent prompts?
  3. How to transfer output variables from one task to another task?
  4. Is there any recommended design pattern for variable handling in Maestro?

Hey @vikasbaburao.sajjan,

I will give you answers based on my experience for your question:

  1. Create out argument in RPA workflow (simple data types only - string, number, object/jobject, boolean). Then create input arguments with same type in your agent. Link RPA & Agents in maestro tasks, then map the output variable of RPA to Agent using expression editor.
  2. When you are passing any data (exaple: InvoiceNumber) from RPA to agent, you can refer the input argument of agent inside prompt (use any dynamic data in user promple) => {{InvoiceNumber}} => here InvoiceNumber is a input variable name in your agent.
  3. You can follow same approach as explained for your first question
  4. Recommendations - Try to have variable names as uniqueu as possible. If there is a large data (example: large text or json), then upload it to storage bucket or any other storage then download it in the flow wherever needed. Do not write any expressions for data manipulation in maestro, do it in Tasks such as RPA/Agent etc

If you have any more doubts then feel free to ask.