Skip to main content
Mint an opaque agno_pat_ token, use its current default scopes, and revoke it. Only the token hash is stored; the plaintext appears once in the create response. The local smoke proves mint, scoped access, and immediate rejection after revocation on the same worker.
service_accounts.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as service_accounts.py, then run:
Full source: cookbook/05_agent_os/07_security/service_accounts.py