Skip to main content
Protect AgentOS with an HS256 JWT, the default scope map, and an audience bound to this AgentOS instance. The in-file smoke proves 200, 401, and 403 outcomes without calling a model.
basic_scopes.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 basic_scopes.py, then run:
Full source: cookbook/05_agent_os/07_security/basic_scopes.py