> ## 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.

# Is Recoverable • AI Agent SDK

> is_recoverable: Classify a connect-error code as recoverable (transient) or terminal.

# is\_recoverable

Function

> This function is defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Classify a connect-error code as recoverable (transient) or terminal.

A single source of truth shared by the bundled gateway client and any
alternative client so terminal-versus-transient handling stays consistent.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def is_recoverable(code: 'ConnectErrorCode | str') -> bool
```

## Parameters

**code** `'ConnectErrorCode \\| str'` *required*

A :class:`ConnectErrorCode` or its string value.

### Returns

**Returns** `bool`

`True` when an auto-reconnecting client should back off and retry
(e.g. `RATE_LIMITED`, or an unknown/future code — fail open to
retry). `False` for terminal auth/pairing/protocol/origin/config
failures (and `AGENT_NOT_FOUND`, which the server emits with a
do-not-retry recovery step) where reconnecting will not help until
an operator intervenes.

## Uses

* `ConnectErrorCode`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L148)
>
> `praisonaiagents/gateway/protocols.py` at line 148


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.