Skip to main content
This example demonstrates how to capture team responses as variables and validate them using Pydantic models. It shows a routing team that analyzes stocks and company news, with structured responses for different types of queries.

Code

cookbook/examples/teams/basic/response_as_variable.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Install required libraries

3

Set environment variables

4

Run the agent