> ## 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 To File • AI Agents Framework

> export_to_file: API reference for ProfilerCompat.export_to_file

# export\_to\_file

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

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

## Signature

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

## Parameters

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

<ParamField query="format" type="str" required={false} default="'json'">
  No description available.
</ParamField>

## Uses

* `export_to_file`
* `get_profiler`

## Used By

* [`ProfilerCompat.export_to_file`](../functions/ProfilerCompat-export_to_file)

## Source

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