> ## 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.

# Agent Instantiation Performance Evaluation

> Measure runtime and memory of 1000 bare Agno Agent constructions with only a system message.

Demonstrates measuring agent instantiation performance.

```python instantiate_agent.py theme={null}
"""
Agent Instantiation Performance Evaluation
==========================================

Demonstrates measuring agent instantiation performance.
"""

from agno.agent import Agent
from agno.eval.performance import PerformanceEval


# ---------------------------------------------------------------------------
# Create Benchmark Function
# ---------------------------------------------------------------------------
def instantiate_agent():
    return Agent(system_message="Be concise, reply with one sentence.")


# ---------------------------------------------------------------------------
# Create Evaluation
# ---------------------------------------------------------------------------
instantiation_perf = PerformanceEval(
    name="Instantiation Performance", func=instantiate_agent, 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
```

**2. Run the example**

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

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

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


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