scute is the server-side Python SDK. Your frontend signs people in with a Scute frontend SDK and sends the access token to your backend. The Python SDK verifies that token locally, reads and changes users and sessions with the app's secret key, asks Scute's engine what a user may do, and registers and runs AI agents.
What it covers#
| Area | Entry point |
|---|---|
| Token verification (local JWKS, optional remote check) | scute.tokens.verify |
| Users, invitations, support access | scute.users |
| Sessions: list, revoke, current user, refresh, sign out | scute.sessions |
| Authorization checks | scute.authz |
| Offline decisions from a policy snapshot | scute.local.decide_locally |
| Agents and tasks | scute.agents |
| Guardrails around an agent's tool calls | scute.harness.Harness |
| FastAPI and Flask integration | scute.contrib.fastapi, scute.contrib.flask |
The sign-in itself, MFA, policy and role management, filters, the policy snapshot endpoint and access requests have no methods in this SDK. Call the HTTP API for those.
Requirements#
- Python 3.10 or later.
- Dependencies installed with the package: httpx>=0.27 and cryptography>=42.
- Optional: fastapi>=0.110 (extra fastapi) or flask>=3 (extra flask).
Install#
The package is not on PyPI. The scute name on PyPI belongs to an unrelated package, so install from GitHub:
pip install git+https://github.com/scuteai/scute-pythonWith a framework extra:
pip install "scute[fastapi] @ git+https://github.com/scuteai/scute-python"pip install "scute[flask] @ git+https://github.com/scuteai/scute-python"Pin a commit by adding @<sha> to the URL, for example git+https://github.com/scuteai/scute-python@<sha>.
Configuration#
Scute() reads its settings from the environment when you do not pass them:
| Variable | Argument | Required | Default |
|---|---|---|---|
| SCUTE_APP_ID | app_id | Yes | none: ConfigurationError if missing |
| SCUTE_SECRET | secret | For secret-key calls | none |
| SCUTE_BASE_URL | base_url | No | https://api.scute.io |
The app id and secret are on the app's page in the dashboard. The secret is a server credential: never send it to a browser or to a model.
import osfrom scute import Scutescute = Scute() # SCUTE_APP_ID, SCUTE_SECRET, SCUTE_BASE_URLscute = Scute(app_id=os.environ["SCUTE_APP_ID"], secret=os.environ["SCUTE_SECRET"])Token verification only needs the app id. Users, sessions (list and revoke), authorization and agents need the secret.