auth=True, you can gate access to your agent and manage users effortlessly.
Enabling Auth
To enable authentication, passauth=True to the @cycls.app() decorator:
Accessing User Data
Whenauth=True, the context.user object is populated with the authenticated user’s information:
User Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier for the user |
email | string | User’s email address |
name | string | User’s full name |
org | string | Organization ID the user belongs to |
plan | string | User’s subscription plan |
Monetization with Cycls Pass
Enable subscription-based access withplan="cycls_pass":
plan="cycls_pass" is set:
- Users are prompted to subscribe via Cycls Pass
- Subscription status is available via
context.user.plan - You can gate features based on the user’s plan
User Management
When auth is enabled, Cycls handles the entire login flow:- Sign up / Sign in UI
- Email verification
- Session management
- JWT token handling
Next Steps
Cloud Deployment
Deploy your agent to a global serverless network.