Skip to main content

parlot-instrumentation-livekit

MIT OpenTelemetry instrumentation for LiveKit Agents — the primary path into Parlot, the observability platform for production voice AI.

Know if your voice agent is actually working: conversational turns (not flat traces), multi-agent handoff graph, STT / LLM / TTS waterfall, optional call recording, and goal completion with an evidence trail to the proving turns and audio.

Works with LiveKit Cloud, fully self-hosted media, and LiveKit on Telnyx.

pip install parlot-instrumentation-livekit
# or: uv add parlot-instrumentation-livekit
# or: pip install "parlot[livekit]"
from parlot.instrumentation.livekit import configure

configure()

Docs: LiveKit guide · Concepts · Quick Start · parlot.ai

Integration checklist

Two steps are required for full Parlot behavior. All SDK examples follow this pattern.

1. configure() at import (required)

Call before constructing AgentSession — patches AgentSession.__init__, sets up OTLP export to PARLOT_ENDPOINT, and installs turn/handoff/close event hooks.

from parlot.instrumentation.livekit import configure

configure()

Optional: agent_id= for canonical deployment identity and version= for deployment version. Full resolution order is in the SDK README.

What to expect for version

configure(version=...) resolves once at startup (first non-empty wins): version= kwarg → __main__.__version__ / VERSION → PARLOT_AGENT_VERSION → local git short SHA (only when cwd has a .git directory).

If none resolve, gen_ai.agent.version is omitted. The platform Versions tab then stays empty (it filters agent_version != '').

LiveKit job processes: with python agent.py dev (or spawned job_proc workers), __main__ is LiveKit’s IPC entrypoint, not your agent file. A module-level __version__ on agent.py often does not resolve. The parent dev watcher also skips configure() via _is_livekit_dev_watch_parent, so instrumentation runs in the child where __main__ is not your entrypoint. Example dirs like examples/livekit/restaurant-agent usually have no .git, so the git SHA fallback also fails.

Reliable patterns for LiveKit:

configure(agent_id="restaurant-agent", version="0.1.0")

or set PARLOT_AGENT_VERSION=0.1.0 at deploy/runtime.

2. await ctx.connect() before session.start() (required)

Call explicitly in your entrypoint. Parlot patches JobContext.connect to:

  • Refresh platform.ref.room_sid and room metadata on the live session span (paste-search and platform UI linking).
  • Start Room Composite Egress to Cloudflare R2 when recording is enabled.
async def entrypoint(ctx: JobContext):
    await ctx.connect()

    session = AgentSession(...)
    await session.start(agent=..., room=ctx.room)

Without ctx.connect() you may still see basic telemetry — turns, handoffs, session close — if you pass room=ctx.room to session.start(). You will not get:

  • Room audio recording (egress to R2)
  • A reliable room_sid on the session span for paste-search and UI linking

Always call ctx.connect() in production agents and in all Parlot examples.

Environment

Set PARLOT_ENDPOINT and PARLOT_API_KEY. The API key is org-scoped — mint it in Parlot Settings → API Keys (shown once on create). Recording needs Settings → Recording (or configure(record=…) / job metadata) plus agent LIVEKIT_* credentials. Recordings upload to R2 and confirm via lazy R2 reconcile when the session is opened.

Recording policy (precedence: job metadata → configure(record=…) → Settings → Recording via bootstrap):

  • UI: Parlot → Settings → Recording (per-agent toggles + globs for unseen agents)
  • Code: configure(record=True), configure(record=False), or configure(record=["my-agent*"])
  • Dispatch: job metadata { "record": true|false }

Session application logs (Python logging, default on) use the same control path via Settings → Logs / configure(capture_logs=…) / job capture_logs. Not print(). Treat content like stdout for PII.

Generative AI content capture (message bodies / tool payloads; default on) is documented in Concepts. Override with configure(capture_genai_content=True|False).

Optional: PARLOT_DIAGNOSTICS=off to disable SDK self-diagnostics (export/handler failures reported to Parlot). Default is on; metadata only, no conversation content. Under sustained outage the buffer drops and circuit-breaks — it does not retry-storm the collector.

Examples

Development

uv sync --group dev
uv run pytest -q

Metadata

Release files for parlot-instrumentation-livekit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parlot-instrumentation-livekit 0.1.1
File Size Uploaded Provenance
parlot_instrumentation_livekit-0.1.1.tar.gz 48.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for parlot-instrumentation-livekit 0.1.1
File Interpreter ABI Platform
parlot_instrumentation_livekit-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 110.1 kB

Release files / parlot_instrumentation_livekit-0.1.1.tar.gz

Download URL parlot_instrumentation_livekit-0.1.1.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
88c9481e94d305262697055d09c64d4fb357b77edec2bcff376d5f2c4dfb3bcd
BLAKE2b-256 checksum
How to use checksums
90421a14673c41986ee870caab586e6ee5a1fce1788c1ab707e0af89d8477e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / parlot_instrumentation_livekit-0.1.1-py3-none-any.whl

Download URL parlot_instrumentation_livekit-0.1.1-py3-none-any.whl
Size 61.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f58fc5156925f808137859350e001e46475d99a791fb6c3d2b7f7aca71e01e6c
BLAKE2b-256 checksum
How to use checksums
60fcc6959a59afb4f030c7ada78f04cb923d49d0a8fe655fba2927617d517beb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Security for parlot-instrumentation-livekit 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for parlot_instrumentation_livekit-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page