Importing Agents
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:
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:
Argument | Description |
---|---|
--name / -n | The name of the agent you want to create. |
--kind / -k | The kind of agent you wish to create. For native agents, the value should be native . |
--description | The description of the agent. |
--llm | The 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. |
--style | The style of agent you want to create. Either default or react . |
--collaborators | A 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 ). |
--tools | A list of tools that the agent should be able to use. Multiple tools can be specified (e.g., --tools tool_1 --tools tool_2 ). |
--output | Allows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import. |
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:
Argument | Description |
---|---|
--name / -n | The name of the agent you want to create. |
--kind / -k | The kind of agent you wish to create. For external agents, the value should be external . |
--title / -t | The title of the agent you wish to create. |
--description | The description of the agent. |
--api / -a | The external API URL your agent use. |
--tags | The list of tags for the agent. Format: --tags tag1 --tags tag2 ... . Only needed for external and assistant agents. |
--chat-params | The chat parameters in JSON format (e.g., {"stream": true} ). Only needed for external and assistant agents. |
--config | The agent configuration in JSON format (e.g., {"hidden": false, "enable_cot": false} ). |
--nickname | The agent’s nickname. |
--app-id | The application connection name used by the agent. |
--output | Allows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import. |
WX.AI External Agent
To call out to agents on the WX.AI platform, set the provider to wx.ai.
Flags:
Argument | Description |
---|---|
--name / -n | The name of the agent you want to create. |
--kind / -k | The kind of agent you wish to create. For external agents, the value should be external . |
--title / -t | The title of the agent you wish to create. |
--description | The description of the agent. |
--api / -a | The external API URL your agent will use. |
--auth-config | The external API auth config in JSON format (e.g., {"token": "sometoken"} ). |
--auth-scheme | The external API auth scheme (e.g., API_KEY for WX.AI). |
--tags | The list of tags for the agent. Format: --tags tag1 --tags tag2 ... . Only needed for external and assistant agents. |
--chat-params | The chat parameters in JSON format (e.g., {"stream": true} ). Only needed for external and assistant agents. |
--config | The agent configuration in JSON format (e.g., {"hidden": false, "enable_cot": false} ). |
`—nickname | The agent’s nickname. |
--app-id | The application connection name used by the agent. |
--provider | The external agent provider. It will be wx.ai for WX.AI agents. |
--output | Allows you to specify an output file to write the agent definition to (either .yaml or .json are supported) for future modification post import. |