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

# check • AI Agent SDK

> check: Check authentication for a request.

# check

Method

> This is a method of the [**AuthProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/AuthProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Check authentication for a request.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def check(request: Any) -> Dict[str, Any]
```

## Parameters

**request** `Any` *required*

The request object to authenticate

### Returns

**Returns** `Dict[str, Any]`

* success: bool - whether authentication succeeded
  * user\_id: Optional\[str] - authenticated user ID
  * role: Optional\[str] - user role/permissions
  * metadata: Dict\[str, Any] - additional auth context

## Source

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


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