Skip to main content
Use WorkOS as the JWT issuer for AgentOS. WorkOS signs tokens with its keys; AgentOS verifies them against the WorkOS JWKS and reads scopes from the permissions claim. See the WorkOS User Management docs for broader context on how WorkOS issues tokens. This example provisions everything via the WorkOS API: permissions, three roles (admin, member, viewer), one organization, and three users. It mints a real WorkOS-signed access token per user and prints a curl command for each.
1

Create a Python file

workos_byot.py
2

Set up your virtual environment

3

Install dependencies

4

Export your credentials

Get your API key and Client ID from the WorkOS dashboard. Both must come from the same WorkOS environment:
5

Run the AgentOS

The script provisions RBAC in WorkOS, mints a WorkOS-signed token per user, and prints a curl command for each.
6

Test RBAC

Run the curl commands printed by the script. Expected outcomes on GET /agents: