i've stopped seeing the "Monitor your agent at" li...
# ask-ai
c
i've stopped seeing the "Monitor your agent at" link. how do i get it back?
t
Thanks for reaching out, Nick. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you help me understand a bit more about what you need with the missing 'Monitor your agent at' link? Are you trying to bring back a part of the interface, fix connection problems, or keep an eye on agent statuses? The more details you can share, the better I can help you out!
c
keep an eye on the agent
t
To keep an eye on your agent's connection and state, here are some friendly tips you can try out: • Monitor Connection State: Check out the
room.connectionState
property to see if your agent is Connected, Connecting, or Disconnected. It’s a great way to stay in the loop! • Track Agent Presence and State: Watch for
ParticipantConnected
events to know when an agent joins the room. You can also peek at participant attributes like initializing, listening, thinking, or speaking to get a feel for what they’re up to. • Use Built-in Components: Try using hooks like
useVoiceAssistant
to easily access the agent’s current state and tracks — it makes things super convenient! • Implement UI Indicators: Adding some visual cues for connection states or notifications when things change can really help keep everyone informed. Here’s a simple example to show you how you might monitor and display the agent’s connection state:
Copy code
import { useVoiceAssistant } from "@livekit/components-react";
import { useState, useEffect } from "react";

function AgentStatusMonitor() {
  const { state } = useVoiceAssistant();
  const [connectionState, setConnectionState] = useState(ConnectionState.Disconnected);

  useEffect(() => {
    const handleConnectionStateChanged = (newState) => {
      setConnectionState(newState);
    };

    room.on("connectionStateChanged", handleConnectionStateChanged);
    return () => {
      room.off("connectionStateChanged", handleConnectionStateChanged);
    };
  }, []);

  return (
    
      
      
        Agent State: {state || "Not connected"}
      
    
  );
}

export default AgentStatusMonitor;
If you have any questions or want a hand with specific details, just let me know — I’m here to help! Sources: Web and mobile frontends | LiveKit Docs | AI voice agents | LiveKit Docs | packages/react/src/hooks/useVoiceAssistant.ts | README.md
c
when i used to start the agent a link was displayed to monitor that gent. i dont see that anymore.
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
Reviewing some of the AI responses. I think you are talking about this line that was removed as part of a recent update to support prometheus.
Copy code
see tracing information at <http://localhost:8081/debug>
Prometheus support can be enabled by adding
prometheus_port
to your
worker_options
. If that's not what you were talking about, let me know.
c
yup, that's it...thank you!