AgentParticipant

Represents an agent participant in a Meeting.

An AgentParticipant is an AI-driven participant (for example, a voice agent) that joins the meeting alongside human participants. It adds agent-specific properties — agentId and agentState — while inheriting the standard participant APIs for stream events, pinning, removing, and stats.

Identifying agents: use isAgent (which returns true for AgentParticipant and false for regular participants) before downcasting.

Listening for agent-specific events: register a ParticipantEventListener via addEventListener and override onAgentStateChanged, onAgentTranscriptionReceived, and onAgentMetrics.

Code Example:


for (p in meeting.participants.values) {
    if (p.isAgent) {
        val agent = p as AgentParticipant
        agent.addEventListener(object : ParticipantEventListener() {
            override fun onAgentStateChanged(agentState: AgentState) {
                // Update UI based on agent state (IDLE/LISTENING/THINKING/SPEAKING)
            }
        })
    }
}

See also

ParticipantEventListener.onAgentStateChanged()

Properties

Link copied to clipboard
Link copied to clipboard

Inherited properties

Link copied to clipboard
The display name of this participant, set when joining the meeting.
Link copied to clipboard
val id: String
The unique identifier of this participant, assigned by the server.
Link copied to clipboard
Whether this participant is the local participant (current user).
Link copied to clipboard
Custom metadata associated with this participant as a JSON object.
Link copied to clipboard
The current mode of this participant (e.g.
Link copied to clipboard
The current video quality setting for this participant ("high", "med", or "low").
Link copied to clipboard
A map of all active media streams for this participant, keyed by stream ID.

Functions

Link copied to clipboard
Returns whether this participant is an AI agent.

Inherited functions

Link copied to clipboard
This method can be used to register a ParticipantEventListener on this participant to receive callbacks for stream and state-change events.
Link copied to clipboard
This method can be used to get the audio statistics for this participant.
Link copied to clipboard
This method can be used to get the video statistics for this participant.
Link copied to clipboard
@Async
fun pin(type: String)
This method can be used to pin this participant's camera and/or screen-share stream.
Link copied to clipboard
fun remove()
This method can be used to remove a remote participant from the meeting.
Link copied to clipboard
This method can be used to remove all registered ParticipantEventListeners from this participant.
Link copied to clipboard
This method can be used to unregister a previously added ParticipantEventListener.
Link copied to clipboard
fun setViewPort(width: Int, height: Int)
This method can be used to set the viewport dimensions for adaptive video quality.
Link copied to clipboard
@Async
fun unpin(type: String)
This method can be used to unpin this participant's camera and/or screen-share stream.