Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

openrois-gateway

Python

The OpenRoIS gateway: the process that hosts the main RoIS HRI Engine and faces the network.

Adapters and lower gateways connect to it as child engines on the path /adapter. Service applications connect as clients on any other path. The gateway discovers each child engine's components, aggregates their profiles, holds the bindings, runs command sequences across the child engines, and routes every RoIS call and every event to where it belongs. It composes Engine and WsServer from openrois-engine into a process with configuration, logging and a graceful stop.

Install

pip install openrois-gateway

The gateway needs Python 3.12 or later. With uv, which fetches Python itself, it runs with no install:

uvx --python 3.12 --from openrois-gateway openrois-gateway

Run

openrois-gateway                      # listens on ws://127.0.0.1:8765
openrois-gateway --host 0.0.0.0 --port 9000
python -m openrois.gateway --config gateway.yaml

Ctrl+C or SIGTERM stops the gateway: it closes every connection with code 1001 and exits with code 0.

The gateway does not authenticate its peers, so it binds loopback by default. Bind another interface only on a network you trust, and the gateway logs a warning when you do. Phones and headsets need this, since they cannot reach a gateway on loopback.

Docker

# From the repository root.
docker build -f services/gateway/Dockerfile -t openrois-gateway .
docker run --rm -p 127.0.0.1:8765:8765 openrois-gateway --log-level debug

Inside the container the gateway listens on every interface, so Docker can publish the port. Publish it on 127.0.0.1 unless the network is trusted. Settings come from OPENROIS_GATEWAY_* variables (-e) or flags after the image name.

compose.yaml at the repository root runs the gateway with the mock adapter behind it:

docker compose up --build
python testing/conformance/wire_check.py

The check connects as a client, waits until the adapter's components appear, and runs the conformance list. It needs only the websockets package and exits with 0 when every scenario passes.

Configuration

Each source overrides the one before it: the defaults, a YAML file, the environment, and the command-line flags.

Setting Flag Environment Default
Interface to bind --host OPENROIS_GATEWAY_HOST 127.0.0.1
TCP port, 0 for a free one --port OPENROIS_GATEWAY_PORT 8765
Engine id in the profile --engine-id OPENROIS_GATEWAY_ENGINE_ID gateway
Log level: debug, info, warning, error --log-level OPENROIS_GATEWAY_LOG_LEVEL info
Seconds to wait for a child engine's reply --child-timeout OPENROIS_GATEWAY_CHILD_TIMEOUT 10
YAML file with settings --config OPENROIS_GATEWAY_CONFIG None

The YAML file is a flat mapping with the setting names below. A key it does not know is an error.

host: 127.0.0.1
port: 8765
engine_id: gateway
log_level: info
child_timeout: 10
Exit code Meaning
0 Stopped by a signal
1 The gateway could not start, for example because the port is taken
2 The configuration is invalid

Embed

import asyncio

from openrois.gateway import Gateway, GatewayConfig


async def main() -> None:
    gateway = Gateway(GatewayConfig(port=0))
    stop = asyncio.Event()
    # run() serves until SIGTERM, SIGINT, or until the event is set.
    await gateway.run(stop)


asyncio.run(main())

start() and stop() are available on their own, and port reports the bound port.

Test

pip install -e "./services/gateway[dev]"
cd services/gateway && pytest && mypy && ruff check src/ tests/

Status

Alpha, pre-1.0, unstable API. The gateway answers the RoIS method catalog that the TypeScript SDK and the HRI client speak, with the RoIS behavior of CP1 to CP3 that openrois-engine implements, and makes no conformance claim. Authentication is planned for Phase 9, so the gateway binds to loopback by default. Health endpoints and a compose healthcheck are planned for Phase 5.

License

Apache-2.0.

Metadata

Release files for openrois-gateway 0.1.0a1

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

Source distribution (sdist)

Source distribution for openrois-gateway 0.1.0a1
File Size Uploaded Provenance Actions
openrois_gateway-0.1.0a1.tar.gz 16.8 kB With provenance Details for openrois_gateway-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openrois-gateway 0.1.0a1
File Interpreter ABI Platform Actions
openrois_gateway-0.1.0a1-py3-none-any.whl Python 3 none any Details for openrois_gateway-0.1.0a1-py3-none-any.whl

Total release size: 30.4 kB

Release files / openrois_gateway-0.1.0a1.tar.gz

Download URL openrois_gateway-0.1.0a1.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
194029369c3aa5ec3cc28a51826f6696b93efca3e21cb4859f528e777dd46d9b
BLAKE2b-256 checksum
How to use checksums
f3c5cdadc84b8922422f0d1daeab1c33f140af78ffc437e9c7025d512879e2d3
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 6, 2026.

Transparency log

Release files / openrois_gateway-0.1.0a1-py3-none-any.whl

Download URL openrois_gateway-0.1.0a1-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb80040de94bcb7e65ff5a59609603c9e4d403a7509dd4e743da54e29fcd811a
BLAKE2b-256 checksum
How to use checksums
0f670550e7a35843bcaef1257d0789df396e1e0fc75e0694021bea7614ac4ace
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 6, 2026.

Transparency log

Security for openrois-gateway 0.1.0a1

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.

Select from 2 files

Attestation for openrois_gateway-0.1.0a1.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 6, 2026.

Transparency log

A 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.

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