Import the agents you create in your active environment. You can import agents in two different ways: by importing an agent configuration file or by creating the agent directly using the ADK CLI command.

Importing agents using a agent file

The orchestrate agents import command allows you to import agents into the watsonx Orchestrate platform using a YAML, JSON, or Python file.

To specify the path for the agent file, use the --file or -f flag:

[BASH]
orchestrate agents import -f <path to .yaml/.json/.py file>

To use this command, you must have a file with the agent configuration. These configurations are parameters that describe the agent for watsonx Orchestrate. For more information about these agent parameters, see Creating Agents.

Importing Agents direct in the CLI

The orchestrate agents create command can be used to quickly create and import an agent into the watsonx Orchestrate platform without first having a file to import.

Native Agent

Flags:

ArgumentDescription
--name / -nThe name of the agent you want to create.
--kind / -kThe kind of agent you wish to create. For native agents, the value should be native.
--descriptionThe description of the agent.
--llmThe large language model the agent will use, in the format of provider/developer/model_id, for example watsonx/ibm/granite-3-8b-instruct, or watsonx/meta-llama/llama-3-3-70b-instruct, where watsonx/ refers to the models supported by watsonx Orchestrate.
--styleThe style of agent you want to create. Either default or react.
--collaboratorsA list of agents that the agent should be able to call out to. Multiple collaborators can be specified (e.g., --collaborators agent_1 --collaborators agent_2).
--toolsA list of tools that the agent should be able to use. Multiple tools can be specified (e.g., --tools tool_1 --tools tool_2).
--outputAllows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import.
[BASH]
orchestrate agents create \
--name agent_name \
--kind native \
--description "Sample agent description" \
--llm watsonx/ibm/granite-3-8b-instruct \
--style default \
--collaborators agent_1
--collaborators agent_2
--tools tool_1
--output "agent_name.agent.yaml

External Agent

Allows you to call out to an external agent that is hosted on a different platform, such as Salesforce. For more information, see External Agent.

Flags:

ArgumentDescription
--name / -nThe name of the agent you want to create.
--kind / -kThe kind of agent you wish to create. For external agents, the value should be external.
--title / -tThe title of the agent you wish to create.
--descriptionThe description of the agent.
--api / -aThe external API URL your agent use.
--tagsThe list of tags for the agent. Format: --tags tag1 --tags tag2 .... Only needed for external and assistant agents.
--chat-paramsThe chat parameters in JSON format (e.g., {"stream": true}). Only needed for external and assistant agents.
--configThe agent configuration in JSON format (e.g., {"hidden": false, "enable_cot": false}).
--nicknameThe agent’s nickname.
--app-idThe application connection name used by the agent.
--outputAllows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import.
[BASH]
orchestrate agents create \
--name news_agent \
--title "News Agent" \
--description "Sample agent description" \
--api "http://some_url.com" \
--kind external \
--tags "test,other" \
--chat-params '{"stream": true}' \
--config '{"hidden": false, "enable_cot": false}' \
--nickname "news_agent" \
--app-id "my-basic-app"

WX.AI External Agent

To call out to agents on the WX.AI platform, set the provider to wx.ai.

Flags:

ArgumentDescription
--name / -nThe name of the agent you want to create.
--kind / -kThe kind of agent you wish to create. For external agents, the value should be external.
--title / -tThe title of the agent you wish to create.
--descriptionThe description of the agent.
--api / -aThe external API URL your agent will use.
--auth-configThe external API auth config in JSON format (e.g., {"token": "sometoken"}).
--auth-schemeThe external API auth scheme (e.g., API_KEY for WX.AI).
--tagsThe list of tags for the agent. Format: --tags tag1 --tags tag2 .... Only needed for external and assistant agents.
--chat-paramsThe chat parameters in JSON format (e.g., {"stream": true}). Only needed for external and assistant agents.
--configThe agent configuration in JSON format (e.g., {"hidden": false, "enable_cot": false}).
`—nicknameThe agent’s nickname.
--app-idThe application connection name used by the agent.
--providerThe external agent provider. It will be wx.ai for WX.AI agents.
--outputAllows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import.
[BASH]
orchestrate agents create \
--name science_agent \
--title "Sciene Agent" \
--description "This external agent answers questions about Space" \
--api "http://some_url.com" \
--auth-config '{"token": "sometoken"}' \
--auth-scheme 'API_KEY' \
--kind external \
--tags "wx.ai" \
--chat-params '{"stream": true}' \
--config '{"hidden": false, "enable_cot": false}' \
--nickname "Science Agent" \
--provider "wx.ai"
--output "science_agent.agent.yaml