Skip to main content
Tests streaming with MULTIPLE context providers. Each provider has its own sub-agent, and when the parent agent calls them, all sub-agent events stream through in real-time.
This example deletes and recreates demo-arch-wiki and demo-ops-wiki beside the saved file when the module is imported. Keep both directories disposable and do not import the module into another application. The docstring’s docs wiki prompt is stale; the configured providers are Architecture Wiki and Operations Wiki.
24_multi_context_streaming.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as 24_multi_context_streaming.py, then run:
Full source: cookbook/12_context/24_multi_context_streaming.py