🚀 Mastering UiPath Agentic Automation: A Technical Deep Dive into Agent Builder, Orchestration, and Practical Use Cases

:clipboard: Here’s what you’ll learn from this technical deep dive into UiPath’s Agentic Automation platform:

  • What is UiPath’s Agentic Automation?
  • What are Agents?
  • What is Agent Builder?
  • What is Agentic Orchestration?
  • The Agentic Enterprise Framework
  • Agent Builder Components
  • Agentic Activities
  • Agent Export Capability
  • Action App Templates
  • Agentic Automation and Agent Builder Best Practices
  • FAQs about UiPath’s Agentic Automation

What is UiPath’s Agentic Automation?

UiPath’s Agentic Automation represents a significant advancement in robotic process automation by integrating advanced AI capabilities with traditional automation techniques. This system creates autonomous AI agents capable of understanding complex tasks, making decisions, and executing actions across various systems and processes.

At its core, Agentic Automation utilizes large language models and machine learning algorithms to power its agents. These agents are built using a modular architecture that includes natural language prompts, contextual information, and a set of tools for specific tasks. When triggered, an agent initializes, creates a plan based on its design and the given task, and then executes various tool calls using UiPath’s automation capabilities and vectorized knowledge bases.

To implement Agentic Automation, developers use UiPath’s Agent Builder to design and configure agents, test them in the Playground, and then deploy them using Agentic Activities in UiPath Studio. The Agentic Orchestration layer manages these deployed agents, coordinating their actions and integrating them seamlessly with existing automation processes and human workflows. This comprehensive approach allows organizations to create sophisticated, AI-driven automation solutions that adapt to complex business scenarios, learn from interactions, and seamlessly integrate with existing enterprise systems.

What are Agents?

Agents are AI-powered software entities designed to perform specific tasks or solve particular problems within an organization’s automation ecosystem. These agents can understand context, make decisions, and adapt to changing situations, making them more versatile than traditional RPA bots.

What is Agent Builder?

UiPath Agent Builder is a low-code development environment designed for creating, customizing, and deploying enterprise-grade AI agents. It enables both experienced developers and citizen developers to harness the power of AI agents for complex, end-to-end process automation.

What is Agentic Orchestration?

Agentic Orchestration is a crucial component of this system, managing the coordination of multiple AI agents, robots, and human workers within a larger automation ecosystem. It handles the deployment, monitoring, and optimization of agent performance across various processes and tasks. This orchestration layer ensures that complex workflows can be executed efficiently, with different agents working in concert and human intervention occurring when necessary.

The Agentic Enterprise Framework

The Agentic Enterprise Framework is UiPath’s comprehensive approach to implementing agentic automation across an organization. It encompasses:

  1. Agent Builder: For creating and customizing AI agents
  2. Agentic Orchestration: For managing and coordinating agents
  3. AI Trust Layer: Ensuring security, compliance, and governance
  4. Integration Services: Connecting agents with enterprise systems
  5. Monitoring and Analytics: For performance tracking and optimization

This framework enables enterprises to scale their automation efforts while maintaining control and visibility over AI-driven processes.

Agent Builder Components

1. General Section

The General section in Agent Builder includes:

  • Agent Name: A unique identifier for the agent
  • Description: A brief explanation of the agent’s purpose and functionality

Example:

Agent Name: Underwriting Assistant Agent

Description: This AI-powered agent is designed to automate and streamline the insurance underwriting process. It analyzes customer information, assesses risk factors, and generates customized insurance quotes. The agent uses advanced algorithms to evaluate policy types, credit scores, and industry-specific risks, providing quick and accurate underwriting decisions while maintaining compliance with insurance regulations.

2. Models

Agent Builder supports various large language models (LLMs) for natural language processing and decision-making. The specific models available include:

  1. anthropic-claude-3-5-sonnet-20240620-v1:0: Advanced reasoning capabilities
  2. gpt-4o-2024-05-13: Versatile language processing
  3. gpt-4o-2024-08-06: Updated GPT-4 variant
  4. gpt-4o-mini-2024-07-18: Efficient GPT-4 version

The choice of model can significantly impact the agent’s performance, capabilities, and cost-effectiveness. Factors to consider when selecting a model include:

  • Task complexity
  • Required response speed
  • Budget constraints
  • Specific language understanding and generation needs
  • Compatibility with existing workflows and systems

Developers can configure the specific model used for each agent based on the agent’s requirements and the organization’s preferences. It’s important to note that model availability may change over time as new models are introduced or existing ones are updated.

3. Prompts

Prompts are crucial for guiding agent behavior. In UiPath Agent Builder, there are two types of prompts:

System Prompt

Sets the overall context, role, and behavioral guidelines for the agent. It’s a foundational instruction that remains constant throughout the agent’s operations.

Example:

You are an AI underwriting specialist. Your role is to analyze customer information, assess risk factors, and generate insurance quotes based on the provided data.

User Prompt

Represents the specific task or query given to the agent for each interaction.

Example:

Generate an insurance quote for ABC Company. Use the following details: contact email john.doe@abc.xyz, credit score 735, and consider industry-specific risk factors.

Difference between System Prompt and User Prompt

  1. Scope: System Prompt sets the overall framework, while User Prompt focuses on specific tasks.
  2. Persistence: System Prompt remains constant, User Prompt changes with each interaction.
  3. Complexity: System Prompt is more comprehensive, User Prompt is more concise and task-specific.
  4. Timing: System Prompt is set during configuration, User Prompt is input for each task.
  5. Purpose: System Prompt shapes overall capabilities, User Prompt directs attention to specific tasks.

4. Arguments

Arguments are input parameters that customize agent behavior. They can include:

  • Data types: String, Number, Boolean, DateTime, Array, Object
  • Validation rules: Required fields, value ranges, regex patterns
  • Default values and descriptions

Example:

json

{
  "PolicyType": {"type": "string", "required": true},
  "RiskFactor": {"type": "number", "default": 1.0},
  "CustomerCreditScore": {"type": "number", "required": true}
}

5. Tools

Tools are pre-built or custom functionalities that agents can use. They can include:

  • API integrations (e.g., credit score retrieval)
  • Database queries (e.g., policy information lookup)
  • Document processing functions
  • Custom scripts for specific calculations

Best practices for tool naming:

  • Use lowercase, alphanumeric characters (a-z, 0-9)
  • No spaces or special characters
  • Name should directly reflect the tool’s function

Example tools:

  • fetch_credit_score
  • calculate_risk_premium
  • generate_policy_document

6. Contexts

Contexts provide additional information or knowledge bases. They can be implemented as:

  • Embedded vector databases
  • External knowledge management systems
  • Real-time data streams

7. Escalations and Agent Memory

Escalations allow agents to hand off tasks to humans when necessary. Agent Memory enables information retention across interactions, improving decision-making over time.

8. Playground

The Playground is a crucial component of UiPath’s Agent Builder, providing a safe and interactive environment for testing and refining your AI agents. This feature allows developers to visualize agent responses in real-time, trace execution steps, and simulate various scenarios before deploying agents into production workflows.

How to Use the Playground:

  1. Access: After configuring your agent’s components (prompts, tools, contexts, etc.), navigate to the Playground tab in Agent Builder.
  2. Input Simulation: Enter sample user inputs or queries that your agent might encounter in real-world scenarios.
  3. Execution: Click “Run” to see how your agent processes the input and generates a response.
  4. Analysis: Review the agent’s thought process, tool usage, and final output.
  5. Iteration: Based on the results, refine your agent’s configuration and test again.

Key Features of the Playground:

  1. Real-time Visualization: Observe how your agent processes inputs and generates responses instantly.
  2. Step-by-Step Execution Tracing: Follow the agent’s decision-making process and tool usage.
  3. Scenario Simulation: Test your agent against various use cases and edge cases.
  4. Iterative Design: Quickly adjust prompts, tools, and other components based on observed behavior.

How to Use the Playground:

  1. Access: After configuring your agent’s components (prompts, tools, contexts, etc.), navigate to the Playground tab in Agent Builder.
  2. Input Simulation: Enter sample user inputs or queries that your agent might encounter in real-world scenarios.
  3. Execution: Click “Run” to see how your agent processes the input and generates a response.
  4. Analysis: Review the agent’s thought process, tool usage, and final output.
  5. Iteration: Based on the results, refine your agent’s configuration and test again.

Example: Customer Support Agent

Let’s walk through an example of using the Playground to test and refine a customer support agent:

  1. Initial Configuration:
  • System Prompt: “You are a helpful customer support agent for a software company.”
  • User Input: “I’m having trouble logging into my account. What should I do?”
  1. First Run :
Agent: I understand you're having trouble logging into your account. Let's troubleshoot this issue step by step:

1. First, please ensure you're using the correct email address associated with your account.
2. If you're sure the email is correct, try resetting your password by clicking on the "Forgot Password" link on the login page.
3. Clear your browser cache and cookies, then try logging in again.
4. If you're still unable to log in, please provide me with the following information:
   - The exact error message you're seeing
   - The browser and device you're using
   - When you last successfully logged in

Once I have this information, I can assist you further or escalate to our technical team if needed.
  1. Analysis: The response is helpful but could be more concise and proactive.
  2. Iteration: Adjust the system prompt to encourage more concise responses and proactive tool usage.
  3. Updated Configuration: * System Prompt: “You are a concise and proactive customer support agent. Use available tools to quickly diagnose and resolve issues.”
  • Add Tool: check_account_status(email: string) → AccountStatus
  1. Second Run :
Agent: I'm sorry you're having trouble logging in. Let's quickly check your account status.

[Tool Used: check_account_status]
Input: user@example.com
Output: AccountStatus.ACTIVE

Your account is active. Let's try these steps:
1. Reset password: [link]
2. Clear browser cache/cookies
3. Try incognito mode

If still unsuccessful, please provide:
- Error message
- Browser/device used
- Last successful login date

I'm here to help if you need further assistance.
  1. Final Analysis: The updated response is more concise, proactive, and utilizes available tools to provide a better user experience.

9. Evaluations

Evaluations assess agent performance through:

  • Evaluation Sets: Collections of test cases covering various scenarios
  • Results: Detailed performance metrics
  • Create Set: A feature for defining custom evaluation criteria

How to Use Evaluations

  1. Creating Evaluation Sets:
  • Navigate to the Evaluations section in Agent Builder.
  • Click on “Create New Set” or a similar option.
  • Define test cases by providing sample inputs and expected outputs.
  • Specify any additional parameters or constraints for each test case.
  1. Running Evaluations:
  • Select the evaluation set you want to run.
  • Initiate the evaluation process, which will execute the agent against all test cases in the set.
  • Monitor the progress and wait for the results.
  1. Analyzing Results:
  • Review the detailed performance metrics provided for each test case.
  • Identify patterns in successful responses and areas where the agent struggled.
  • Use built-in analytics tools to visualize performance trends.
  1. Iterative Improvement:
  • Based on the results, refine the agent’s prompts, tools, or other components.
  • Re-run evaluations to measure the impact of changes.
  • Continue this iterative process until desired performance levels are achieved.

Example

Customer Service Agent Evaluation:

  • Evaluation Set: 100 sample customer queries covering various topics (billing, technical support, product information).
  • Test Cases:
    • Input: “How do I reset my password?”
    • Expected Output: Step-by-step password reset instructions
    • Criteria: Response time < 5 seconds, Accuracy > 95%
  • Results:
    • Response Time: Average 3.2 seconds
    • Accuracy: 97% correct responses
    • Areas for Improvement: Identified confusion in handling queries about new product features

10. Traces

Traces provide detailed logs of agent decision-making processes, including tool invocations, context retrievals, and reasoning steps.

11. Health Score

The Health Score is a composite metric indicating overall agent performance, considering factors such as task completion rate, accuracy, and response time.

12. Agentic Activities

Agentic Activities are a key feature in UiPath’s Agentic Automation framework that allow you to integrate AI agents into your automation workflows. Here’s a brief explanation and how to use them:

Definition: Agentic Activities are specific tasks or processes automated using AI agents, which can be standalone or part of larger workflows.

Main Feature: The primary Agentic Activity is the “Run Agent” activity, which executes AI agents within workflows.

How to Use:

  • In UiPath Studio (Web or Desktop), add the “Run Agent” activity to your workflow.
  • Select an agent from the dropdown in the Agent property.
  • Provide required inputs for the selected agent.
  • Configure outputs to use the agent’s results in subsequent steps.
  • Set a timeout if needed (optional).
  • Deploy the workflow as you would with any other UiPath process.

Example: Customer Support Email Response

This example shows how to use an Agentic Activity to automatically respond to a customer support email.

1. Email Received
   |
   v
3. Run Agent
   Agent: CustomerSupportAgent
   Inputs:
     - customerName: Sarah Johnson
     - emailSubject: Issue with login
     - emailBody: "Hi, I can't log into my account. I've tried resetting my password but it's not working. Can you help?"
   Outputs:
     - responseEmail: [See below]
     - sentimentScore: 0.2
     - suggestedAction: "Escalate to technical support team for account recovery process"
   |
   v
4. If (sentimentScore < 0.3)
     Escalate to Senior Support
   Else
     Send responseEmail

Example Outputs:

responseEmail: 
"Dear Sarah Johnson,

We apologize for the inconvenience you're experiencing with logging into your account. We understand how frustrating this can be, and we're here to help you resolve this issue.

Based on your description, here are some steps you can try:

1. Clear your browser cache and cookies, then attempt to log in again.
2. Try using a different web browser or device to access your account.
3. Double-check that you're using the correct email address associated with your account.
5. If you're using a password manager, ensure it's entering the correct credentials.

If none of these steps work, we'll need to investigate further. Please reply to this email with the following information:

- The exact error message you see when trying to log in
- The device and browser you're using
- The approximate date of your last successful login

Our technical support team will review your case and may need to initiate an account recovery process. We'll do our best to resolve this issue as quickly as possible.

Thank you for your patience and understanding.

Best regards,
The Customer Support Team"

sentimentScore: 0.2

suggestedAction: "Escalate to technical support team for account recovery process"

13. Agent Export Capability

This feature allows for version-controlled agent exports, cross-environment deployment, and collaborative development.

14. Action App Templates

Action App Templates are pre-configured agent designs for common business processes, providing industry-specific configurations and best practices.

Agentic Automation and Agent Builder Best Practices

  1. Start from Existing Workflows: Identify repetitive, rule-based tasks within current processes.
  2. Build Small, Specialized Agentic Tasks: Break complex workflows into modular agent tasks.
  3. Clear Naming Conventions: Use descriptive, alphanumeric names for tools and components.
  4. Human-in-the-Loop Design: Incorporate escalation mechanisms and human oversight.
  5. Iterative Prompt Engineering: Refine prompts using the playground environment.
  6. Comprehensive Evaluation: Create diverse test sets covering various scenarios.
  7. Continuous Monitoring: Regularly review traces and logs for improvement.
  8. Integration Testing: Test agents within broader automation workflows.

:red_question_mark: FAQs

Q: What are the technical prerequisites for using UiPath Agent Builder? A: Prerequisites include StudioWeb enablement, Orchestrator and Integration Service provisioning, robot account creation, and an Automation Developer license.

Q: How does Agent Builder ensure security and compliance in enterprise environments? A: Agent Builder incorporates UiPath’s AI Trust Layer, which provides granular control over AI model interactions, data access, and decision-making processes. It integrates with existing security infrastructure for authentication, encryption, and audit logging.

Q: How do Agents differ from traditional RPA bots? A: Agents are more adaptable and can handle ad-hoc tasks that require high flexibility. They learn how work is done and improve over time, can use various tools for accomplishing tasks, and can even build robots using UiPath Autopilot for developers.

Q: What is an Agentic Workflow? A: An Agentic Workflow is any workflow that contains at least one Agent or Agentic Control (a Control statement that conditions an Agent). It’s a design-time construct for an Agentic Process.

Q: What is an Agentic Process? A: An Agentic Process is an Orchestrator process based on an Agentic Workflow. It’s the runtime construct for an Agentic Workflow.

Q: Can Agents be executed outside of UiPath Studio? A: Yes, once published and configured, agents can be executed in Studio (as part of an Agentic Workflow) or via API. Each published agent will have independent endpoints.

Q: How do Agents handle decision-making? A: Agents use context to make probabilistic decisions, allowing them to adapt to various scenarios and improve their performance over time.

Q: What types of pre-built agents or templates does UiPath offer? A: UiPath provides a variety of pre-built agents and templates, including but not limited to Web Search Agent, Scorer Agent, Regulatory Reporting Agent, Compliance Monitoring Agent, and Risk Assessment Agent. These are designed to help organizations deploy agents more efficiently for specific tasks.

Q: What role do humans play in UiPath’s agentic automation framework? A: Humans play a crucial role in UiPath’s agentic automation framework. They work alongside agents and robots, enabling faster and more informed decision-making. Humans can review agentic outputs, make necessary decisions when agents or robots encounter exceptions, and provide strategic oversight, human intuition, empathy, and critical thinking to agentic automations.

By leveraging UiPath Agent Builder and agentic orchestration, organizations can create sophisticated, AI-driven automation solutions that adapt to complex business scenarios, learn from interactions, and seamlessly integrate with existing enterprise systems.

Disclaimer:

This article contains forward-looking statements about UiPath’s Agentic Automation capabilities, which are currently in preview. These statements are based on the author’s current understanding and experience with the platform. The features, functionality, and implementation of UiPath’s Agentic Automation are subject to change as the product evolves.

The information provided herein is for informational purposes only and should not be relied upon for making business, legal, or any other decisions. Readers are advised to consult UiPath’s official documentation or contact UiPath directly for the most up-to-date and accurate information regarding the product’s capabilities, limitations, and availability.

9 Likes

Hello there,

I’m trying to build a small PoC within Agentic Orchestration but I don’t have Agent builder yet.

Current workaround is to use CrewAI as a substitute for UiPath’s Ai Agent. However, I keep getting this error whenever I try to connect to CrewAI
“4858246367129403559 : Bad Request: 503 Service Temporarily Unavailable

503 Service Temporarily Unavailable

”

Is this not available yet?