Connect Recovery Step • AI Agent SDK
ConnectRecoveryStep: Machine-readable recovery hint for a connection rejection.
ConnectRecoveryStep
Defined in the protocols module.
AI Agent
Machine-readable recovery hint for a connection rejection.
Clients branch on `(code, next_step)` to implement deterministic, uniform reconnect behaviour without parsing free-text reasons:
REAUTHENTICATE: Obtain fresh credentials, then reconnect. REPAIR: Re-run the device pairing flow, then reconnect. UPGRADE_CLIENT: The client protocol is too old; update the client. DOWNGRADE_CLIENT: The client protocol is newer than the server supports; use an older client or wait for a server upgrade. WAIT_THEN_RETRY: Back off (see `retry_after_seconds`) then reconnect. DO_NOT_RETRY: The rejection is terminal; reconnecting will not help.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 109