Topics are defined in @scenaro/sdk/protocol and shared between the Python voice agent and all frontends. They travel over the Transport data channel — LiveKit’s data channel today.

Topic table

TopicDirectionRole
configagent → frontHandshake: features, collections, restore state
config_ackfront → agentAcknowledge config received
config_requestagent → frontRequest config resend
message:newagent → frontConversation message (user/assistant/tool/event)
session:endagent → frontAgent-initiated session end
dictation:transcriptagent → frontReal-time STT transcript
state:updatefront → agentExperience state checkpoint
ui:activityfront → agentUI activity heartbeat
assistant:interruptfront → agentInterrupt assistant speech
session:controlbidirectionalSession control signals
event:firebidirectionalCustom event firing
lk.chatfront → agentUser text message
tool:{toolName}dynamicTool response channel via toolDataTopic()

Source definition

Dynamic tool topics

Handshake sequence

1

Agent sends config

Agent publishes on config with features, collections, and optional restore_state.
2

Frontend processes

The SDK session dispatches the payload on the event bus; FeatureProvider registers features and RPC methods.
3

Frontend acks

Frontend sends config_ack with { acknowledged: true, timestamp }.

Versioning

The protocol package has zero dependencies and serves as the cross-language spec. Future Python/Go SDKs will align on this same topic and message definitions. Potential future extraction: standalone scenaro-protocol npm/PyPI package.

See also