Health Pressure • AI Agent SDK
HealthPressure: Observable saturation snapshot of the gateway's back-pressure machinery.
HealthPressure
Defined in the protocols module.
AI Agent
Observable saturation snapshot of the gateway’s back-pressure machinery.
Populated by the running gateway and surfaced in :meth:GatewayProtocol.health so an operator (or an autoscaler / a `/ready`-driven load balancer) can ask “is the gateway backing up?”
before admission starts shedding turns — rather than inferring overload post-mortem from shed-load log lines.
Attributes: admission_max: Configured concurrency ceiling (`0 when unbounded). admission_in_flight: Turns currently running. admission_queued: Turns currently waiting for a slot. admission_shed_total: Cumulative turns shed since start. inbox_pending: Aggregate pending inbound queue depth across sessions. outbox_pending: Durable outbound backlog awaiting delivery. outbox_dead_letter: Durable outbound entries in the dead-letter tier. event_loop_lag_p99_ms: Recent event-loop scheduling lag (ms). pressure: Single derived classification — "nominal", "elevated" or "saturated"` (closed vocabulary) — so an orchestrator can branch on one field.
Properties
intNo description available.
intNo description available.
intNo description available.
intNo description available.
intNo description available.
intNo description available.
intNo description available.
floatNo description available.
LiteralNo description available.
Internal & Generic Methods
- to_dict: Convert to a JSON-serializable dict for the health surface.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 1611