External agents are built outside watsonx Orchestrate and can be used as collaborators for native agents.watsonx Orchestrate supports multiple provider protocols, including external_chat, the Agent-to-Agent Protocol (A2A), and specialized communication protocols for integrating with watsonx AI Agent Builder agents, watsonx Assistants, and Salesforce Agent Force agents.external_chat and A2A agents can be built on any underlying agent platform such as BeeAI, Langgraph, and CrewAI, where the user hosts the agent themselves, on Code Engine.
The external_chat provider can be used to integrate with any agent that is capable of providing an OpenAI style chat completions endpoint and is the most common form of integration.The documentation for this API spec can be found on the watsonx-orchestrate-developer-toolkit.A reference Langgraph external agent can be found here.
Copy
Ask AI
spec_version: v1kind: externalname: news_agenttitle: News Agentnickname: news_agentprovider: external_chatdescription: | An agent built in langchain which searches the news.tags: - testapi_url: "https://someurl.com" # the url of the external agentauth_scheme: BEARER_TOKEN # one of BEARER_TOKEN | API_KEY | NONE auth_config: token: "123" # this is token for both BEARER_TOKEN and API_KEY chat_params: # chat_parms are parameters sent to an agent on each request stream: true # should the external agent be invoked using using SSE streaming or as a rest call config: # config represents the internal configuration of this agent used by wxo hidden: false # Hide this collaborator agent from the ui enable_cot: true # Does the external agent return all internal steps and tool calls
The Agent to Agent Protocol (A2A) is an open standard designed to enable communication and interoperability between multiple agentic systems. Because the standard evolves rapidly, watsonx Orchestrate specifies the A2A version in the provider field to ensure compatibility when communicating with agents.For a sample LangGraph agent compatible with the A2A protocol, see the a2a-samples repository.To register an agent that is compatible with the A2A protocol, set provider to external_chat/A2A/0.2.0, like the following example:
Copy
Ask AI
spec_version: v1kind: externalname: news_agenttitle: News Agentnickname: news_agentprovider: external_chat/A2A/0.2.0 # this is the identifier for A2A agents, provider/protocol/version of A2A supporteddescription: | An agent built in langchain which searches the news.tags: - testapi_url: "https://someurl.com" # the url of the external agentauth_scheme: BEARER_TOKEN # one of BEARER_TOKEN | API_KEY | NONE auth_config: token: "123" # this is token for both BEARER_TOKEN and API_KEY chat_params: # chat_parms are parameters sent to an agent on each request sendHistory: # indicates whether conversation history should be sent to the external A2A agent stream: false # should the external agent be invoked using using SSE streaming or as a rest call pushNotifications: true # set to true if the external agent can send push notifications to provide updates on async tasksconfig: # config represents the internal configuration of this agent used by wxo hidden: false # Hide this collaborator agent from the ui
Asynchronous updates with push notifications (technical preview)For tasks that run for extended periods (e.g., minutes, hours, or days) or in scenarios where clients cannot maintain persistent connections—such as mobile applications or serverless functions — A2A supports asynchronous updates via push notifications. This mechanism enables the A2A Server to actively notify a client-provided webhook whenever a significant task update occurs.If your agent supports asynchronous push notifications for long-running tasks, register this capability by setting the property:
Copy
Ask AI
pushNotifications: true
The push notification configuration is provided to the external A2A agent in the initial message/send or message/stream request. The A2A agent must include the complete update — such as message, task, and artifact details (as applicable) — in the notification payload, along with the corr_id value received in the metadata of the initial request.Push notifications use Bearer token authentication, where the token is generated from API keys as described in the Getting Started guide.Callback URL and authenticationThe callback URL is included in the request sent to the A2A agent. To send push notifications, you must:
Use a valid API key to generate a Bearer token for authentication.
Provide complete task update details in the notification payload, following the A2A protocol’s task object specification. Partial status updates are not sufficient.
You can also integrate with agents built using watsonx.ai’s agent builder platform.For more information, please see Registering agents from watsonx.ai here.
Instead of using the API, complete the following YAML file and import your agent.Provide well-crafted descriptions for your agents. These descriptions are used by supervisor agents to determine how to route user requests. For more information, see Writing descriptions for agents.
Copy
Ask AI
spec_version: v1kind: externalname: news_agenttitle: News Agent provider: wx.ai # the provider will always be wx.aidescription: | An agent built in langchain which searches the news.tags: - testapi_url: "https://us-south.ml.cloud.ibm.com/ml/v4/deployments/<id>/ai_service_stream?version=2021-05-01"auth_scheme: API_KEY # this will always be API_KEY auth_config: token: "<my_api_key>" # this is the API key for wx.ai chat_params: stream: true # should the external agent be invoked using using SSE streaming or as a rest call config: hidden: false # Hide this collaborator agent from the ui enable_cot: true # Does the external agent return all internal steps and tool calls
To register an agent that is built within Salesforce Agent Force as an external agent:
Follow the Getting Started Guide for the Agent API. For more information, see the Getting Started Guide.
On the Create a token page, the following information applies to all Salesforce agents within the instance:
api_url: Always set to https://api.salesforce.com/einstein/ai-agent/v1.
auth_config.token: Use the CONSUMER_SECRET provided in the guide.
chat_params:
client_id: Use the CONSUMER_KEY.
domain_url: Use the DOMAIN_URL.
Optionally, specify a list of display types to pass to Orchestrate as a comma-separated string.
Provide well-crafted descriptions for your agents. These descriptions are used by supervisor agents to determine how to route user requests. For more information, see Writing descriptions for agents.
Lastly, under chat_params you need to specify your agent_id. This can be found by hovering over one of your agents and either right-clicking and copying the URL, or by manually writing it based on hover text. In the following example, the agent_id is 0XxfJ0000001d8zSAA.
Copy
Ask AI
name: salesforce_ext_agentkind: externalprovider: salesforce # the provider will always be salesforcetitle: Customer Service Agent by Salesforcetags:- "salesforce"description: An AI customer service agent whose job is to help customers with support questions or other issues.api_url: "https://api.salesforce.com/einstein/ai-agent/v1"auth_scheme: API_KEYauth_config: token: "my-api-key"chat_params: agent_id: "my-agent-id" client_id: "my-client-id" domain_url: "https://agentforceXXX-dev-ed.develop.my.salesforce.com" # display_types: TextChunk,Confirm,Error,Failure,Inquire,Informconfig: hidden: false enable_cot: false
On IBM Cloud, your service_instance_url and api_key can be found on the page where you launch your assistant’s tooling UI.Provide well-crafted descriptions for your agents. These descriptions are used by supervisor agents to determine how to route user requests. For more information, see Writing descriptions for agents.
Copy
Ask AI
spec_version: v1kind: assistantname: hr_assistanttitle: HR Agentdescription: | This assistant is capable of acting as a first point of contact for all support requests.tags:- wxaconfig: assistant_id: assistantid environment_id: environmentid hidden: false api_key: my-api-key service_instance_url: https://api.eu-de.assistant.watson.cloud.ibm.com/instances/<my-instance-id> api_version: '2023-06-15T00:00:00.000Z' auth_type: IBM_CLOUD_IAM authorization_url: https://iam.cloud.ibm.com
Provide well-crafted descriptions for your agents. These descriptions are used by supervisor agents to determine how to route user requests. For more information, see Writing descriptions for agents.
Copy
Ask AI
spec_version: v1name: my_assistanttitle: my_assistantdescription: | This assistant is capable of handling call center operations.kind: assistanttags:- wxaconfig: assistant_id: assistantid environment_id: environmentid hidden: false api_key: my-api-key service_instance_url: https://api.us-east-1.preprod.aws.watsonassistant.ibm.com/instances/<my-instance-id> api_version: '2023-06-15' auth_type: MCSP authorization_url: https://iam.platform.saas.ibm.com
Context variables enable builders to incorporate user-specific identifiers—such as username, user ID, or tenant ID—from upstream systems into an agent. These variables can currently be set through API-level integration by using the Runs API, the Chat Completions API, or its streaming variant.By default, agents invoked during a run do not have access to context. To enable access, set the context_access_enabled field to true and provide a list of context_variables to expose to the agent.Context variables are passed to the agent in the following ways:
Streaming variant: Each SSE event sent to the agent includes the context object.
The context variables defined will be accessible to external A2A agents in the metadata of the message object.
Copy
Ask AI
spec_version: v1kind: externalname: news_agenttitle: News Agentnickname: news_agentprovider: external_chat/A2A/0.2.0 # this is the identifier for A2A agents, provider/protocol/version of A2A supporteddescription: | An agent built in langchain which searches the news.tags:- testapi_url: "https://someurl.com" # the url of the external agentauth_scheme: BEARER_TOKEN # one of BEARER_TOKEN | API_KEY | NONEauth_config: token: "123" # this is token for both BEARER_TOKEN and API_KEYchat_params: # chat_parms are parameters sent to an agent on each request sendHistory: # indicates whether conversation history should be sent to the external A2A agent stream: false # should the external agent be invoked using using SSE streaming or as a rest call config: hidden: false # Hide this collaborator agent from the uicontext_access_enabled: truecontext_variables: - clientID
You can restrict external agents in watsonx Orchestrate by using the restrictions parameter in your external agent configuration.
Copy
Ask AI
spec_version: v1kind: externalname: news_agenttitle: News Agentnickname: news_agentprovider: external_chat/A2A/0.2.0 # this is the identifier for A2A agents, provider/protocol/version of A2A supporteddescription: | An agent built in langchain which searches the news.tags:- testapi_url: "https://someurl.com" # the url of the external agentauth_scheme: BEARER_TOKEN # one of BEARER_TOKEN | API_KEY | NONEauth_config: token: "123" # this is token for both BEARER_TOKEN and API_KEYchat_params: # chat_parms are parameters sent to an agent on each request sendHistory: # indicates whether conversation history should be sent to the external A2A agent stream: false # should the external agent be invoked using using SSE streaming or as a rest call config: hidden: false # Hide this collaborator agent from the uirestrictions: editable