Skip to main content
This example uses Gemini as the sub-agent model for Slack operations, while the outer agent uses a different model. This pattern is useful when you want faster/cheaper tool calls but stronger reasoning on top.
slack_search_media.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Run the example

Save the code above as slack_search_media.py, then run:
Full source: cookbook/12_context/06_slack_search_media.py