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

# auth • AI Agent SDK

> Authentication & Authorization Protocols for PraisonAI Agents.

# auth

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

Authentication & Authorization Protocols for PraisonAI Agents.

This package provides protocol-driven auth interfaces for the core SDK.
Implementations (JWT, OAuth, etc.) live in the platform package.

Quick start::

from praisonaiagents.auth import AuthIdentity, AuthBackendProtocol

class MyAuthBackend:
async def authenticate(self, credentials):
return AuthIdentity(id="user-1", type="user", roles=\["owner"])

async def authorize(self, identity, resource, action):
return "owner" in identity.roles

Subscription auth (lazy-loaded)::

from praisonaiagents.auth import resolve\_subscription\_credentials

creds = resolve\_subscription\_credentials("claude-code")
print(creds.api\_key, creds.headers)

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import auth
```
