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

# Classify Resource Pressure • AI Agent SDK

> classify_resource_pressure: Classify coarse memory + disk pressure for the health surface (pure).

# classify\_resource\_pressure

Function

> This function is defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Classify coarse memory + disk pressure for the health surface (pure).

A tiny, redaction-safe classifier that folds the wrapper's `/proc`/cgroup
memory-budget fraction and free-disk sample into a closed `ok` /
`elevated` / `critical` / `unknown` vocabulary. Lives in core so the
SDK and the bot classify identically; the wrapper owns the sampling.

`unknown` is returned when a signal is missing and — per the issue — must
never be treated as healthy by callers (it is deliberately *not* `ok`).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def classify_resource_pressure() -> Dict[str, str]
```

### Returns

**Returns** `Dict[str, str]`

\<level>, "disk": \<level>}\`\` with values drawn from the
closed vocabulary above.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L6322)
>
> `praisonaiagents/gateway/protocols.py` at line 6322


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