Skip to main content

Code

cookbook/11_models/ibm/watsonx/async_basic_stream.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run Agent

This example combines asynchronous execution with streaming. It creates an agent with debug_mode=True for additional logging and uses the asynchronous API with streaming to get and display responses as they’re generated.