Arbitrator
Outgoing Messages
OnAgentStateUpdated
Notifies platform of an update to the agent state.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "OnAgentStateUpdated"
}
},
"payload": {
"assistantId": {{String}},
"name": {{String}},
"state": {{AgentState}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
The unique identifier of agent whose state is updated. |
|
name |
String |
Yes |
The name of agent whose state is updated. |
|
state |
AgentState |
Yes |
The updated state. |
|
OnDialogTerminated
Notifies platform that the dialog is terminated for the agent.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "OnDialogTerminated"
}
},
"payload": {
"assistantId": {{String}},
"dialogId": {{String}},
"reason": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
The unique identifier of agent whose dialog is terminated. |
|
dialogId |
String |
Yes |
The unique identifier of dialog request that is terminated. |
|
reason |
String |
Yes |
The reason for terminating the dialog. |
|
RegisterAgentReply
Reply for RegisterAgent message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "RegisterAgent",
"replyToId": {{String}}
}
},
"payload": {
"success": {{Bool}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
success |
Bool |
Yes |
True if agent was successfully registered, False otherwise. |
|
DeregisterAgentReply
Reply for DeregisterAgent message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "DeregisterAgent",
"replyToId": {{String}}
}
},
"payload": {
"success": {{Bool}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
success |
Bool |
Yes |
True if agent was successfully deregistered, False otherwise. |
|
StartDialogReply
Reply for StartDialog message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Reply",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "StartDialog",
"replyToId": {{String}}
}
},
"payload": {
"success": {{Bool}},
"assistantId": {{String}},
"dialogId": {{String}},
"reason": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
success |
Bool |
Yes |
True if dialog was started, False otherwise. |
|
assistantId |
String |
Yes |
A unique identifier of agent for whom the dialog is requested. |
|
dialogId |
String |
Yes |
The unique identifier generated for the started dialog, returned if the dialog was started, empty otherwise |
|
reason |
String |
Yes |
The reason for the dialog not started, returned if request was denied, empty otherwise. This field is informational and is used only for logging purpose. |
|
Incoming Messages
RegisterAgent
Register an agent with the Engine.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "RegisterAgent"
}
},
"payload": {
"assistantId": {{String}},
"name": {{String}},
"dialogStateRules": [{{DialogStateRule}}]
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
A unique identifier of agent to register. |
|
name |
String |
Yes |
A name of agent that is registered. |
|
dialogStateRules |
DialogStateRule[] |
Yes |
List of dialog state rules for the agent. |
|
DeregisterAgent
Deregister an agent with the Engine.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "DeregisterAgent"
}
},
"payload": {
"assistantId": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
A unique identifier of agent to deregister. |
|
StartDialog
Start a dialog request to become the active agent. A dialog represents the lifecycle of user interaction with the agent.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "StartDialog"
}
},
"payload": {
"assistantId": {{String}},
"mode": {{Mode}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
A unique identifier of agent for whom the dialog is requested. |
|
mode |
Mode |
Yes |
The mode of dialog request. |
|
SetDialogState
Notifies Engine to set the dialog state for the specified agent.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "SetDialogState"
}
},
"payload": {
"assistantId": {{String}},
"dialogId": {{String}},
"state": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
The unique identifier of agent whose dialog state should be set. |
|
dialogId |
String |
Yes |
The unique identifier of dialog whose state should be set. This refers to the same Id that was returned when the dialog was started. |
|
state |
String |
Yes |
The new state to set to. |
|
StopDialog
Notifies Engine to stop the dialog state for the specified agent. Stopping the dialog results in the agent becoming INACTIVE. This triggers the Engine to send the OnAgentStateUpdated message.
JSON Structure
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "Arbitrator",
"action": "StopDialog"
}
},
"payload": {
"assistantId": {{String}},
"dialogId": {{String}}
}
}
Payload
Property |
Type |
Required |
Description |
Example |
assistantId |
String |
Yes |
The unique identifier of agent whose dialog should be stopped. |
|
dialogId |
String |
Yes |
The unique identifier of dialog to stop. |
|
Type Definitions
DialogStateRule
JSON Structure
{
"state": {{String}},
"wakewordInterruptionAllowed": {{Bool}}
}
Properties
Property |
Type |
Required |
Description |
Example |
state |
String |
Yes |
Name of the dialog state |
|
wakewordInterruptionAllowed |
Bool |
Yes |
Whether interruption (barge in) via wakeword allowed for this state |
|
Enums
Mode
Values
Value |
Description |
"WAKEWORD" |
Dialog request is through wakeword. |
"GESTURE" |
Dialog request is through gesture (PTT, TTT, etc). |
AgentState
Values
Value |
Description |
"ACTIVE" |
Denotes agent is active. |
"INACTIVE" |
Denotes agent is inactive. |