external AI agent

FannyS
Tera Contributor

I need some guidence with external AI agent with Agent2Agent protocol

 

I have created an agent and configured it as external in SN following this: https://www.servicenow.com/docs/r/zurich/intelligent-experiences/create-a2a-agent.html

 

I can see Service Now does call my agent, however when my agent replies it seems is not replying in the format or in the way SN is expecting to.

 

When I checked the logs I see this:

 

{"status":"SUCCESS","payload":[{"sys_id":"ad2c324693b33ed042343447aba1035","description":"ExternalAgent","type":"agent","output":{"result":""},"metadata":{"agentDetails":{"name":....

 

So is like SN is not seeing any output from it?

UI shows nothing 

 

What do I need to send back so SN does not see an empty output fromt he agent I am very sure the agent is replying 

 

Thanks 

Fanny 

 

 

 

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Hi @FannyS 

 

  • Ensure Proper JSON Result output: Your external agent API must return a valid JSON response. A simple string will not work.
    Correct Structure: {"result":{"number":"CS0005845","state":"2","case":"CS0005834","impact":"2","active":"true"}}.
  • Validate Content Type: Ensure your API explicitly sets the Content-Type header to application/json

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

My agent does return a json. Even If I harcode the reply to your json example I get the same. The issue is not the reply not being a json the issue is SN not reading that JSON.  Not sure what SN wants to read the reply from the agent