Create an external AI agent with the Agent2Agent protocol
Create external AI agents in AI Agent Studio to connect the ServiceNow AI Platform with third-party agentic AI providers.
Before you begin
If you don’t see the option to create an external agent, confirm that your administrator has selected Allow ServiceNow to access External AI Agents. This option is available on the Settings page in AI Agent Studio, under External AI Agents > Discoverability.
Your instance must be at least on Zurich patch 4.
Role required: sn_aia.admin
About this task
You can integrate third-party AI providers into the ServiceNow AI Platform by creating an external AI agent in AI Agent Studio.
Procedure
- Navigate to All > AI Agent Studio > Create and manage > AI agents.
- Select New > External.
-
In the Discover and activate step, select the AI agent provider for your external agent and discover your agent.
Select Save and continue to navigate to the next step.
-
Select an existing provider or add a provider.
If you select Add new provider, you must fill out the fields and then select Save.
Table 1. Add provider form fields Name
Description
Name
Name of the agentic AI provider.
Agent card URL
The URL that points to the external AI agent's Agent Card. The URL should include
well_known/agent_json.Under Advanced settings, Connection & Credential alias
Credentials to access your external AI agent's Agent Card. You can select an existing alias or create one.
Under Advanced settings, Select subflow
Subflow that establishes Agent2Agent protocol. The default subflow should handle the majority of cases, but you can also create your own.
-
Select Discover external AI agent to validate the connection to your external agent.
If discovery is successful, the name of your agent and the version number are added to the page previous the Discover external AI agent button.
-
Select the name of the agent to verify that the Name, Version, Description, and Skills fields are populated correctly, then
select Activate.
The Agent card tab shows the entire JSON for the agent.
-
Select an existing provider or add a provider.
- In the Review skills and capabilities step, verify that the skill names are correct.
-
In the Define the specialty step, add details for how the external agent fits in the ServiceNow agentic system.
-
Review your AI agent description.
You can leave your AI agent description as it is, or you can add a longer description to help differentiate the agent from other AI agents. This helps enable the AI Agent Orchestrator to use your external AI agent more effectively. For suggestions for writing AI agent descriptions, see General guidelines for creating AI agents and agentic workflows.
-
Set your communication mode to either Synchronous or Asynchronous.
Some agents don’t support asynchronous communication.
Under Advanced settings, you can use the default subflow, an existing subflow, or create a subflow. The default subflow should work for the majority of cases.
-
Select your AI agent's execution Connection & Credential alias for authentication.
Choose which credentials access your external AI agent's execution endpoint. You can select an existing alias or create one. If you create one, a modal displays with options for configuring an OAuth or API Key authentication.
Note:For more information about the API Key credential, see A2A API Key credential behavior. -
Configure access control lists (ACLs) for the AI agent.
Note:The ACLs determine who has access to discover and execute the AI agent. To learn more about the ACLs you can create in AI Agent Studio and how to add more advanced security configurations, see Implement access control in Now Assist AI agents.
This is a required step. If you have previously configured an AI agent without creating an ACL, you must generate an ACL before you can make other modifications.
Table 2. Define who can access the AI agent Field Description User access The type of users whose access for the AI agent is defined by the following options: - Any authenticated user: Any user who is logged in can access the AI agent.
- Users with specific roles:
Users that have at least one of the roles assigned to them can access the AI agent. This option is the default.Note:If a user doesn't have access to an AI agent or if the user doesn't have access to at least one of the AI agents in the respective agentic workflow execution, then the whole execution aborts before the first AI agent is initiated.
- Public: Any user can access the AI agent even without logging in. Use this option only when you want guests to be able to access the AI agent.
Role Assign one or more specific roles from the drop-down menu. Note:Selecting the role is possible only when you chose the Users with specific roles user access.
-
Review your AI agent description.
-
In the Select a display step, choose where you want the AI agent to appear and what message users see when the AI agent is running.
-
Select your AI agent's availability.
Set the Status to active if you want the AI agent to be available to users with the correct role.
-
Select a display channel.
You can choose to use a Virtual Agent and specify which assistant you want to access the AI agent. If you want to test the AI agent first, you don’t need to select a display channel yet.
-
Choose processing messages to display to the user when the AI agent is executing.
For example, Initiating AI agent or Processing record details, or An AI agent is looking into the request.
-
Activate the AI agent.
Select the toggle to activate the AI agent if you want the AI agent to be discoverable. If you want to test your AI agent first, wait until after you have tested it before activating it.
If you don't see this option, you may need to scroll.
-
Select your AI agent's availability.
- Select Save and test to save the AI agent details and go to the Testing page of AI Agent Studio.
Result
Your external AI agent is connected to ServiceNow.
What to do next
You can test an execution of your AI agent or its data access. You can also add it to a new or existing agentic workflow. See Create an agentic workflow for the steps to create or configure an agentic workflow.