Skip to main content

OpenTelemetry observability for LiveKit Agents — ships transcripts, tool calls, prompts, and spans to a self-hosted ingest service in three lines.

Project description

voxeye

OpenTelemetry observability for LiveKit Agents. One pip install, three lines of code, and every transcript, tool call, system prompt, span, and per-component model identifier flows to a self-hosted retina ingest service.

No event listeners, no content buffering, no proprietary SDK lock-in — just OTel done right for voice agents.

Install

pip install voxeye

Use

from voxeye import Observability
from livekit.agents import AgentSession, JobContext

obs = Observability(api_key="sk_...", endpoint="https://your-retina-host")  # module-level, pure

async def entrypoint(ctx: JobContext):
    session = AgentSession(stt=..., llm=..., tts=...)
    obs.attach(session, ctx)                              # sync, fail-open
    await session.start(agent=MyAgent(), room=ctx.room)   # your existing line

That's it. attach():

  1. Resets any prior TracerProvider — LiveKit worker subprocesses are pooled and reused, so a provider from a previous job can leak into the next one.
  2. Resolves call_id = ctx.job.id (room.sid isn't available until ctx.connect()).
  3. Resolves agent_id via agent_id= override → ctx.job.agent_name"unknown" (the real label is reconciled server-side from the agent_session span).
  4. Introspects session.stt/.llm/.tts/.vad for {component}.provider / .model, set as resource attributes on every span — closing gaps LiveKit's plugin instrumentation leaves.
  5. Installs an OTLP exporter (gzip, bearer auth) and an async shutdown flush.
  6. Fires a lifecycle ping to /v1/calls for instant call existence + crash detection.

Every step is wrapped fail-open: attach() never raises into your entrypoint.

Redaction (opt out of exporting sensitive data)

By default everything is exported. Pass a Redaction to stop specific data from ever leaving the process — it's filtered client-side (sensitive resource attrs aren't set, and span attributes are dropped at the export boundary; live spans are never mutated):

from voxeye import Observability, Redaction

obs = Observability(
    api_key="sk_...",
    redact=Redaction(
        prompts=True,       # drop the system prompt / instructions
        model_names=True,   # drop stt/llm/tts/vad provider+model (resource AND gen_ai.* attrs)
        transcripts=True,   # drop user transcripts + agent response text
        tool_io=True,       # drop function-tool arguments + outputs
        attributes=("my.custom.attr",),  # escape hatch: extra exact keys to drop
    ),
)

Spans, durations, token counts, span tree, and tool names still flow — only the fields you flag are withheld. Each flag defaults to False (export).

Notes

  • endpoint defaults to http://localhost:8000 (local retina). Point it at your host in prod.
  • Call attach() once per entrypoint. Calling it twice replaces the provider mid-call.
  • Requires livekit-agents >= 1.0.

Develop

uv sync --extra dev
uv run pytest
uv run ruff check src tests && uv run mypy src

Build & publish

uv build                       # → dist/voxeye-<version>-py3-none-any.whl + .tar.gz
uvx twine check dist/*         # validate metadata + README rendering
pip install dist/voxeye-*.whl  # try it in a clean env

Publishing to PyPI is automated via GitHub Actions trusted publishing (OIDC, no API tokens) in .github/workflows/publish.yml — it runs on a published GitHub Release. Before the first release: reserve the voxeye name on PyPI and add this repo as a trusted publisher. Until then the workflow is inert. To publish manually instead: uvx twine upload dist/*.

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

voxeye-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

voxeye-0.1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file voxeye-0.1.0.tar.gz.

File metadata

  • Download URL: voxeye-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voxeye-0.1.0.tar.gz
Algorithm Hash digest
SHA256 151ae142a46ce9cc9814fcf47594920511b6851f315235f3233ce6b37fa58474
MD5 7c1c1fb7d7c9ee07656843aa9382d569
BLAKE2b-256 d078355bbb44948cdbff86e49b8d02bcd3eb0ad35ad14a1adc4a4937b77f4faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for voxeye-0.1.0.tar.gz:

Publisher: publish.yml on nilayguptaforwork-ctrl/voxeye

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voxeye-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: voxeye-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voxeye-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48d6d4c042516eeaadbaf475646c274eb2d28ce0dfc00a59d7249f7c992ad34c
MD5 ee1237389f758b61112468f003534788
BLAKE2b-256 a24cde3713d301fa64b8e5d18e9af65cd3fdb693434795813c600fcdca58473a

See more details on using hashes here.

Provenance

The following attestation bundles were made for voxeye-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nilayguptaforwork-ctrl/voxeye

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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