> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Flamegraph • AI Agents Framework

> export_flamegraph: Export flamegraph to SVG file.

# export\_flamegraph

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Profiler**](../classes/Profiler) class in the [**profiler**](../modules/profiler) module.

Export flamegraph to SVG file.

Note: Requires flamegraph data. For full flamegraph support,
use py-spy: py-spy record -o profile.svg -- python script.py

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def export_flamegraph(filepath: str) -> None
```

## Parameters

<ParamField query="filepath" type="str" required={true}>
  No description available.
</ParamField>

## Uses

* `cls.get_flamegraph_data`
* `f.write`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L717">
  `praisonai/profiler.py` at line 717
</Card>
