Enjoyed this article? See more similar articles in ![]()
![]()
Pega Cookbook - Gen AI Recipes ![]()
![]()
series.
Pega Agentic AI: Run AI in the Background with SLAs or Wait Shape
In Pega, another effective pattern for handling agentic AI processing is to route the case to a work queue with an SLA, allowing the LLM-driven task to complete in the background without blocking the user. This approach is useful when you want the case to continue progressing automatically once the AI response becomes available.
LLMs do not always return responses immediately. In some situations, they may need more time for deeper reasoning, prompt interpretation, larger data handling, or other processing-related factors. If this work is performed directly on the user thread, the user may experience delays during submission or assignment processing. To avoid that impact, Pega can use background orchestration through work routing and SLA processing.
SLA:
In this design, the case is routed to a work queue and an SLA is started. The user does not need to wait at the assignment for the AI response. Instead, the case remains managed in the background by Pega. When the SLA reaches its deadline, the deadline escalation activity triggers the advanced flow, which invokes or evaluates the status of the Agentic AI processing.
Wait shape:
Assignment → Wait Shape → Agent (Step) - > Review Recommendation
Configuration:
Demo: https://players.brightcove.net/1519050010001/default_default/index.html?videoId=6394291352112
After the agent completes its work, Pega automatically updates the case and routes it to the next assignment. This means the user can continue the process only when the AI response is ready, without having spent time waiting during the earlier assignment.
Benefits of using SLA-driven background processing in Pega
-
No user wait time: The user is not blocked while the AI response is being generated.
-
Improved case flow automation: Pega can automatically manage progression to the next assignment after the agent completes.
-
Handles variable LLM response times: Since LLMs may take longer for deep reasoning or complex requests, SLA-based orchestration provides a controlled way to manage those delays.
-
Better workload management: Routing to a work queue keeps processing organized and aligned with Pega’s case management model.
-
Stronger operational resilience: Background execution reduces the risk of poor user experience caused by long-running AI calls.
-
Seamless escalation handling: SLA deadlines and escalation activities provide a built-in Pega mechanism to trigger the next flow step without manual intervention.
This approach combines Pega’s case management strengths with asynchronous AI processing. By using work queues, SLAs, and deadline escalation, organizations can integrate agentic AI into case lifecycles while maintaining a smooth and efficient user experience.
Enjoyed this article? See more similar articles in ![]()
![]()
Pega Cookbook - Gen AI Recipes ![]()
![]()
series.

