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

# memory • AI Agents Framework

> memory: Context manager for profiling memory usage.

# memory

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

Context manager for profiling memory usage.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def memory(name: str) -> Any
```

## Parameters

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

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Uses

* `tracemalloc.start`
* `tracemalloc.get_traced_memory`
* `tracemalloc.stop`
* `cls.record_memory`

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Memory Concept" icon="brain" href="/docs/concepts/memory" />

  <Card title="Memory Overview" icon="database" href="/docs/memory/overview" />

  <Card title="Memory Configuration" icon="gear" href="/docs/configuration/memory-config" />

  <Card title="Session Resume" icon="rotate-right" href="/docs/memory/session-resume" />
</CardGroup>
