Cookbook
One runnable file per class — how it is constructed or subclassed, and
which APIs it uses. Every file is imported and exercised by the SDK's
test suite, so an example that names something the SDK no longer
exports breaks in CI rather than misleading you months later.
Write an adapter
| File |
Covers |
When you reach for it |
| 01_adapter_facade.py |
Adapter, InferCall, Overloaded |
Start here. Declare the model, decorate the loader and the handler. Most adapters need nothing else. |
| 02_adapter_service.py |
AdapterService, AdapterApp, BodyShape |
The classes the facade compiles to, for a model that outgrows the decorators. |
Answer correctly
| File |
Covers |
| 03_result_conventions.py |
The §5 conventions — detection, classification, transcription — and why following one makes your model a drop-in for somebody else's. |
| 04_errors_and_backpressure.py |
ServiceError, ErrorCategory, Overloaded. The category decides whether KAI-C retries, so it is not paperwork. |
| 05_streaming.py |
The §6 WebSocket protocol: one session, one warm model, and backpressure the caller can see. |
Be operable
Prove it, then ship it
Try one
pip install opennvr-adapter-sdk
opennvr-adapter new my-model # a runnable adapter + tests
cd my-model
opennvr-adapter dev # drive it in-process
opennvr-adapter validate . # the conformance run