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) -> Verdictdecide(run_id, effect_key, approved) -> Verdict(signed if a secret is set)cancel(run_id) -> Verdictping() -> VerdictVerdict:.released,.held,.refused, andv == "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.
Changelog
0.1.4
- WAL recovery barrier in the
soundgateserver: the log is exclusively locked, every complete record must parse (fail-closed otherwise), a torn final fragment is truncated or a newline-less whole record is completed, and the repair is fsynced before replay and before the listener opens. A failed append now stops the process instead of leaving a fragment. - Fixes the loss of an acknowledged rejection or release across two restarts
reported by Cenab Batu Bora (Georgia Tech), A Restart Is Not Permission:
When an Agent Gate Forgets "No" (Apart Research, September 2026). His
byte-prefix sweep ships as a regression test (
tests/wal_recovery_barrier.rs). - The server prints the address it actually bound, so
127.0.0.1:0works. - The in-process Python gate is unchanged.
Metadata
Release files for soundgate 0.1.4
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 |
|---|---|---|---|---|
| soundgate-0.1.4.tar.gz | 2.6 MB | With provenance | Details for soundgate-0.1.4.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| soundgate-0.1.4-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for soundgate-0.1.4-cp38-abi3-win_amd64.whl |
| soundgate-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for soundgate-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| soundgate-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details for soundgate-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| soundgate-0.1.4-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for soundgate-0.1.4-cp38-abi3-macosx_11_0_arm64.whl |
Total release size: 3.7 MB
Release files / soundgate-0.1.4.tar.gz
| Download URL | soundgate-0.1.4.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fb988442ac4c2d3434390a321fc04002dbce5f60942d54d1149256507253597
|
|
BLAKE2b-256 checksum How to use checksums |
f1629a95f5f8e5062380cf3c9f8ee451603af25ffdbb51655761bfb16b8d0a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / soundgate-0.1.4-cp38-abi3-win_amd64.whl
| Download URL | soundgate-0.1.4-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 213.6 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9e2e49e82978e52a62b8d3fdea8f853e0561aae6acc4e944bcb136f8a836b417
|
|
BLAKE2b-256 checksum How to use checksums |
bc5b08728271b18e43e2fb35b407fcf39ba8d0dda9be3b62bed22ae374189a95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / soundgate-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | soundgate-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 311.5 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
805c44c0f861965e1e6193375e3a21d18bfc659526550fb8c4fbd2131819b9e0
|
|
BLAKE2b-256 checksum How to use checksums |
12c8cad76d159986bca4c56d91fe4627260510af0aec85d7ca103ed3d607030a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / soundgate-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | soundgate-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 294.9 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8fcddd591c9d80bcd0af826966fdc422be12c3cc53b85c275e39c0c0e3c55694
|
|
BLAKE2b-256 checksum How to use checksums |
c2682435277e608afceb880526db3872f98bc53b76a141e3e1b6dffcb3f4a7e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / soundgate-0.1.4-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | soundgate-0.1.4-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 275.1 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5eed96a3091eaeec74b5f50ceffb0741529cf86cbf37b7aeb7730cc151adf864
|
|
BLAKE2b-256 checksum How to use checksums |
94488164f8f6835f400d3d252519b68ecc9788b1405d0595e2ca6ce74928c6f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logSecurity for soundgate 0.1.4
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 5 files in this release have been uploaded with provenance metadata.
Attestation for soundgate-0.1.4.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 28, 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.