Skip to main content

SOUNDGATE for Python

Use the SOUNDGATE effect-admission gate from Python LLM-agent frameworks (LangGraph, LlamaIndex, CrewAI, OpenAI Agents SDK, …). Two options:

Option A — pure-Python client (zero build)

No Rust toolchain needed. Run the soundgate gate binary, then:

from soundgate_client import GateClient
gate = GateClient(("127.0.0.1", 8796))            # secret=b"..." if the gate has one
v = gate.submit("run1", "send_email", needs_approval=True)
if v.released:
    send_the_email()

Files: soundgate_client.py. This talks the exact JSON/TCP protocol of the gate server and computes the same HMAC-SHA256 decision tag.

Option B — native PyO3 extension (pip install soundgate)

A compiled Rust extension with an identical API, plus an optional in-process mode. Build:

pip install maturin
cd soundgate && maturin develop --release --features python
from soundgate import GateClient, Gate, decision_tag
gate = GateClient("127.0.0.1:8796")     # external gate — recommended
# or, in-process (shares the agent's address space; see below):
g = Gate(); g.submit("run1", "x", True)

See INSTALL_pyo3.md for the three crate edits and build details.

Which mode?

Isolation Latency Deploy Use when
GateClient (external) Full — gate is a separate process; namespace/eBPF mediation holds one socket round-trip (~53 µs) run the gate binary default / production
Gate (in-process) Reduced — gate shares the agent's memory function call none single-process / low-stakes

The external client preserves the paper's environment-external reference-monitor model. The in-process Gate is faster and simpler but forgoes that isolation.

API (both clients)

  • submit(run_id, effect_key, needs_approval=False) -> Verdict
  • decide(run_id, effect_key, approved) -> Verdict (signed if a secret is set)
  • cancel(run_id) -> Verdict
  • ping() -> Verdict
  • Verdict: .released, .held, .refused, and v == "release"
  • decision_tag(secret, run_id, effect_key, approved) -> str

Verified

test_protocol.py drives the pure-Python client against a mock gate that reimplements the admission core, checking all four properties (hold-until- decided, reject-stickiness, dedup-on-replay, fence-on-cancel), cross-run key independence, HMAC-authenticated decisions, forged-MAC rejection, and the decision-tag byte format. All pass. The PyO3 GateClient sends the identical protocol and reuses hmac.rs, so the same guarantees apply.

Release files for soundgate 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soundgate 0.1.3
File Size Uploaded
soundgate-0.1.3.tar.gz 320.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for soundgate 0.1.3
File
soundgate-0.1.3-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details

Total release size: 1.4 MB

Release files / soundgate-0.1.3.tar.gz

Download URL soundgate-0.1.3.tar.gz
Size 320.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4c4297d1c58b39d58947d81520a44ede2068f90741f8ffb56facf5a10fde6e5e
BLAKE2b-256 checksum
How to use checksums
434409843e0cc104e036269943bb995e10033b2d682953d77293d71cb5ed45f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / soundgate-0.1.3-cp38-abi3-win_amd64.whl

Download URL soundgate-0.1.3-cp38-abi3-win_amd64.whl
Size 211.5 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
489465f1a3b4448d4fc6d76705fedd3f2103971ea6204a6938fbeaba1ca2b77e
BLAKE2b-256 checksum
How to use checksums
0562868e8245edddd8e84f3c66b00f896e4e67cc49365b17cf4b4620f54390a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 308.9 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
db7d01201565d33b060250f839b40ef7168043697070ade8ec2fafccc8adbfd7
BLAKE2b-256 checksum
How to use checksums
372263fe453316406b6625c97236a947d67f5bd84f9a507192bb3db9765b92bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 292.8 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
768bc99f803160f73bd61f2d82fb6786a2665c044b97cb5527eb870124630e9a
BLAKE2b-256 checksum
How to use checksums
428bfe3a53189914b97cc80e1b57376b05700019be1bf3b42f30d070814748c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl

Download URL soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
Size 277.1 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ac6eab23d33dbb6311b39c95f13b0ed34e31a52c8804432d2b2db39852bdc558
BLAKE2b-256 checksum
How to use checksums
5a0176f70c611d61b214593b5097a30ffa99d130c691decb7a1c5e2f1288af99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

5 release files

0.1.0

6 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