Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create a agent which can list down the ServiceNow users based on the natural language filters

prasad_parab
Tera Contributor

Hi all,

I’m trying to build a ServiceNow AI Agent that can understand a user’s request in either natural language or NQL and directly return a list of matching sys_user records.

The agent should be able to:

  1. Accept a user query like “show all active users in HR” or an NQL filter.

  2. Parse the input to identify relevant fields and values.

  3. Map those fields to the correct sys_user table columns.

  4. Run the GlideRecord query internally.

  5. Return the actual list of users (name, email, sys_id, etc.) back to the requester.

Has anyone implemented something similar or have pointers on best practices for designing such an AI Agent?

1 REPLY 1

GlideFather
Tera Patron

Hi @prasad_parab,

 

when you say AI AGent you refer to Now Assist Agent, right?

 

I would create an AI Agent, add tool for search records in HR, and other steps. I don't understand the parsing and mapping points, what's the goal with this? 

 

When you want to receive name, email and sys id of users that are in HR, can you do it just by dot-walking? 

 

I most probably miss the whole requirement :((

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */