Quick Start
1
Create a Bot
2
Handle Messages
Bot Types
BotConfig
BotUser
BotChannel
BotMessage
Bot Protocol
Gateway Types
GatewayConfig
GatewayMessage
GatewayEvent
type carries the wire value of a GatewayEventType member.
Gateway Event Types
GatewayEventType is the typed enum of every wire event the gateway can send over the WebSocket. Branch on it instead of raw strings.
GatewayEventType.MESSAGE_ABORT === 'message_abort').
GatewayEventType mirrors Python’s praisonaiagents.gateway.protocols.EventType member-for-member — same names, same wire values. The two are kept in lockstep by test_gateway_ts_event_type_lockstep.py, which fails CI on any drift. Branch on GatewayEventType members with the same confidence as the Python server.Gateway Protocol
Failover Manager
Handle provider failover for high availability:Autonomy Levels
Sandbox Types
Common Patterns
- Slack Bot
- Gateway Client
API Reference
BotProtocol
Bot protocol interface
GatewayProtocol
Gateway protocol interface
Best Practices
Use failover for reliability
Use failover for reliability
Configure multiple providers with
FailoverManager for high availability.Handle disconnections gracefully
Handle disconnections gracefully
Implement reconnection logic in your bot’s
connect() method.Rate limit message handling
Rate limit message handling
Add rate limiting to prevent overwhelming your agent with messages.
Related
Slack Bot
Build Slack integrations
Voice
Voice-enabled agents

