Skip to main content
This example demonstrates how agents automatically inherit the model from their parent team. When the Team has a model:
  • Agents without a model use the Team’s model
  • Agents with their own model keep their own model
  • In nested teams, agents use the model from their direct parent team
  • The reasoning_model, parser_model, and output_model must be set explicitly on each team member or team
When the Team has no model:
  • The Team and all agents default to OpenAI gpt-4o
model_inheritance.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