Scene contracts
Validate video, images, live streams, 3D scenes, digital humans and AI agents against one manifest.
validateSceneManifest()
Reality Relay Developers
One typed model for composing a Scene, fitting it to a Space and operating the live Session.
import {
RuntimeEngine,
InMemoryEndpointAdapter
} from "@reality-relay/sdk";
const runtime = new RuntimeEngine();
runtime.registerEndpoint(space, adapter);
runtime.registerScene(scene);
const session = await runtime.startSession({
endpointId: "space-portrait-01",
sceneId: "expert-welcome"
});
// Presence is now playing in the Space.
The model
A small surface for a physical system.
The SDK keeps content intent, endpoint capability and live state separate—so one presence experience can move across compatible formats without rewriting the application.
Content, presentation intent, interaction modes and the Presence Profile travel together in one versioned manifest.
registerScene(manifest)
Resolution, display mode, calibration and capabilities describe the physical endpoint through an adapter.
registerEndpoint(profile, adapter)
Prepare, play, pause, switch, observe and stop through a predictable lifecycle with typed events.
startSession({ endpointId, sceneId })
SDK surface
The foundation is executable today.
Validate video, images, live streams, 3D scenes, digital humans and AI agents against one manifest.
validateSceneManifest()
Evaluate safe area, full-body framing, contact line, attached shadow, camera stability and proof status.
evaluatePresenceAnalysis()
Negotiate endpoint capabilities and operate a stateful session without coupling the app to display hardware.
RuntimeEngine
Compile a Presence Brief into a provider-independent, portrait display plan with required checks and provenance.
compilePresenceVideoPlan()
Quickstart
Private SDK alpha
The alpha is currently installed from the checked-out package. It is not yet published to a public package registry and does not claim a hosted control plane.
During the design-partner alpha, link the SDK from an approved local checkout or private source repository.
npm install /path/to/realityrelay-platform
A Scene says what the experience needs—not how a particular display implements it.
const scene = {
id: "expert-welcome",
version: "1.0.0",
title: "Expert welcome",
content: {
type: "video",
uri: "./expert-welcome.mp4"
},
requiredCapabilities: ["video", "portrait"],
presentation: {
grounded: true,
grounding: { contactLine: 0.905, shadowEnd: 0.94 }
}
};
The adapter translates the common lifecycle into the commands understood by one endpoint.
runtime.registerEndpoint({
id: "space-portrait-01",
label: "Portrait prototype",
mode: "hld",
resolution: { width: 1080, height: 1920 },
capabilities: ["video", "portrait"],
calibration: { contactLine: 0.905 }
}, new InMemoryEndpointAdapter());
Every state transition produces an event with a timestamp and structured detail.
runtime.on("*", ({ type, detail, timestamp }) => {
console.log(type, detail, timestamp);
});
const session = await runtime.startSession({
endpointId: "space-portrait-01",
sceneId: "expert-welcome"
});
await runtime.pause(session.id);
await runtime.play(session.id);
await runtime.stop(session.id);
A Presence Brief becomes a constrained generation plan—not an unchecked raw prompt. The plan fixes the 9:16 master and records the checks required before physical publication.
const plan = compilePresenceVideoPlan({
id: "guide-welcome-plan",
brief,
presenceProfile,
provider
});
console.log(plan.displayMaster);
// 1080 × 1920 · 24 fps · H.264 · yuv420p
Availability
The boundary is explicit.
Available in SDK 0.1 alpha
Planned hosted platform
Design partner access
Bring one valuable use case and one target Space. We will help map it to the SDK and prove it on the physical endpoint.