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

# Evaluate Pressure • AI Agent SDK

> evaluate_pressure: Pure, deterministic classification of gateway load. No I/O.

# evaluate\_pressure

Function

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

Pure, deterministic classification of gateway load. No I/O.

Reads back facts the enforcement layer already computes
(`AdmissionGate.stats()`, the outbox `status` counts, the watchdog's
measured lag) and folds them into a single :class:`HealthPressure`. Lives
in core — like :func:`compute_config_revision` — so the SDK and the bot
classify identically without divergence.

Classification (highest wins):

* `"saturated"` — admission is full *and* work is queuing, the outbound
  dead-letter tier is non-empty, or the event loop is lagging badly
  (`&gt;= 500 ms`): shed / stall is imminent or occurring.
* `"elevated"` — admission is highly utilised (`&gt;= 80 %`), the inbound
  or outbound backlog is building, or the loop is lagging (`&gt;= 100 ms`).
* `"nominal"` — none of the above.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def evaluate_pressure() -> HealthPressure
```

### Returns

**Returns** `HealthPressure`

class:`HealthPressure` ready for the health surface.

## Uses

* `HealthPressure`

## Source

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

***

## Related Documentation

> [card] [Evaluation Concept](https://praison.ai/docs/docs/concepts/evaluation)

> [card] [LLM as Judge](https://praison.ai/docs/docs/features/llm-as-judge)

> [card] [Evaluation Loop](https://praison.ai/docs/docs/eval/evaluation-loop)


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