keel-voice-sidecar
EXPERIMENTAL / UNCERTIFIED observation SDK · 0.2.1 · Apache-2.0
This Python library records signed observations inside a customer-operated voice gateway. The OpenAI Realtime, OpenAI Live and ElevenLabs Agents adapters have been exercised with mocked WebSockets. Live provider sandbox qualification and a fresh-customer end-to-end run are outstanding. Every integration profile is unqualified. The gateway is a separate prerequisite.
Evaluate locally
Use Python 3.11 or 3.12. Install the release candidate wheel in a virtual environment. For a hosted evaluation, supply an admitted Keel session ID, a project credential, a provider credential and an independently enrolled sidecar public key. The customer owns consent, session admission, gateway operation and the execution of tool callbacks. The gateway controls capture, provider connections and credential custody. Obtain the required customer authorization before capture or provider startup.
Prepare a stable signing key in an owner-controlled directory. Keep the private PEM in the gateway. The command prints the public enrollment record. Have a project administrator enroll that record separately.
umask 077
keel-voice-prepare-key --path evidence/sidecar.pem --key-id gateway-test > enrollment.json
The example takes a configured sidecar so a gateway can supply its own audio sink and handle caller input concurrently. Evidence delivery is awaited on the audio path and can delay audio forwarding. Call end_session() explicitly to request an attestation. Finish all caller input and tool operations before the provider receive loop ends. On a final evidence-delivery failure, retain the evidence database and reconcile outstanding or rejected events before treating the session as complete.
from pathlib import Path
from keel_voice_sidecar import VoiceSidecar, VoiceSidecarConfig, to_file
def configure(session_id: str, keel_url: str, keel_key: str, provider_key: str):
return VoiceSidecarConfig(
session_id=session_id,
keel_base_url=keel_url,
keel_api_key=keel_key,
openai_api_key=provider_key,
signing_private_key_path=Path("evidence/sidecar.pem"),
signing_key_id="gateway-test",
wal_path=Path("evidence/events.sqlite3"),
)
async def observe(sidecar: VoiceSidecar, output: Path):
try:
await sidecar.start()
await sidecar.run()
artifact = await sidecar.end_session()
return to_file(artifact, output)
finally:
await sidecar.close()
What leaves the gateway
The default event emitter sends media and transcript digests, bounded identifiers and codes, counts, timestamps and signatures to the configured HTTPS Keel endpoint. Raw audio travels to the voice provider. A digest can still be linkable. Use opaque IDs and predefined vocabulary for names, reason codes and labels. A short identifier can encode personal data. The SDK cannot determine its meaning.
The session-end request accepts failed as a boolean, metadata codes ended_by and reason_code, and metrics with meter, numeric quantity, optional unit and optional boolean estimated. The separate request_tool_permit(...) helper sends its arguments to Keel in full, in both arguments and target.arguments. Supply only data intended for the permit service. Receiver callbacks and custom transports are application code.
SQLite stores signed event JSON, session and event identifiers, delivery state and acknowledgement IDs on disk. Treat the database, SQLite journal companions, exported JSONL, attestations and backups as sensitive. On POSIX, use a directory controlled by the gateway user and mode 0600 for database and private key files. Set equivalent access controls on other platforms. Retain the database until reconciliation and verification finish.
Verify an artifact
Obtain the trusted issuer Ed25519 public key independently. Run a structural and issuer check with:
keel-voice-verify attestation.json --ca-key issuer.pem --format=json
For a newly issued artifact containing wire-event commitments, export the committed rows for that session only. The example assumes the gateway has closed its database, an existing private working directory and a new output filename.
import sqlite3
from pathlib import Path
def export_events(database: Path, session_id: str, destination: Path):
import os
from contextlib import closing
with closing(sqlite3.connect(database.resolve().as_uri() + "?mode=ro", uri=True)) as db:
rows = db.execute(
"SELECT event_json FROM voice_event_wal "
"WHERE session_id=? AND status='committed' ORDER BY wal_id",
(session_id,),
)
fd = os.open(destination, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
with os.fdopen(fd, "w", encoding="utf-8") as output:
for (event,) in rows:
output.write(event + "\n")
keel-voice-verify attestation.json --ca-key issuer.pem --events events.jsonl \
--sidecar-key enrollment.json --strict --format=json
Strict mode requires checkable sidecar signatures. Historical hash-only artifacts lack the detached commitments needed for that check. Read each status separately. A structurally consistent timestamp receipt is UNCHECKED; an absent receipt can be DEGRADED. This CLI does not authenticate RFC 3161 tokens. An issuer-signed notice, consent or handoff marker records what was reported. It cannot establish legal sufficiency, delivery to a person, speech suppression, provider execution or a completed human transfer.
Copyright 2026 Keel API, Inc.
Metadata
Release files for keel-voice-sidecar 0.2.1
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 |
|---|---|---|---|---|
| keel_voice_sidecar-0.2.1.tar.gz | 96.4 kB | With provenance | Details for keel_voice_sidecar-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keel_voice_sidecar-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for keel_voice_sidecar-0.2.1-py3-none-any.whl |
Total release size: 178.9 kB
Release files / keel_voice_sidecar-0.2.1.tar.gz
| Download URL | keel_voice_sidecar-0.2.1.tar.gz |
|---|---|
| Size | 96.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc1066399ecb20fec9472352bdb514be1f296052f04e197f824b3404e010fd54
|
|
BLAKE2b-256 checksum How to use checksums |
6ea60793dd1f733106ca3c025970e5cf80823fa826a7ec2e9c95a7cc5adccad0
|
| 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 Nov 22, 2026.
Transparency logRelease files / keel_voice_sidecar-0.2.1-py3-none-any.whl
| Download URL | keel_voice_sidecar-0.2.1-py3-none-any.whl |
|---|---|
| Size | 82.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab8a8f47a4ab0d94bcdb7eb29abf708d566dd606d20abc1d653567e910f2380c
|
|
BLAKE2b-256 checksum How to use checksums |
85164d38ca93f2de0bcc6684a8a02b486d9819571b64bc0aa308f028c3782b0e
|
| 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 Nov 22, 2026.
Transparency logSecurity for keel-voice-sidecar 0.2.1
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
Both files in this release have been uploaded with provenance metadata.
Attestation for keel_voice_sidecar-0.2.1.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 Nov 22, 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.