big-controller-60015
11/18/2025, 1:19 PMtall-airline-16756
11/18/2025, 1:19 PMtall-airline-16756
11/18/2025, 1:20 PMagent.agentState property and see if it equals .speaking.
• React/JavaScript SDK: You can use the useAgent hook and check if agent.state === 'speaking'.
• Python SDK: Just access session.agent_state and compare it to 'speaking'.
• Participant Attributes: Take a look at the agent participant's attribute lk.agent.state to see if it holds the value 'speaking'.
If you'd like, I’m here to provide more details or specific examples for any SDK you’re working with—just let me know!
Sources: packages/react/src/hooks/useAgent.ts | tests/test_agent_session.py | Events and error handling | LiveKit docs | Web and mobile frontends | LiveKit docs | Sources/LiveKit/Agent/Agent.swift