Skip to main content
A Python toolkit groups one or more Python tools so you can import them into watsonx Orchestrate as a single unit. To create a toolkit, place all related Python tools in one folder. Each Python tool includes one or more Python files. In those files, you define functions and annotate them with the @tool decorator so watsonx Orchestrate exposes each function as a usable tool. For more information about Python tools, see Authoring Python-Based Tools. After you package your tools in a folder, you can add the toolkit to watsonx Orchestrate directly from the ADK CLI or import it from a file.

Add Python toolkits using the ADK CLI

Use the orchestrate toolkits add command to add a Python toolkit.
BASH
orchestrate toolkits add \
  --kind python \
  --name <toolkit-name> \
  --description <toolkit-description> \
  --language python \
  --package <python-package-name> \
  --package-root <path-to-package-root> \
  --tools <tools> \
  --tier <deployment-tier>

Import Python toolkits from a file

You can also import a Python toolkit from a YAML file. This file defines the same configuration options as the add command and fits well into import scripts and CI/CD pipelines. Use the orchestrate toolkits import command to import a toolkit from a file.
BASH
orchestrate toolkits import -f <path to spec> --app-id <connection>
For the YAML file, configure the following:
spec_version
string
required
The version of the YAML specification.
kind
string
required
The type of toolkit. For Python toolkits, use python.
name
string
required
The name of the toolkit.
description
string
The description of the toolkit.
package-root
string
The path to the folder that contains the Python tools.
environment
object
Key-value pairs for the toolkit.
Example:
toolkit_name.yaml
spec_version: v1
kind: python
name: toolkit_name
description: A toolkit sample
package-root: path_to_folder
environment:
    key1: value1