Agent Keep Alive
Learn how to send messages ensuring uninterrupted communication for your agent.
What is the keepAlive
Message
keepAlive
MessageThe KeepAlive
message is a JSON command that you can use to ensure that the server does not close the connection.
Using
KeepAlive
is not recommended for most agent conversations, because you will typically be sending continuous microphone audio to the agent in case the user has something to say.
Sending KeepAlive
KeepAlive
To send the KeepAlive
message, you need to send the following JSON message to the server:
This message should only be used during a period of time when the client is not sending audio. During such a period, the client can send a KeepAlive
message every 8
seconds to keep the connection open.
{
"type": "KeepAlive"
}
KeepAlive
Confirmation
KeepAlive
ConfirmationYou will not receive a response back from the server.
Conclusion
The KeepAlive
message is a useful JSON command that helps maintain an open connection with the server, preventing it from being closed due to inactivity. This ensures continuous communication without interruptions during periods when no other data is being transmitted.
Updated 21 days ago