The gateway now ships in the
praisonai-bot package. praisonai serve gateway still works exactly as documented here; for a standalone install see praisonai-bot Migration.Quick Start
1
Simple — nothing to change
The breaker is on by default with sensible thresholds. Watch the new
fleet block in health output:breaker_tripped: false with failing_channels: 0 means the fleet is healthy — no action needed.2
Tune the thresholds
Set any of the three thresholds under
gateway.health. Tuning is optional; the defaults trip on a real storm.What “tripped” means
A tripped breaker means the gateway detected a fleet-wide storm and is now holding channel restarts to avoid feeding it — not that a single channel failed. The breaker trips when either aggregate signal crosses its threshold within the trailing hour: the fleet restart rate reachesfleet_restarts_per_hour, or the fraction of failing channels reaches failing_channel_fraction. It stays tripped for breaker_cooldown_s, then re-arms on its own.
Agent-centric quick start
Does it protect you out of the box? Yes — the defaults trip on a real storm, and the same doctor already knows what to say.gateway / fleet fact. Its retry_hint points straight at the next command:
Configuration Options
All three thresholds live undergateway.health. Values verified against HealthMonitorConfig (praisonai_bot/gateway/health_monitor.py) and FleetSupervisionPolicy (praisonaiagents/gateway/protocols.py).
The
fleet block on gateway status health output carries the live state:
Common Patterns
Trip earlier on a smaller fleet — lower the fraction so a couple of failing channels are enough:Best Practices
Leave the defaults unless you see false trips
Leave the defaults unless you see false trips
40 restarts/hour and 0.5 failing fraction trip on a genuine fleet-wide storm, not on one flaky channel. Change them only if your fleet size or upstream makes the defaults noisy.Read the fleet block, not ten per-channel counters
Read the fleet block, not ten per-channel counters
breaker_tripped plus failing_channels / total_channels is the single fleet-health signal. You never have to infer “the gateway is thrashing” from individual channel restart counts.Follow the retry_hint
Follow the retry_hint
The one degraded-owner fact points at
praisonai gateway doctor. Run it to see what tripped rather than restarting channels by hand while the breaker is holding.Let it re-arm on its own
Let it re-arm on its own
After
breaker_cooldown_s the breaker clears its event window and re-arms automatically; the degraded fact clears when the storm subsides. Manual intervention is only needed to fix the underlying systemic fault.Related
Config Migration
One-shot upgrade of an older gateway.yaml with
praisonai gateway doctor --fixChannel Supervision
Per-channel restart budgets and operator pause/resume/reconnect

