After you create your Python tools, import them as a Python toolkit. A Python toolkit groups related tools so you can deploy and run them together in a single Python process. To meet this goal, design every tool in the toolkit to be thread-safe and reentrant. This approach gives you faster execution because the tools share the same process. When you run Python tools outside a toolkit, the system starts a lightweight process each time the tool runs. This design supports tools that use non-thread-safe operations, but it increases execution time compared to a toolkit. To create a Python toolkit, place all required Python tools in one folder. Each tool can include one or more Python files. In those files, define your functions and apply theDocumentation Index
Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
Use this file to discover all available pages before exploring further.
@tool decorator so watsonx Orchestrate exposes each function as a usable tool.
You can place tools that multiple agents use into a single toolkit. When you update tools inside a toolkit, redeploy all related agents to the live environment so you use the updated versions. Choose the number of tools in each toolkit based on the level of concurrent requests you expect. For more information, see CPU and memory allocation for Python toolkits.
CPU and memory allocation for Python toolkits
In the draft environment, all imported Python toolkits and Python tools run in a single Kubernetes deployment container per tenant. Due to this, process overheads per tool call always exist in draft. This container provides 2 vCPUs, 2 GB of memory, and 5 workers. The deployment supports two replicas. In live environments, in a premium plan, you can import up to five Python toolkits per tenant. If you use a different plan, contact support to request access. Each toolkit runs in its own Kubernetes deployment container with 2 vCPUs, 2 GB of memory, and 5 workers (no process overheads per tool call). Each deployment supports two replicas. If you use a different plan, contact support to request access.Add Python toolkits using the ADK CLI
Use theorchestrate toolkits add command to add a Python toolkit.
BASH
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 theorchestrate toolkits import command to import a toolkit from a file.
BASH
The version of the YAML specification.
The type of toolkit. For Python toolkits, use
python.The name of the toolkit.
The description of the toolkit.
Key-value pairs for the toolkit.
toolkit_name.yaml

