Creating Agents
With the ADK, you can create native agents, external agents, and external watsonx Assistants agents. Each of these agent types requires its own set of configurations.
Use YAML, JSON, or Python files to create your agents for watsonx Orchestrate.
Native Agents
Native agents are built with and imported to the watsonx Orchestrate platform. They have the capability of following a set of instructions that tell the agent how it should respond to a user request.
The overall integrated prompting structure of the agent can be modified by using the style
attribute. Currently, two styles are available: default
and react
. A native style agent relies on the intrinsic tool call abilities of the LLM, whereas a react
style agent relies on the prompting strategy outlined by the ReAct paper.
Native agents have collaborators
which are other agents, whether they be native agents, external agents, or external assistants, that this agent can communicate with to solve a users request.
The native agent’s description
provides a user-facing description of the agent for the agent management UI and helps the agent decide when to consume this agent as a collaborator when it is added to the agent’s collaborator list.
External Agents
External agents are built outside watsonx Orchestrate and can be used as collaborators for native agents.
provider: external_chat
The external chat provider can be used to integrate agents from an external provider such as BeeAI, Langgraph, or CrewAI that a user hosts themselves, for example in Code Engine.
The documentation for this API spec can be found on the watsonx-orchestrate-developer-toolkit.
A reference Langgraph external agent can be found here.
provider: wx.ai
It is also possible to integrate with agents built using watsonx.ai’s agent builder platform.
For more information, please see Registering agents from watsonx.ai here. However, rather than using the api, simply fill out the following yaml file and import your agent.
provider: salesforce
To register an agent built within Salesforce Agent Force as an external agent:
- Follow the Getting Started Guide for the Agent API. For more information, see Getting Started Guide.
- On the create a token page, you find the following information, which will be the same across all your SalesForce agents in the instance:
- Your
api_url
, it always be https://api.salesforce.com/einstein/ai-agent/v1. - Under
auth_config
, yourtoken
will be theCONSUMER_SECRET
referenced in the guide. - Under
chat_params
.- Your
client_id
will be theCONSUMER_KEY
. - Your
domain_url
will be theDOMAIN_URL
. - Optionally, you can specify a list of display types to pass to orchestrate as a comma-separated string.
- Your
- Lastly, under
chat_params
you need to specify youragent_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 is0XxfJ0000001d8zSAA
.
External watsonx Assistants agents
To register assistants from watsonx Assistant, you need to obtain the following information:
service_instance_url
api_key
assistant_id
environment_id
service_instance_url
and api_key
varies depending on whether the assistant is imported to IBM Cloud or AWS.To retrieve your assistant ID:
- Navigate to the settings on the actions page and open the settings.
- On the farthest right tab, select Upload/Download, and click the Download button.
- Locate your
environment_id
andassistant_id
in the output JSON.
IBM Cloud
On IBM Cloud, your service_instance_url
and api_key
can be found on the page where you launch your assistant’s tooling UI.