This release is a pre-release and may not be stable for production use.
Modular, provider-agnostic communication gateway for real-time AI applications.
pip install kaiwen-gateway==0.1.0a2 Copy PIP instructions
A modular, provider-agnostic communication gateway for real-time AI applications.
Kaiwen Gateway is designed to be both a reusable Python library and a deployable ASGI service. It accepts connections from external systems, authenticates and isolates them, translates provider-specific protocols into well-defined internal contracts, and bridges live communication to application and AI backends.
The first implementation focuses on bidirectional telephone audio over secure WebSockets (WSS). The core is decoupled from telephony so future communication modules can be introduced without rewriting the platform.
To install from a local checkout or locally built wheel:
# Clone the repository git clone https://github.com/ImtheKaiwen/kaiwen-gateway.git cd kaiwen-gateway # Option 1: Install development dependencies and ASGI runtime using uv uv sync --extra server # Option 2: Build and install local wheel into an isolated virtual environment uv build pip install dist/kaiwen_gateway-0.1.0a1-py3-none-any.whl[server] To install only the minimal core library (contracts, admission control, identity, lifecycle supervision) without server dependencies:
pip install dist/kaiwen_gateway-0.1.0a1-py3-none-any.whl B. Installing from PyPI Kaiwen Gateway v0.1.0a1 is published on PyPI:
# Install core package + ASGI runtime: pip install "kaiwen-gateway[server]==0.1.0a1" # Install minimal core library only: pip install "kaiwen-gateway==0.1.0a1" 2. Verify Installation & Configuration The CLI runs with zero external runtime dependencies:
# Check version kaiwen-gateway --version # Verify configuration and environment variables kaiwen-gateway check-config 3. Run Executable Demos The Gateway includes self-contained, automated loopback demos that allocate an ephemeral port, verify token authentication, execute a complete call lifecycle, and confirm zero capacity leakage:
# Control plane synthetic telephony call demo: kaiwen-gateway demo # Full media plane demo (streams 25 binary PCM16LE audio frames, verifies echo, exercises barge-in interruption, and verifies zero capacity leak): kaiwen-gateway demo --media 4. Developer Quickstart Script See examples/quickstart_synthetic_media.py for a complete, runnable script demonstrating how to:
uv run python examples/quickstart_synthetic_media.py Capability Matrix (v0.1.0a1 vs. main) The following matrix distinguishes verified capabilities in the published synthetic alpha (v0.1.0a1), unreleased additions on main, and deferred or unsupported features:
kaiwen-gateway provides an argparse-driven command-line interface:
Security and privacy are core architectural requirements:
For vulnerability reporting, see SECURITY.md.
Repeatable synthetic performance qualification was conducted across 18 independent trials using the multi-process benchmark harness (tools/synthetic_media_load.py and tools/aggregate_benchmark_trials.py), with targeted fast-path queue optimizations and echo bottleneck isolation evaluated in PR #36:
It is critical to distinguish between the following five performance metrics:
Full benchmark reports and methodology are available in reports/m5_repeatable_qualification_report.md and reports/m5_qualification_manifest.json.
From a local clone with Python 3.11+ and uv installed:
Both files in this release have provenance metadata.
ai gateway realtime telephony voice websocket
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




