Humans + Agents: Mixed-Mode Case Architecture

As Pega Business Architects and Lead System Architects, we are entering the era of the hybrid workforce. This presents a unique architectural challenge: How do we onboard autonomous AI Agents into our existing ecosystem without duplicating our application footprint?

The challenge:

When we introduce Pega GenAI Agents to execute processes, we quickly realize they might need slightly different treatment than a human user. An Agent might need to pass specialized payload metadata, bypass interactive UI confirmation screens, or trigger alternative automated validations.

For example, the Agent might need to exchange additional meta data; decisions points and routing might have slight differences, or some process steps might not even be relevant for an Agent (e.g. a confirmation screen).

We could build Case Types specifically for Agents, making sure that all required meta data for Agent handling is captured by the Case.
But in situations where there are only slight differences between the Human user and Agent behaviors, that would lead to a lot of overhead.

The Solution

A more elegant solution lies in Mixed-Mode Case Architecture: designing a single, unified Case Type that adapts its behavior dynamically based on whether a human or an AI Agent is driving the transaction.

When a Case is initiated through an Agent, the created Case tracks that it was created by an Agent using the pxIsCreatedByAIAgent property.
This information is useful for auditing purposes, but can also be used for conditional behavior during case execution.

An Out of the Box When Rule (also called pxIsCreatedByAIAgent) checks if the property is True or False.

So, even though the Agent still works on behalf of the user (see Pega Agents act on your behalf - Agent Security - AI / Knowledge Share - Pega Forums), we can differentiate between these situations for specific behavior when needed.

Mixed-Mode Design Patterns

You can leverage this When Rule across multiple layers of your Case design to cleanly separate human and agent behaviors:

  • UI & View Adaptability: Conditionally hide confirmation dialogs that are irrelevant to an LLM. Conversely, you can expose agent-specific verification fields.
  • Dynamic Process Routing: Use decision shapes to route agent-initiated cases through different validation stages. For example, you can enforce a mandatory Human-in-the-Loop (HITL) approval step specifically for high-value transactions started by an Agent.
  • Dynamic Response Payloads: Return rich technical metadata or structured JSON back to the calling Agent, while keeping the standard Portal presentation clean and uncluttered for human operators.
  • Data Governance & Auditing: Leverage the property to segment performance dashboards, allowing business stakeholders to compare cycle times and error rates between human and agent-initiated workflows.

Demo

The demo uses a simplified case type with three behaviors:

  1. An additional property is requested only when an Agent started the case.
  2. A metadata property is returned to the Agent only.
  3. The case UI shows additional detail when the case originated from an Agent, using the same When rule.

Business & Operational Benefits

Designing unified, mixed-mode cases delivers major wins for the enterprise:

  • Frictionless Modernization: Open up legacy workflows to GenAI Agents without altering the proven daily experience of your existing portal users.
  • Streamlined Governance: Route agent-created cases through lower automated approval limits or specialized compliance checks automatically.
  • Clear Operational Metrics: Instantly answer “which cases did our agents initiate?” without digging through raw system log files.
  • Risk control: route Agent-created cases through an extra check or a lower approval limit.

When not to do use this

The Decision Boundary: When to Split Your Case Types

While Mixed-Mode Case Architecture is highly efficient, it is not a silver bullet. You should pivot to a dedicated Agent Case Type if:

  • The data model is fundamentally different: The Agent requires an entirely separate schema of inputs and outputs that share little commonality with human processes.
  • The lifecycle diverges significantly: If more than 50% of your stages, steps, and SLA patterns require conditional logical separation, the unified Case Type will become cluttered and difficult to maintain.

If the fundamental business intent is the same, consider keeping them together. Use Mixed-Mode Case Architecture to gracefully orchestrate the differences.

4 Likes

Special thanks to @bicii who first demonstrated the availability of the property that drives this to me!