Skip to content

ServiceNow Agent

The ServiceNow Agent is a third-party agent hosted on the ServiceNow platform, designed to perform tasks such as workflow automation, intelligent support, decision-making enhancement, and user experience improvement. These agents operate using the A2A protocol and can be leveraged through both inbound and outbound calls.

Our AI Refinery SDK enables effortless integration with a user's customized ServiceNow Agent through the ServiceNowAgent class. This integration brings the full power of the ServiceNow Agent to applications, enhancing performance and capabilities on our AI Refinery platform.

Creating ServiceNow Agents

Users can customize a ServiceNow Agent through the ServiceNow platform. To create an agent, follow these steps:

  1. Sign Up for and Log In to your account on ServiceNow's AI Agent Fabric.
  2. Ensure that the necessary privileges are enabled for your account (or request your ServiceNow account admin to grant them) to allow agent creation on the ServiceNow platform.
  3. Use the AI Agent Studio on the platform to create an agent and connect it to any required external tools. Ensure the agent is compatible with the A2A protocol.
  4. Test the agent within the AI Agent Studio to verify its functionality and explore its capabilities.
  5. Retrieve the URL endpoint of the agent's public agent card along with the REST API token. These will be required later to configure your agent in AIR.

Onboarding ServiceNow Agent

To use the ServiceNow agents through our AI Refinery SDK, users need the following parameters:

Variable Description Required
servicenow_token Mapping to the name of the environment variable that holds your ServiceNow REST API token. Yes
public_agent_card_path Path to the public agent card of the ServiceNow agent. Yes
rpc_url URL address of the public agent card of the ServiceNow agent. Yes
wait_time Time (in seconds) to wait for the agent response through the A2A protocol. No
contexts Allows for the provision of additional information during communication with the ServiceNow Agent. No

Workflow Overview

The workflow of the ServiceNowAgent class consists of four key stages:

  1. Initialization: An agent is created on the ServiceNow platform and registered in AI Refinery with the specified configuration.
  2. Sending a Query: A user query is sent from AI Refinery to the designated agent operating on the ServiceNow platform.
  3. ServiceNow-side Processing: The ServiceNow Agent determines whether to utilize predefined tools, knowledge bases, or other resources to process the query within the ServiceNow platform.
  4. Receiving and Parsing the Response: The ServiceNowAgent delivers the processed results back to AI Refinery as the final response.

Usage and Quickstart

To quickly establish an AI Refinery project with a ServiceNowAgent, users should start by creating a new agent on the ServiceNow platform, as previously described. After the agent is ready, use the YAML configuration template provided below to incorporate it into the AI Refinery project. Specifically, ensure the following configurations are included:

  • Add a utility agent with agent_class: ServiceNowAgent under utility_agents.
  • Ensure the agent_name you chose for your ServiceNowAgent is listed in the agent_list under orchestrator.

Template YAML Configuration of ServiceNowAgent

See the YAML template below for the ServiceNowAgent configuration.

orchestrator:
  agent_list:
    - agent_name: "ServiceNow Agent"  # The name you choose for your ServiceNow agent. 

utility_agents:
  - agent_class: ServiceNowAgent
    agent_name: "ServiceNow Agent"  # The name you choose for your ServiceNow agent
    agent_description: "An assistant that can answer questions about ServiceNow documentations."
    config:
      servicenow_token: "SERVICENOW_TOKEN" # Required: Name of the environment variable holding the ServiceNow REST API token
      agent_card:   # Required: Details of the agent card retrieval
        public:  # Required: Type of the agent card (can be either public or private; here it is public)
          public_agent_card_path: "/.well-known/agent.json"  # Required: Path to the agent card
          rpc_url: <agent card URL>  # Required: Corresponding URL of the agent card
      wait_time: <timeout in seconds>  # Optional: Time (in seconds) the agent waits for A2A server response (default: 300)
      contexts: # Optional additional agent contexts
        - "date"
        - "chat_history"