Infrastructure
These classes mirror the LiveKit infrastructure types used in agent entrypoints. On SignalWire, connection lifecycle and room management are handled automatically by the control plane, so these are lightweight stubs that maintain API compatibility.
JobContext
Mirrors a LiveKit JobContext. Provides access to the room and process objects,
and lifecycle methods that the entrypoint calls before starting a session.
Properties
room
A room stub object with a name property (defaults to "livewire-room").
proc
A JobProcess instance with a userData object, populated by the
prewarm function if one was registered via defineAgent().
Methods
connect
No-op. SignalWire’s control plane handles connection lifecycle automatically. The agent connects when the platform invokes the SWML endpoint.
waitForParticipant
No-op. SignalWire handles participant management automatically. Returns
{ identity: 'caller' }.
JobProcess
Mirrors a LiveKit JobProcess. Used for prewarm and setup tasks. The prewarm
function registered in defineAgent({ prewarm }) receives a JobProcess instance.
Properties
userData
Arbitrary data object for sharing state between the prewarm function and the entry function. Defaults to an empty object.