I’ve used GenAI Connect rules and Agents as steps within a workflow, but is it possible to launch an Agent or GenAI Connect rule on the fly within a case - based on a form action like the click of a button? For example, if I have a rich text editor field where I need to draft something, I can click a “GenAI Assist” button next to that field and it pops-up with some recommended language for that specific field that I can copy and paste include. Is this feasible, or would I just need to use the Case Type agent and ask it for what I need?
Pega GenAI Connect rules can be invoked as part of automation and are designed to return generated content that can be mapped to fields, while Pega also provides runtime GenAI assistance patterns such as GenAI Coach in Constellation
use a UI-triggered action that invokes a Pega GenAI Connect rule with the current case context, then show the generated text in a popup or temporary field for the user to review and insert
Hello Kristen,
Yes it’s very much possible to interact with the case processing agent from within the case context. We can add the agent from app studio as widgets. Please check below if this what you are looking for.
Add a button to your case’s section or harness and configure its action to call an Activity that invokes your GenAI Connect rule using Pega’s connector call method, then map the returned AI-generated text directly back to your rich text editor field on the clipboard. This lets the user click the button, trigger the AI call on demand, and see the generated content populate the field instantly — all without needing to wire it into a formal workflow step.
Great question @morak!
This is both a GenAI and a UX question.
Like Ravi and Sairohith already mention, it is absolutely possible to trigger the GenAI step based on user activities. If you’re building in UI Kit / Theme Cosmos, you could even use a button to trigger this.
In Constellation, we do not use the custom button UX pattern anymore, but there are many other ways in which your user can be in control.
The most straight-forward approach would be to place the GenAI generation step between two User Views in your Case Lifecycle, one where the user enters the draft, and one that shows the GenAI improved draft the user can review and change.
Other patterns include using optional actions to initiate the GenAI generation, see for example How to show Optional Actions whilst “performing” an assignment/task - User Experience / Knowledge Share - Pega Forums.
Hi @morak , I built a similar use case. Please check this one.