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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sasy-0.5.0.tar.gz | 224.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sasy-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 488.2 kB
Release files / sasy-0.5.0.tar.gz
| Download URL | sasy-0.5.0.tar.gz |
|---|---|
| Size | 224.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96f1879ebedcda092d8706c5b471cefc76bb0fb53989534117da5224a7511c9e
|
|
BLAKE2b-256 checksum How to use checksums |
97f4b62876d4bc3962f379ba8e0044057efcde6f959f40f2030b8925464487af
|
| 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 5, 2026.
Transparency logRelease files / sasy-0.5.0-py3-none-any.whl
| Download URL | sasy-0.5.0-py3-none-any.whl |
|---|---|
| Size | 263.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12c15fa76627688f9d28834613e770ab2b0d80a9f8410a0f83b14be892f2348c
|
|
BLAKE2b-256 checksum How to use checksums |
0e9502acbb2e3bba5628d8f8f5508f53b9c1358590622d591ac216caf8b8d68c
|
| 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 5, 2026.
Transparency log