-
public abstract class AgentA representation of an LiveKit agent participant.
-
-
Field Summary
Fields Modifier and Type Field Description private final RemoteParticipantagentParticipantprivate final AgentAttributesattributesprivate final List<String>failureReasonsprivate final AgentStateagentStateprivate final TrackReferenceaudioTrackprivate final TrackReferencevideoTrackprivate final BooleanisConnectedprivate final BooleancanListenprivate final BooleanisFinishedprivate final BooleanisPending
-
Constructor Summary
Constructors Constructor Description Agent()
-
Method Summary
Modifier and Type Method Description abstract RemoteParticipantgetAgentParticipant()The RemoteParticipant for this agent. abstract AgentAttributesgetAttributes()The agent attributes for the agent. abstract List<String>getFailureReasons()A list of failure reasons that have occurred for this agent. abstract AgentStategetAgentState()The state of the agent. abstract TrackReferencegetAudioTrack()The agent's audio track if available. abstract TrackReferencegetVideoTrack()The agent's video track if available. abstract BooleangetIsConnected()Whether the agent is connected. abstract BooleangetCanListen()Whether the agent is capable of accepting input (including while the agent is thinking or speaking). abstract BooleangetIsFinished()Indicates when the client has diconnected from the agent. abstract BooleangetIsPending()Indicates when the agent currently connecting or setting itself up. abstract UnitwaitUntilAvailable()A helper function that suspends until the agent is available. abstract UnitwaitUntilCamera()A helper function that suspends until the agent's video track is available. abstract UnitwaitUntilMicrophone()A helper function that suspends until the agent's audio track is available. -
-
Method Detail
-
getAgentParticipant
abstract RemoteParticipant getAgentParticipant()
The RemoteParticipant for this agent.
-
getAttributes
abstract AgentAttributes getAttributes()
The agent attributes for the agent.
-
getFailureReasons
abstract List<String> getFailureReasons()
A list of failure reasons that have occurred for this agent.
-
getAgentState
abstract AgentState getAgentState()
The state of the agent.
-
getAudioTrack
abstract TrackReference getAudioTrack()
The agent's audio track if available.
-
getVideoTrack
abstract TrackReference getVideoTrack()
The agent's video track if available.
-
getIsConnected
abstract Boolean getIsConnected()
Whether the agent is connected.
-
getCanListen
abstract Boolean getCanListen()
Whether the agent is capable of accepting input (including while the agent is thinking or speaking).
Note that this may not the agent is actually connected - the audio pre-connect buffer could be active and recording user input before the agent actually connects.
-
getIsFinished
abstract Boolean getIsFinished()
Indicates when the client has diconnected from the agent.
-
getIsPending
abstract Boolean getIsPending()
Indicates when the agent currently connecting or setting itself up.
-
waitUntilAvailable
abstract Unit waitUntilAvailable()
A helper function that suspends until the agent is available.
-
waitUntilCamera
abstract Unit waitUntilCamera()
A helper function that suspends until the agent's video track is available.
-
waitUntilMicrophone
abstract Unit waitUntilMicrophone()
A helper function that suspends until the agent's audio track is available.
-
-
-
-