ServiceNow AI Agent Trigger Issue

YashKumarV
Tera Contributor

I'm working on a use case where I want to trigger an AI Agent use case when an incident is created in ServiceNow. I’ve configured the trigger correctly — the use case is active, the condition is properly set, and the assigned roles are in place — but still, the trigger doesn't fire automatically as expected when a new incident is created.

YashKumarV_0-1754043195408.png

YashKumarV_1-1754043211793.png



To work around this, I decided to use the "Trigger AI Agent Use Case" flow action, which allows me to invoke the use case programmatically through a script. This approach works initially, and the AI Agent executes as expected. However, when I try to run it again for the same record, it fails silently and doesn't trigger the agent. On checking the logs, I noticed that it reports an open or in-progress conversation already exists for the record, which blocks the agent from running again.

Getting below error: 

*** Script: sn_aia.TriggerRuntimeUtil: invokeAIATrigger() - Run as User [db929************e45a01] has an open or in progress agent conversation for this triggered target record [69***********************e9]

YashKumarV_2-1754043338075.png

 

Now, I’m trying to understand how I can properly close or reset the agent conversation associated with a record so that the flow action can be used more than once if needed.

Alternatively, it would be helpful to know why the original trigger configuration is not working automatically, even though all the required settings appear to be correct.

6 REPLIES 6

Hi @abirakundu23 ,
Thank you for the response. But it does not solve my problem, though I know how to configure the trigger and I did the same but my main issue is that the trigger is not getting fire for everytime, It fire once and then when I tried to create an incident again with same run as user, It shows that error  : 
"Run as User [db929************e45a01] has an open or in progress agent conversation for this triggered target record [69***********************e9]".

Hi @abirakundu23 ,
Thank you for the response. But it doesn't seems to solve my issue. 
I have also configured the trigger correctly on create of incident but my issue is that the trigger is getting fire only once. When I am trying to create an incident with same condition and same run as user it shows that error in logs.

Error : 
"Run as User [db929************e45a01] has an open or in progress agent conversation for this triggered target record [69***********************e9]".

How can I solve this problem??

UPDATE : 

It starts working...
I just have few doubts, Initially when the tools (that I used while configuring AI Agent) was Supervised, my trigger was not firing but now when I made the tools Autonomous, It starts firing the trigger.
So What is the issue here, shouldn't we configure the trigger in AI Agent Use case if the tools of the AI Agent are Supervised ??