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.reliability is a single posture switch on BotOS, gateway YAML, or the CLI that maps a profile name onto drain window, concurrency ceiling, and admission queue — without touching individual settings.
The user deploys with a reliability preset; retries, timeouts, and drain behaviour apply automatically.
Quick Start
1
Python — pass reliability= to BotOS
2
YAML — set reliability: at the top level
3
CLI flag — override any YAML value
4
Override individual settings after the preset
Explicit kwargs on
BotOS always win over the preset:Profiles
Three built-in profiles cover the most common deployment scenarios.
The
production preset enables strict per-conversation FIFO delivery on the outbox — see Outbound Ordering.
How It Works
The resolver_reliability.py converts the profile string into concrete values for drain_timeout, max_concurrent_runs, and admission_policy. Those values are passed directly to the underlying WebSocketGateway build step.
Precedence (highest → lowest):
- Explicit kwargs on
BotOS.__init__— e.g.drain_timeout=30,outbound_ordering="strict" reliability=preset — e.g."production"- SDK defaults
outbound_ordering= is also an explicit kwarg that overrides the preset. Passing outbound_ordering="strict" (or "best_effort") always wins over the profile’s choice; unknown values raise ValueError at resolve time.
Configuration Surfaces
Python
YAML
Both placements are accepted:CLI
Common Patterns
Production deployment
Extend the drain window for slow agents
Production preset with per-thread ordering
Theproduction preset enables strict ordering; pass a custom lane_key to order sends within a shared channel:
Disable all backpressure for development
Best Practices
Use production in all deployed services
Use production in all deployed services
production composes drain + admission control together. Enabling them separately is error-prone — the preset guarantees a coherent configuration.Never mix reliability= with manual drain/admission in YAML unless intentional
Never mix reliability= with manual drain/admission in YAML unless intentional
Explicit YAML keys like
gateway.drain_timeout override the preset. That is correct behaviour when you need to tune a single value, but it can surprise you if you forget the preset was set.Unknown profile names raise immediately — do not catch the error
Unknown profile names raise immediately — do not catch the error
An unrecognised profile (e.g.
reliability: "fast") raises at startup, not at first request. This fail-fast behaviour is intentional — silent fallback to default would hide misconfiguration.Use --reliability CLI flag for canary deployments
Use --reliability CLI flag for canary deployments
Deploying a new preset to a single pod via the CLI flag lets you validate behaviour before updating the shared
gateway.yaml.Related
Gateway Overview
Bot gateway architecture and core concepts
Gateway Graceful Drain
In-flight turn drain on shutdown or reload
Gateway Admission Control
Cap concurrent runs and queue overflow requests
Gateway Flow Control
Back-pressure and send-policy options
Outbound Ordering
Per-conversation FIFO delivery the production preset turns on

