Watson Orchestrate ADK (tracing)

IBM watsonx Orchestrate ADK lets teams build and operate enterprise agents, tools, and orchestrated runs. Respan traces local ADK Python tools, run-client operations, and watsonx.ai autodiscover chat calls when those optional client modules are installed.

Use this page when your application calls Watson Orchestrate ADK directly with IBM credentials.

Create an account at platform.respan.ai and grab an API key.

Run npx @respan/cli setup to set up with your coding agent.

Setup

1

Install packages

$pip install respan-ai respan-instrumentation-watson-orchestrate-adk ibm-watsonx-orchestrate
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
$export WATSON_ORCHESTRATE_BASE_URL="YOUR_WATSON_ORCHESTRATE_BASE_URL"
$export WATSON_ORCHESTRATE_API_KEY="YOUR_WATSON_ORCHESTRATE_API_KEY"

RESPAN_API_KEY exports traces to Respan. The WATSON_ORCHESTRATE_* variables are used by the Watson Orchestrate ADK clients.

3

Initialize and run

1from respan import Respan
2from respan_instrumentation_watson_orchestrate_adk import (
3 WatsonOrchestrateADKInstrumentor,
4)
5
6respan = Respan(
7 app_name="watson-orchestrate-adk-demo",
8 instrumentations=[WatsonOrchestrateADKInstrumentor()],
9)
10
11# Build and invoke Watson Orchestrate ADK tools, run clients, or chat clients
12# after Respan has initialized.
13
14respan.flush()
15respan.shutdown()
4

View your trace

Open the Traces page to see Watson Orchestrate ADK tool, run, and chat spans.

Configuration

ParameterTypeDefaultDescription
api_keystr | NoneRESPAN_API_KEYRespan API key used to export traces.
base_urlstr | NoneRESPAN_BASE_URLOptional Respan trace export API URL.
instrumentationslist[]Include WatsonOrchestrateADKInstrumentor() to patch installed ADK surfaces.
customer_identifierstr | NoneNoneDefault customer identifier for all spans.
metadatadict | NoneNoneDefault metadata attached to all spans.
environmentstr | NoneNoneEnvironment tag, for example "production".

What gets traced

Watson Orchestrate ADK operationRespan spanNotes
Local PythonTool executiontoolCaptures tool name, arguments, result, and failures.
RunClient run methodsagentCaptures run input, thread/run identifiers, response payloads, and errors.
ADK chat and watsonx.ai autodiscover client callschatCaptures prompt, completion, model, token usage, and failures when those optional modules are installed.

The instrumentor does not require Watson Orchestrate ADK at import time. Missing optional client surfaces are skipped during activation.