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

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

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

<ResponseField name="Returns" type="HealthPressure">
  class:`HealthPressure` ready for the health surface.
</ResponseField>

## Uses

* `HealthPressure`

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Evaluation Concept" icon="gavel" href="/docs/docs/concepts/evaluation" />

  <Card title="LLM as Judge" icon="scale-balanced" href="/docs/docs/features/llm-as-judge" />

  <Card title="Evaluation Loop" icon="rotate" href="/docs/docs/eval/evaluation-loop" />
</CardGroup>
