- Introduction
- Getting started
- Process modeling with BPMN
- Process modeling with Case Management
- Designing a persistent case entity schema
- Defining case keys (system vs. external)
- Establishing task I/O and write-back contracts
- Exit rules and early stage termination
- Modeling primary and secondary stages
- Triggering a case from Data Fabric
- Implementing stage-level personas and permissions
- Setting SLAs and automated escalation rules
- Configuring a rework loop (re-entry)
- Managing live case instances: pause, migrate, and retry
- Maestro case management component dictionary
- Process modeling with Flow
- Getting started
- Core concepts
- Node reference
- Build guides
- Best practices
- Reference
- Process implementation
- Debugging
- Simulating
- Publishing and upgrading agentic processes
- Common implementation scenarios
- Extracting and validating documents
- Process operations
- Process monitoring
- Process optimization
- Reference information
Maestro user guide
What you'll build: A flow that invokes an AI agent you author on the canvas, passes data to it, and routes execution based on the agent's response (approved, rejected, or failed). This is the foundation for any agentic automation: a reasoning-powered decision embedded in a larger automated process.
The agent you build here is an Autonomous Agent: its model, prompts, tools, and context all live on the node and travel with the flow. To reuse an agent that's already published in your organization instead of authoring one inline, use the BPMN process node instead.
What you'll need
- A UiPath Automation Cloud account with access to Maestro Flow.
- An available LLM model for the agent to use.
Nodes used
- Manual Trigger: starts the flow on demand while you build
- Agent: an AI agent you author on the canvas, returns its output
- Decision: branches execution based on the agent's response
- Terminate: ends the flow on a failure path
Steps
1. Create a new flow and add a trigger
- Open Maestro → Flow and select New Flow.
- Drag a Manual Trigger node onto the canvas.
For a production flow, you'd replace this with a scheduled or integration trigger. A Manual Trigger is enough while you build.
2. Add an Agent node
The agent's palette label is Autonomous Agent.
- Drag an Agent node from the UiPath nodes section of the node panel onto the canvas.
- Connect it to the Manual Trigger.
- In the properties panel, author the agent:
- Set the Model, or leave it on your organization's default agent model.
- Write the System prompt, the agent's role and standing instructions. The Model, System prompt, and User prompt are all required.
- Write the User prompt, the task for this run. Reference flow data with expressions; for example, the document text to classify:
$vars.start.output.documentText.
3. Return a structured result
By default the agent returns one field, content, holding its response text. To branch cleanly, have the agent return a structured field instead.
- Open the Variables tab on the agent's properties panel.
- Add an output variable named
decisionwith typestring. - In the System prompt, instruct the agent to set
decisiontoapprovedorrejected.
4. Handle the agent's response
- Drag a Decision node onto the canvas and connect it to the Agent node.
- Set the condition to evaluate the agent's output, for example:
$vars.agent1.output.decision === "approved". - Connect the True branch to the next step in your automation (for example, a notification or data write).
- Connect the False branch to a Terminate node.
- Set the Terminate status to
Failedand add a message such asAgent returned: $vars.agent1.output.decision.
5. Debug the flow
Select Debug in the toolbar. In the execution trace:
- Select the Agent node to inspect what inputs were sent and what the agent returned.
- Confirm the Decision node took the correct branch given the agent's output.
- If the agent's response isn't what you expected, review the System prompt, User prompt, and declared output before changing unrelated flow logic.
To exercise both branches without waiting for real agent responses, enable Mock output on the Agent node and set a fixed response.
Result
Your flow runs end-to-end: the Manual Trigger starts execution, the Agent node reasons over the input and returns a structured decision field, the Decision node branches on the value, and the Terminate node ends the flow on the rejected path. You can inspect the agent's inputs and outputs in the execution trace and adjust the prompts directly on the node.
Extend this flow
- Give the agent tools: connect tool resources (built-in tools, connector tools, RPA or API workflow tools, document extraction, or Model Context Protocol (MCP) servers) to the agent's Tools handle so it can act, not just reason.
- Ground the agent in your data: connect a context resource to the agent's Context handle so it answers from an indexed knowledge source instead of the model alone.
- Put a human in the loop: connect the agent's Escalations handle to an Escalation resource for cases the agent shouldn't decide alone.
- Add a loop: wrap the agent invocation in a Loop node to process a list of items with the same agent.
- Chain to another system: after the Decision node's True branch, add an HTTP Request or integration node to write the result to an external system.