Skip to main content

Vent helper for forwarding LiveKit Agents SDK observability

Project description

vent-livekit

Thin helper for forwarding LiveKit Agents SDK observability into Vent.

Install

pip install vent-livekit

Usage

instrument_livekit_agent() subscribes to LiveKit AgentSession events and publishes them on vent:* DataChannel topics that the Vent LiveKit adapter already understands.

from vent_livekit import instrument_livekit_agent

vent = instrument_livekit_agent(ctx=ctx, session=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.publish_call_metadata({"provider_call_id": "pstn-call-123"})
await vent.publish_debug_url("insight", "https://...")
await vent.publish_warning("rate limited", {"retry_after_ms": 500})
await vent.publish_session_usage({"llm_tokens": 1200})

You can also pass session_metadata and debug_urls to instrument_livekit_agent to publish them on startup:

vent = instrument_livekit_agent(
    ctx=ctx,
    session=session,
    session_metadata={"provider_call_id": "pstn-call-123"},
    debug_urls={"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 Node.js equivalent, use @vent-hq/livekit (npm install @vent-hq/livekit).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vent_livekit-0.4.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vent_livekit-0.4.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file vent_livekit-0.4.0.tar.gz.

File metadata

  • Download URL: vent_livekit-0.4.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for vent_livekit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4889e2eb9ad8e5078f82cf1df065d2bbac7a02fc4add22c8b834ddfe7968276b
MD5 58e6a4ab9e1c6f95988b46b259bae3b4
BLAKE2b-256 757b6bece76a44488d7e55534a87bfd5bcbf616713f3b07ad266d14beec1970e

See more details on using hashes here.

File details

Details for the file vent_livekit-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: vent_livekit-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for vent_livekit-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24c0680d0a70f1708fb33e02c20ffb68c4afdbac2dac030e6bfe23f3899e2627
MD5 7f41f1180ee95c718204158aba41bc77
BLAKE2b-256 79a4f8c6fb043f01459c83decb11254f245ecb7a625b7d905e828887b810b845

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page