Skip to main content

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)

Source distribution for sasy 0.5.1
File Size Uploaded
sasy-0.5.1.tar.gz 225.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sasy 0.5.1
File Interpreter ABI Platform
sasy-0.5.1-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page