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

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**protocols**](../modules/protocols) 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

<ResponseField name="Returns" type="Dict[str, str]">
  \<level>, "disk": \<level>}\`\` with values drawn from the
  closed vocabulary above.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L5046">
  `praisonaiagents/gateway/protocols.py` at line 5046
</Card>
