UiPath Documentation
maestro
latest
false
Wichtig :
Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Benutzerhandbuch zu Maestro

Orchestrate an AI agent

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.

Was Sie benötigen

  • 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

Schritte

1. Create a new flow and add a trigger

  1. Open MaestroFlow and select New Flow.
  2. 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.

  1. Drag an Agent node from the UiPath nodes section of the node panel onto the canvas.
  2. Connect it to the Manual Trigger.
  3. 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.

  1. Open the Variables tab on the agent's properties panel.
  2. Add an output variable named decision with type string.
  3. In the System prompt, instruct the agent to set decision to approved or rejected.

4. Handle the agent's response

  1. Drag a Decision node onto the canvas and connect it to the Agent node.
  2. Set the condition to evaluate the agent's output, for example: $vars.agent1.output.decision === "approved".
  3. Connect the True branch to the next step in your automation (for example, a notification or data write).
  4. Connect the False branch to a Terminate node.
  5. Set the Terminate status to Failed and add a message such as Agent 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.

Ergebnis

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.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben