Skip to main content
agentonboard-sdk[flask] provides @require_agent_token for Flask routes. It reads Authorization: Bearer <token>, verifies the RS256 signature against public JWKS keys, resolves your user record, and returns (jsonify({...}), status) on failure.

Copy-paste agent prompt


1. Install the Python SDK


2. Guard your Flask routes

@require_agent_token sets flask.g.agent_user and flask.g.agent_identity, and injects agent_user or agent_identity into your route function when declared in its parameters:
app.py

3. Enabling explicit agent signup (POST /api/signup)

Keep @require_agent_token(..., auto_create=False) on all regular routes and add a dedicated POST /api/signup route using create_agent_account:
app.py

4. Test with curl

Mint a 5-minute test token using POST /api/v1/token/exchange and call your Flask endpoint:

FastAPI

Testing & Production