Skip to main content

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

int
No description available.
int
No description available.
int
No description available.
int
No description available.
int
No description available.
int
No description available.
int
No description available.
float
No description available.
Literal
No description available.
  • to_dict: Convert to a JSON-serializable dict for the health surface.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 1221