External effect-admission gate for LLM-agent frameworks (Rust core, Python bindings)
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soundgate-0.1.3.tar.gz.
File metadata
- Download URL: soundgate-0.1.3.tar.gz
- Upload date:
- Size: 320.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4297d1c58b39d58947d81520a44ede2068f90741f8ffb56facf5a10fde6e5e
|
|
| MD5 |
e4f7dfef1ffe0c9f0604803ed2ab8fbe
|
|
| BLAKE2b-256 |
434409843e0cc104e036269943bb995e10033b2d682953d77293d71cb5ed45f7
|
Provenance
The following attestation bundles were made for soundgate-0.1.3.tar.gz:
Publisher:
release.yml on sajjadanwar0/soundgate-paper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soundgate-0.1.3.tar.gz -
Subject digest:
4c4297d1c58b39d58947d81520a44ede2068f90741f8ffb56facf5a10fde6e5e - Sigstore transparency entry: 2171706952
- Sigstore integration time:
-
Permalink:
sajjadanwar0/soundgate-paper@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sajjadanwar0
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file soundgate-0.1.3-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: soundgate-0.1.3-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 211.5 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
489465f1a3b4448d4fc6d76705fedd3f2103971ea6204a6938fbeaba1ca2b77e
|
|
| MD5 |
764e621b575e05743bc1480f52518b8b
|
|
| BLAKE2b-256 |
0562868e8245edddd8e84f3c66b00f896e4e67cc49365b17cf4b4620f54390a5
|
Provenance
The following attestation bundles were made for soundgate-0.1.3-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on sajjadanwar0/soundgate-paper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soundgate-0.1.3-cp38-abi3-win_amd64.whl -
Subject digest:
489465f1a3b4448d4fc6d76705fedd3f2103971ea6204a6938fbeaba1ca2b77e - Sigstore transparency entry: 2171707015
- Sigstore integration time:
-
Permalink:
sajjadanwar0/soundgate-paper@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sajjadanwar0
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 308.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db7d01201565d33b060250f839b40ef7168043697070ade8ec2fafccc8adbfd7
|
|
| MD5 |
14d89fc1c629f89952b78071cc8c62c9
|
|
| BLAKE2b-256 |
372263fe453316406b6625c97236a947d67f5bd84f9a507192bb3db9765b92bf
|
Provenance
The following attestation bundles were made for soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on sajjadanwar0/soundgate-paper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soundgate-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
db7d01201565d33b060250f839b40ef7168043697070ade8ec2fafccc8adbfd7 - Sigstore transparency entry: 2171707001
- Sigstore integration time:
-
Permalink:
sajjadanwar0/soundgate-paper@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sajjadanwar0
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 292.8 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
768bc99f803160f73bd61f2d82fb6786a2665c044b97cb5527eb870124630e9a
|
|
| MD5 |
a2faf9d3f26a29496cbeb3592531681b
|
|
| BLAKE2b-256 |
428bfe3a53189914b97cc80e1b57376b05700019be1bf3b42f30d070814748c2
|
Provenance
The following attestation bundles were made for soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on sajjadanwar0/soundgate-paper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soundgate-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
768bc99f803160f73bd61f2d82fb6786a2665c044b97cb5527eb870124630e9a - Sigstore transparency entry: 2171706967
- Sigstore integration time:
-
Permalink:
sajjadanwar0/soundgate-paper@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sajjadanwar0
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 277.1 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac6eab23d33dbb6311b39c95f13b0ed34e31a52c8804432d2b2db39852bdc558
|
|
| MD5 |
2ce1a94c31eecbad7267c5f1ef6c1d5a
|
|
| BLAKE2b-256 |
5a0176f70c611d61b214593b5097a30ffa99d130c691decb7a1c5e2f1288af99
|
Provenance
The following attestation bundles were made for soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on sajjadanwar0/soundgate-paper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soundgate-0.1.3-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
ac6eab23d33dbb6311b39c95f13b0ed34e31a52c8804432d2b2db39852bdc558 - Sigstore transparency entry: 2171706992
- Sigstore integration time:
-
Permalink:
sajjadanwar0/soundgate-paper@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/sajjadanwar0
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@104b435a704133a8b3a36dd2a1da60e2f8d52e3d -
Trigger Event:
push
-
Statement type: