Skip to main content
Run this source only in an isolated WorkOS environment. It overwrites the permissions for the generic admin, member, and viewer roles. It also creates or reuses three fixed demo email addresses and resets their passwords to a published demo value.
workos_byot.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Configure an isolated WorkOS environment

Use a disposable environment that contains no shared roles or users. Enable RBAC and Email + Password authentication, then use WORKOS_API_KEY and WORKOS_CLIENT_ID from that same environment.
5

Run the example

Save the code above as workos_byot.py, then run:
Full source: cookbook/05_agent_os/rbac/asymmetric/workos_byot.py