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:
- Sign Up for and Log In to your account on ServiceNow's AI Agent Fabric.
- 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.
- 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.
- Test the agent within the AI Agent Studio to verify its functionality and explore its capabilities.
- 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:
- Initialization: An agent is created on the ServiceNow platform and registered in AI Refinery with the specified configuration.
- Sending a Query: A user query is sent from AI Refinery to the designated agent operating on the ServiceNow platform.
- 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. - 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
underutility_agents
. - Ensure the
agent_name
you chose for yourServiceNowAgent
is listed in theagent_list
underorchestrator
.
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"