isConnected property

bool get isConnected

Indicates whether the agent is connected and ready for conversation.

Implementation

bool get isConnected {
  if (_state != _AgentLifecycle.connected) {
    return false;
  }
  return switch (_agentState) {
    AgentState.listening || AgentState.thinking || AgentState.speaking => true,
    _ => false,
  };
}