> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Recovery Step • AI Agent SDK

> ConnectRecoveryStep: Machine-readable recovery hint for a connection rejection.

# ConnectRecoveryStep

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

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

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L104">
  `praisonaiagents/gateway/protocols.py` at line 104
</Card>
