Guide
When humans and copilots share a room, debugging and handoffs are easier if tool_call, tool_result, and user messages share one ordered stream, not a side channel.
In the operator console, open a room with an agent configured: mention the agent, watch tool events appear beside human messages, then inspect runs from the agents page. That is the workflow product teams describe when they want copilots inside SaaS, not a separate debug UI.
const { messages, invokeAgent, agentTyping } = useChat({
roomId,
client,
agentId: "agt_…",
});
// messages includes user posts and agent/tool events for your UI to renderFluxyChat packages the same stack: RoomDurableObject, D1 history, multi-tenant JWT, reconnect-aware SDK, and operator console. MIT self-host or hosted beta.
Topics: agent tool calls websocket · copilot realtime chat · ai agent observability · shared workspace chat
Canonical path: /guides/agent-events-same-websocket-stream