web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Copilot Studio
Suggested Answer

knowledge

(0) ShareShare
ReportReport
Posted on by
I'm testing the agent with AI and when I add the service now knowledge, it loops, could you help me?
Captura de Tela 2...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    Trait007 Profile Picture
    303 on at

    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:

    1. Review Knowledge Source Configuration

    • Ensure the ServiceNow knowledge source is properly configured, and that the agent queries are limited to the intended dataset or knowledge base.
    • Verify the API credentials and scope to prevent redundant queries.

    2. Add Response Validation

    • Ensure the agent processes empty or incomplete responses correctly. If the ServiceNow API returns no results or an error, configure fallback logic to stop repetitive querying.
    • Example:
      if response == null or response.error:
      return "I couldn’t find the information you’re looking for. Please rephrase your question."

    3. Implement Retry Logic

    • Limit the number of query retries by maintaining a counter for attempts. Stop querying after a specific threshold (e.g., 2-3 retries).

    4. Refine User Prompts

    • Ambiguous or broad user queries can cause the agent to loop. Clarify the prompt if the agent doesn’t find relevant information.

    5. Use Query History to Detect Loops

    • Track previous queries within the same session. If the agent repeats the same query more than once without user intervention, provide a default response instead of re-querying.

    6. Monitor Logs

    • Check Copilot Studio logs and ServiceNow API logs to identify if the issue lies in query construction or response handling.

    7. Fallback to Human Support

    • If the looping persists and no resolution is found, configure the agent to escalate the issue to a human support channel.

    Example Solution Logic:

    if query_attempts > 3:
    return "I couldn’t fetch the information right now. Let me connect you with support for further assistance."

    Conclusion:

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 168

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#3
Arild Aarnes Profile Picture

Arild Aarnes 56 Super User 2026 Season 1

Last 30 days Overall leaderboard