We ran into an issue after updating our agent to u...
# ask-ai
h
We ran into an issue after updating our agent to use @livekit/rtc-node 0.13.22 and @livekit/agents 1.0.31. Previously, the following server-side code was working as expected:
Copy code
const roomService = new RoomServiceClient(livekitUrl, livekitApiKey, livekitApiSecret);
const textId = randomUUID();
const message = {
  action: 'add_text',
  text_id: textId,
  text: 'Good job!',
};

await roomService.sendData(
  args.input.roomName,
  new TextEncoder().encode(JSON.stringify(message)),
  DataPacket_Kind.RELIABLE,
  { topic: 'server-commands' },
);
Since the upgrade, the agent no longer receives this data message, even though the code and topic have not changed. Has anyone seen a similar issue with these versions or is there a change in how agents consume
server-commands
data that we might be missing?
t
Thanks for reaching out, Gabriel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry this broke after the upgrade. I’ll help troubleshoot. A few quick clarifying questions to narrow this down: 1. On the agent side, how are you listening for data messages? (eg.
room.on("data_received", ...)
or another handler) 2. Do agent logs show it joining the room and subscribing to data? Any errors or warnings after the upgrade? 3. Can you confirm the agent’s participant identity/role didn’t change after upgrading? 4. When you call
sendData
, do you see any server-side success logs or errors? Any network traces showing the packet left the server? 5. Did you test sending data on other topics (or as
DataPacket_Kind.UNRELIABLE
) — does that reach the agent? What I’ll do once you send those: • Check whether the agent’s data handler is being triggered or if the packet is dropped. • Suggest targeted code checks or a minimal repro if needed. • If we identify it as a version-related behavior, I’ll outline a short workaround and next steps. Send the answers and any relevant logs/snippets and I’ll dig in. Sources: Server-side | livekit/livekit_composite | DeepWiki | An open source stack for real-time multimodal AI