How I designed a Multi-Agent Onboarding System with Pega GenAI™

In a traditional HR ecosystem, checking an employee’s onboarding status is a scavenger hunt. Managers often find themselves jumping between multiple dashboards, navigating complex case hierarchies, and switching tabs just to see if a laptop was ordered or if payroll is active.

What if an HR Manager could simply ask?

Using Pega GenAI Agent rules, I designed a multi-agent system that functions as a reasoning engine. It doesn’t just fetch data; it understands the dependencies of the onboarding lifecycle and takes action autonomously.

Use Case – Multi-Agent Onboarding

Article content
Courtesy – Gemini

Functional Demo

Have a look at how it works before we delve into the technicalities

The Logic: The “Reasoning” Behind the Agent

The core of this implementation is a 5-step autonomous logic flow that the agent follows whenever an inquiry is made:

  1. Onboarding Case Audit: Check if an active case exists. If not, trigger the information collection flow.
  2. BGV Verification: Verify background check status. Crucially, the agent checks for an existing employee record before initiating a new BGV case to prevent duplicates.
  3. IT Provisioning: Validate IT setup. If missing, initiate the setup only after confirming the employee record exists.
  4. Payroll Integration: Ensure the employee is ready for their first paycheck by checking Payroll Setup.
  5. Status Synthesis: Only after all four pillars are validated does the agent confirm the onboarding is “Complete.”

Initial Architecture

I envisaged the below architecture, to have dedicated Agents to handle each department’s tasks with their own knowledge and actions, but due to some issues, I have followed the actual architecture explained below

Article content
Initial Architecture

Implemented Architecture

Article content
Implemented Architecture

In the Actual Architecture, we typically see siloed services. The Implemented Architecture in Pega, however, uses a Main HR Agent acting as the “Orchestrator.”

The Main Agent is equipped with specific Knowledge (Employee Records, Policy Docs) and Actions (Case Creation, Status Lookups).

The Prompt Design: The “Brain” of the Agent

I designed the HR Agent prompt to ensure it doesn’t just “chat,” but “reasons.” The prompt instructs the agent to:

  • Decompose: Break the manager’s request into sub-tasks (BGV, IT, Payroll).
  • Reason: Evaluate the state of each task based on the retrieved knowledge.
  • Act: Use configured tools to invoke the necessary Pega flows.

System Prompt Snippet: > “You are an HR Specialist Agent. When asked about onboarding status, you must sequentially verify the Onboarding Case, BGV, IT Setup, and Payroll. Do not skip steps. If a record is missing, use the ‘Create Case’ action before proceeding…”

HR Agent Rule Configuration

Instructions Configuration

Article content

Knowledge Configuration

Article content
Courtesy – Pega

Tools/Action Configuration

Article content
Courtesy – Pega

Final Notes

Isn’t it a more efficient way to manage a workforce? By removing the need for manual navigation, we allow managers to focus on people, not processes. Pega GenAI transforms the system from a passive database into a proactive assistant

Thanking notes – Ganesh Pavan Munduri and Mounica Vatti for sharing their knowledge and tips. Gratitude towards Pegasystems for their continuous evolution and enabling the community

I’m Kondal

Hello, I’m Kondala Rao, known as Kondal. With extensive IT experience spanning product development, solution consulting, and business conduct, my passion lies in hands-on experimentation with the latest features of the Pega Platform and other low-code/no-code platforms to benefit businesses. Whenever I get free time, this blog is a space where I share insights, tips, and tutorials to help you leverage these technologies effectively.

I believe that even if one person benefits from my insights, it enriches my purpose to serve better. Join me on this journey of exploration and learning, and let’s elevate our skills together.

Happy Reading!!!

Let’s connect