
Hi,
The looping behavior you’re encountering with the ServiceNow knowledge integration could result from how the agent is interpreting and re-querying responses. Here are some steps to resolve the issue:
if response == null or response.error:
return "I couldn’t find the information you’re looking for. Please rephrase your question."
if query_attempts > 3:
return "I couldn’t fetch the information right now. Let me connect you with support for further assistance."
These steps should help address looping issues. If you’ve already tried these solutions and the problem persists, there may be an underlying API or configuration issue in ServiceNow that requires further investigation.