Skip to main content

auth

AI Agent 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