> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc.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

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno memory-profiler
    ```
  </Step>

  <Step title="Run the example">
    Save the code above as `instantiate_agent.py`, then run:

    ```bash theme={null}
    python instantiate_agent.py
    ```
  </Step>
</Steps>

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