sasy
Python client for SASY. It records the inputs behind an agent's actions and asks the policy engine for a decision before each protected tool runs.
The engine runs separately; follow local engine setup before running an agent.
Install
Install in a Python 3.11 or newer environment, then start the local engine with Docker running:
pip install sasy
sasy engine start
For repository examples, use the checkout setup.
Protect an agent
Local setup saves a selected connection profile in ~/.sasy. The Python SDK
uses it from any project unless you configure another endpoint. Enable
instrumentation before building any agents:
import sasy
sasy.configure()
sasy.instrument()
Run each task inside with sasy.session(policy=...). The session records its
messages and binds the policy used to check tool calls. Cooperating agents share
the same session.
Supported frameworks: LangChain, Google ADK, and Langroid.
For a complete runnable program, follow framework examples or try the LangChain examples.
Instrumentation enables supported installed frameworks. An unusable framework
is skipped with a warning; pass its flag as True, such as
sasy.instrument(langchain=True), to require it. HTTP checks are off by default.
See instrumentation options
for selection and HTTP behavior.
Use the client directly
import json
from pathlib import Path
import sasy
sasy.configure()
with sasy.session(policy=Path("read-only.dl")):
decision = sasy.check_tool_call("Read", json.dumps({"file_path": "notes.txt"}))
if decision.authorized:
# Perform the protected action here.
print(Path("notes.txt").read_text())
Supply your own policy file. For checks that depend on earlier messages, your integration must also record those dependencies. See the adapter guide.
See configuration, authentication, and the security model for setup and supported boundaries.
Metadata
Release files for sasy 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sasy-0.5.1.tar.gz | 225.8 kB | With provenance | Details for sasy-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sasy-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for sasy-0.5.1-py3-none-any.whl |
Total release size: 490.4 kB
Release files / sasy-0.5.1.tar.gz
| Download URL | sasy-0.5.1.tar.gz |
|---|---|
| Size | 225.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36639913a725c5d0cb1fe67c43e279a4ac264871cca9e8fb1d1be1fb82f328f0
|
|
BLAKE2b-256 checksum How to use checksums |
7d5700e6c7315e9a8d85bfe9c30c659f71f9030d51acab4bf9922b9b4fb3e3a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sasy-0.5.1-py3-none-any.whl
| Download URL | sasy-0.5.1-py3-none-any.whl |
|---|---|
| Size | 264.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04ed53e9ffbf13afe567d491bc1d4bf1b6f413008954cd3555e38e8107955e1f
|
|
BLAKE2b-256 checksum How to use checksums |
80d1337d30fd401958ed27552441869ebefce06e8097e8972b80ced401392da7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for sasy 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sasy-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.