Skip to main content

Importing Agents

Importing an agent involves transferring it from your local system into your active environment, where it enters a draft (undeployed) state. There are two supported methods for importing agents:

Importing agents using an agent file

Use the orchestrate agents import command to import agents into the watsonx Orchestrate platform from a YAML, JSON, or Python file. You can import either natively built agents, external agents connected from other systemsm, or even custom agents.
To specify the agent file path, use the --file or -f flag:
BASH
orchestrate agents import -f <path to .yaml/.json/.py file>
Before running this command, make sure you have a valid agent configuration file. This file defines the parameters that describe the agent’s behavior and structure for watsonx Orchestrate. For details on how to author these configurations, see Authoring agents.

Bulk import from ZIP

Import agents along with all their dependencies using a single ZIP file. You can import an agent and all its dependencies with the following command:
BASH
orchestrate agents import -f my_agent.zip
The structure of the imported ZIP file matches the structure produced by the agent export command:
BASH
orchestrate agents export -k native -n my_agent -o my_agent.zip
During the import process, tools require connections to be manually selected.

Creating agents directly from 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.
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"

Copy agents between workspaces

BASH
orchestrate agents copy --name <agent-name> --source <source-workspace-name> --destination <dest-workspace-name>

Deploying Agents

Agents in watsonx Orchestrate operate in one of two states: draft or live.
  • A draft agent is actively being developed or modified by a builder. You can access draft agents from the Manage Agents page in the UI.
  • A live agent is available to end users through the Web chat UI on the Orchestrate landing page.
Note: In the watsonx Orchestrate Developer Edition, only the draft environment is available. This edition is designed for single-user, non-production use. As a result, the Web chat UI displays agents in their draft state instead of the live state. Attempting to run deploy commands in the Developer Edition will result in an error.

Deploying an agent

Deploying an agent is the act of taking an agent from a draft state into a live state.
BASH
orchestrate agents deploy --name agent_name
Note: By default the deploy agent command timesout after 5 minutes of checking the agent status. If you need to increase this you can use the WXO_AGENT_DEPLOYMENT_TIMEOUT environment variable. Default value is 300.

Undeploying an agent

Undeploying an agent is the act of reverting an agent from its current live state to the previous live state.
BASH
orchestrate agents undeploy --name agent_name