> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Team Instantiation Performance Evaluation

> Benchmark Team construction cost over 1000 iterations with PerformanceEval.

Demonstrates measuring team instantiation performance.

```python instantiate_team.py theme={null}
"""
Team Instantiation Performance Evaluation
=========================================

Demonstrates measuring team instantiation performance.
"""

from agno.agent import Agent
from agno.eval.performance import PerformanceEval
from agno.models.openai import OpenAIChat
from agno.team.team import Team

# ---------------------------------------------------------------------------
# Create Team Member
# ---------------------------------------------------------------------------
team_member = Agent(model=OpenAIChat(id="gpt-5.6-luna"))


# ---------------------------------------------------------------------------
# Create Benchmark Function
# ---------------------------------------------------------------------------
def instantiate_team():
    return Team(members=[team_member])


# ---------------------------------------------------------------------------
# Create Evaluation
# ---------------------------------------------------------------------------
instantiation_perf = PerformanceEval(
    name="Instantiation Performance Team", func=instantiate_team, num_iterations=1000
)

# ---------------------------------------------------------------------------
# Run Evaluation
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    instantiation_perf.run(print_results=True, print_summary=True)
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno memory-profiler openai
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `instantiate_team.py`, then run:

```bash theme={null}
python instantiate_team.py
```

Full source: [cookbook/09\_evals/performance/instantiate\_team.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/09_evals/performance/instantiate_team.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.