Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Laurent5
ServiceNow Employee

This short tutorial is go through how to start capturing traces from 3rd party AI systems and ingest them in the AI Control Tower.

For the purpose of this example, I will use a LangGraph customer support Agent.

In order for our Agent to send its traces to the ServiceNow AI Control Tower (AICT), we need a (Traceloop) API keys. Follow step 1 in the document below to do so:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB3144255

 

In AICT, go to Rules and Templates, then Evaluation and then click on the External AI Systems tab. You will then see the option to create an API key.

 

Laurent5_0-1790179036129.png

 

 

One you have the API Key, we need it in our code. For simplicity, I have stored it in an environment file that can be retrieved with load_dotenv.

I can check that my environment properties are properly loaded using env_utils double_check:

Laurent5_7-1790179234527.png

In my Python code, I added the following code:

Laurent5_1-1790179036130.png

 

Document the resource_attributes with the relevant information to identify the impacted Configuration Item. sn.aict.system.id is the mandatory one. It is the sys_id of the impacted CI in ServiceNow.

You can find the sys_id in the url of the CI you are looking at.

Laurent5_2-1790179036130.png

 

Once we run our LangGraph agent, logs will now be fed to the instance:

Laurent5_3-1790179036130.png

 

If we then go to the AI Control Tiower and select insights -> Monitor -> Evaluated sessions, we will then see our traces.

Laurent5_4-1790179036131.png

 

We can then drill down on specific sessions:

Laurent5_5-1790179036131.png

Laurent5_8-1790179327460.png

 

 

 The traces will also be visible from the actual AI Asset view (from the inventory).

Hope this helps

 

 

 

Version history
Last update:
2 hours ago
Updated by: