Skip to content
Wysp Docs

Websocket Reference

All WebSocket messages use the envelope format:

{
"kind": "message.type",
"data": { ... }
}

Identify the device

type: object

NameTypeRequiredDescription
deviceIdstringyesOpaque stable identifier for the device. Typically randomly generated and stored on the device, or provided by the operating system.
userAgentstringnoFreeform text identifying the client platform/software
subscriptionsstring[]yesDefine which kinds of realtime events this device wants to receive.
{
"kind": "device.ident",
"data": {
"deviceId": "2ef22bf5-ab81-43d9-85c0-3cc942c0fda5",
"userAgent": "Wysp iOS 1.0.47",
"subscriptions": [
"utterances",
"prompts",
"tools"
]
}
}

Report the current status of the device

type: object

NameTypeRequiredDescription
batteryLevelnumbernoDevice battery level in % (0-100)
isNavigatingbooleannoWhether or not the device is currently in a “navigating” mode.
{
"kind": "device.status",
"data": {
"batteryLevel": 72,
"isNavigating": true
}
}

Notification sent by device indicating that is has played a locally-triggered audio statement to the User

type: object

NameTypeRequiredDescription
statementIdstringyesID of the heard Statement
playedAtstringyesTime at which playback started
interruptedAfterMsstringyesMilliseconds of playback completed before interruption
{
"kind": "device.heard_statement",
"data": {
"statementId": "2e4597a8-e879-482a-aa65-7cf0305f189d",
"playedAt": "2026-01-28T09:00:00.000Z",
"interruptedAfterMs": "1200"
}
}

Append fixes

type: object[]

type: object

NameTypeRequiredDescription
latnumberyesLatitude in degrees
lngnumberyesLongitude in degrees
fixedAtstringyesTimestamp of the fix
headingnumber | nullyesEstimated direction the user is facing. North at 0 degress, clockwise to 360.
coursenumber | nullyesCourse over ground in degrees. North at 0 degress, clockwise to 360.
velocitynumber | nullyesVelocity in meters per second
altitudenumber | nullyesMeters above sea level
locationAccuracynumber | nullyesAccuracy of location in meters
altitudeAccuracynumber | nullyesAccuracy of altitude in meters
{
"kind": "fixes.append",
"data": [
{
"lat": 37.7749,
"lng": -122.4194,
"fixedAt": "2026-01-28T08:30:00.000Z",
"heading": 90,
"course": 88,
"velocity": 1.2,
"altitude": 15,
"locationAccuracy": 5,
"altitudeAccuracy": 8
}
]
}

Set user state input

type: object

NameTypeRequiredDescription
languagesstring[]noArray of languages spoken by User, in order of descending preference.
unitSystemstringnoPreferred unit system for measurements
givenNamestringnoThe given name (aka first name / forename / casual spoken name) of the user.
travelModestringnoPreferred travel mode
destinationsobject & object & object[]noCurrent destination objectives for the user
{
"kind": "state.input.set",
"data": {
"languages": [
"en-US",
"nb-NO"
],
"unitSystem": "LOCAL",
"givenName": "Marius",
"travelMode": "FOOT",
"destinations": [
{
"kind": "PRESENCE",
"name": "Home"
}
]
}
}

Search the map for places, addresses, businesses, etc.

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.search_map",
"data": {
"requestId": "string",
"params": {
"query": "coffee shop on the way"
}
}
}

Add a destination to the trip

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.add_destination",
"data": {
"requestId": "string",
"params": {
"query": "cafe sara"
}
}
}

Remove a destination from the trip

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.remove_destination",
"data": {
"requestId": "string",
"params": {
"destination": "cafe sara"
}
}
}

Reorder the destinations within a trip

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.reorder_destinations",
"data": {
"requestId": "string",
"params": {
"desiredOrder": "Cafe Sara, then Astrup Fearnley"
}
}
}

Start navigation mode

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.start_navigation",
"data": {
"requestId": "string",
"params": {}
}
}

Stop navigation mode

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.stop_navigation",
"data": {
"requestId": "string",
"params": {}
}
}

Set the travel mode for navigation

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.change_travel_mode",
"data": {
"requestId": "string",
"params": {
"travelMode": "BICYCLE"
}
}
}

Get clarification on which way to go

type: object

NameTypeRequiredDescription
requestIdstringyes
paramsobjectyes
{
"kind": "tools.get_clarification",
"data": {
"requestId": "string",
"params": {
"question": "where do I turn?"
}
}
}

On socket connection, server sends the entire state object. The client should hold this in memory, merging in deltas over time as they arrive in state.delta messages

type: object

NameTypeRequiredDescription
inputobjectyesUser state input
planobject | nullyes
geometryobjectyesGeoJSON describing the user’s current position and planned routes.
statementsobject[]yesPlanned statements for the user
hudItemsobject[]yesHUD manoeuvre items
serverobjectyesMetadata about the current state of the server from the user’s perspective
{
"kind": "state.bootstrap",
"data": {
"input": {
"languages": [
"en-US",
"nb-NO"
],
"unitSystem": "LOCAL",
"givenName": "Marius",
"travelMode": "FOOT",
"destinations": [
{
"kind": "PRESENCE",
"name": "Home"
}
]
},
"plan": {
"durationSeconds": 852,
"distanceMeters": 600
},
"geometry": {
"fix": null,
"triggers": {},
"routeLines": [],
"routePoints": []
},
"statements": [
{
"id": "c04dd717-7e2c-434d-8d31-2f7268e5b51b",
"transcript": "Turn left at the roundabout.",
"locale": "en-US",
"clipId": "18905e54-0091-4e3a-90f7-58d1dcecb913",
"trigger": {
"kind": "LOCATION",
"lat": 37.7749,
"lng": -122.4194,
"heading": 90
}
}
],
"hudItems": [],
"server": {
"isPlanning": false,
"errorMessage": null,
"dataAvailability": "FULL"
}
}
}

Changes to the state object since the last state.bootstrap

type: object

NameTypeRequiredDescription
inputobjectnoUser state input
planobject | nullno
geometryobjectnoGeoJSON describing the user’s current position and planned routes.
statementsobject[]noPlanned statements for the user
hudItemsobject[]noHUD manoeuvre items
serverobjectnoMetadata about the current state of the server from the user’s perspective
{
"kind": "state.delta",
"data": {
"input": {
"languages": [
"en-US",
"nb-NO"
],
"unitSystem": "LOCAL",
"givenName": "Marius",
"travelMode": "FOOT",
"destinations": [
{
"kind": "PRESENCE",
"name": "Home"
}
]
},
"plan": {
"durationSeconds": 852,
"distanceMeters": 600
},
"geometry": {
"fix": null,
"triggers": {},
"routeLines": [],
"routePoints": []
},
"statements": [
{
"id": "c04dd717-7e2c-434d-8d31-2f7268e5b51b",
"transcript": "Turn left at the roundabout.",
"locale": "en-US",
"clipId": "18905e54-0091-4e3a-90f7-58d1dcecb913",
"trigger": {
"kind": "LOCATION",
"lat": 37.7749,
"lng": -122.4194,
"heading": 90
}
}
],
"hudItems": [],
"server": {
"isPlanning": false,
"errorMessage": null,
"dataAvailability": "FULL"
}
}
}

An audio message heard (or to be heard) by the User

type: object

NameTypeRequiredDescription
idstringyesUUID
transcriptstringyesPlain text content of the utterance
languagestringyesBCP47 language tag
timestampstringyesISO 8601 UTC Date string
isHeardbooleanyesWhether utterance has already been heard by the user
interruptedAtnumbernoPlayout progress (0.0-1.0) at which playout was interrupted
{
"kind": "utterance",
"data": {
"id": "c10fed62-9074-41e8-ad3b-a2da249714a2",
"transcript": "Turn left at the lights.",
"language": "en-US",
"timestamp": "2026-01-28T09:00:00.000Z",
"isHeard": true,
"interruptedAt": 0.749
}
}

Control signal

type: object

NameTypeRequiredDescription
signalstringyesControl signal
{
"kind": "signal",
"data": {
"signal": "START_NAVIGATION"
}
}

Debug data

type: object

{
"kind": "debug",
"data": {}
}

Prompt to be integrated into the context window

type: object

NameTypeRequiredDescription
keystringyesOpaque key used for prompt replacement
languagestringyesNatural language of the content
contentstringyesContent to be included in the user’s overall context window.
timestampstringyesISO 8601 UTC Date string
ttlnumbernoNumber of seconds the content remains valid for
{
"kind": "prompt",
"data": {
"key": "3b8cb7c20",
"language": "en-US",
"content": "The user is near the end of Pilestredet and should turn left at the lights. Just before the turn there is a prominent green building on the right. The left turn is subtly uphill.",
"timestamp": "2026-01-28T09:00:00.000Z",
"ttl": 20
}
}

Set of tool definitions to be included into the context window

type: object

NameTypeRequiredDescription
toolsobject[]yes
{
"kind": "tools.definitions",
"data": {
"tools": [
{
"name": "string",
"title": "string",
"description": "string",
"inputSchema": {},
"outputSchema": {},
"annotations": {
"instructions": "string",
"indications": [
"string"
],
"contraindications": [
"string"
],
"posture": "PROACTIVE"
}
}
]
}
}

List of which tools are currently available

type: object

NameTypeRequiredDescription
availablestring[]yes
{
"kind": "tools.availabilities",
"data": {
"available": [
"string"
]
}
}