Agent

abstract class Agent

A representation of an LiveKit agent participant.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val agentParticipant: RemoteParticipant?

The RemoteParticipant for this agent.

Link copied to clipboard
abstract val agentState: AgentState

The state of the agent.

Link copied to clipboard
abstract val attributes: AgentAttributes?

The agent attributes for the agent.

Link copied to clipboard
abstract val audioTrack: TrackReference?

The agent's audio track if available.

Link copied to clipboard
abstract val canListen: Boolean

Whether the agent is capable of accepting input (including while the agent is thinking or speaking).

Link copied to clipboard
abstract val failureReasons: List<String>

A list of failure reasons that have occurred for this agent.

Link copied to clipboard
abstract val isConnected: Boolean

Whether the agent is connected.

Link copied to clipboard
abstract val isFinished: Boolean

Indicates when the client has diconnected from the agent.

Link copied to clipboard
abstract val isPending: Boolean

Indicates when the agent currently connecting or setting itself up.

Link copied to clipboard
abstract val videoTrack: TrackReference?

The agent's video track if available.

Functions

Link copied to clipboard
abstract suspend fun waitUntilAvailable()

A helper function that suspends until the agent is available.

Link copied to clipboard
abstract suspend fun waitUntilCamera()

A helper function that suspends until the agent's video track is available.

Link copied to clipboard
abstract suspend fun waitUntilMicrophone()

A helper function that suspends until the agent's audio track is available.