@vent-hq/livekit
v0.4.0
Published
Vent helper for forwarding LiveKit Agents SDK observability
Maintainers
Readme
@vent-hq/livekit
Thin helper for forwarding LiveKit Agents SDK observability into Vent.
Install
npm install @vent-hq/livekitUsage
instrumentLiveKitAgent() subscribes to LiveKit AgentSession events and publishes them on vent:* DataChannel topics that the Vent LiveKit adapter already understands.
import { instrumentLiveKitAgent } from "@vent-hq/livekit";
const vent = instrumentLiveKitAgent({ ctx, session });
// On shutdown:
vent.dispose();You can pass room or participant directly instead of ctx.
Events forwarded
| LiveKit event | Vent topic |
| ------------------------ | ------------------------------- |
| metrics_collected | vent:metrics |
| function_tools_executed| vent:tool-calls (one message per call), vent:transfer (agent handoffs) |
| conversation_item_added| vent:conversation-item |
| user_input_transcribed | vent:user-input-transcribed |
| session_usage_updated | vent:session-usage |
| close | vent:session-report (auto), vent:warning (on error) |
Bridge methods
The returned bridge publishes data that the outside room observer cannot already see:
await vent.publishCallMetadata({ provider_call_id: "pstn-call-123" });
await vent.publishDebugUrl("insight", "https://...");
await vent.publishWarning("rate limited", { retry_after_ms: 500 });
await vent.publishSessionUsage({ llm_tokens: 1200 });You can also pass sessionMetadata and debugUrls to instrumentLiveKitAgent to publish them on startup:
const vent = instrumentLiveKitAgent({
ctx,
session,
sessionMetadata: { provider_call_id: "pstn-call-123" },
debugUrls: { insight: "https://..." },
});Notes
- Transcript, room/session identity, and agent-state timing come from native LiveKit signals, so this helper does not mirror them.
- For the Python equivalent, use
vent-livekit(pip install vent-livekit).
