AI Gateway
Route your LLM calls through the AI Gateway with a single base URL change. Zero vendor lock-in: always run on the best model at the lowest cost for your use case.
Observability
Instrument your code with OpenTelemetry to capture traces, logs, and metrics for every LLM call, agent step, and tool use.
AI Gateway
Overview
LiveKit Agents is a framework for building real-time voice and multimodal AI agents that communicate over WebRTC. By connecting LiveKit Agents to Orq.ai’s AI Gateway, you get production-ready voice AI with enterprise-grade LLM access without vendor lock-in.Key Benefits
Orq.ai’s AI Gateway enhances your LiveKit Agents with:Complete Observability
Track every LLM call, tool use, and agent interaction with detailed traces
Built-in Reliability
Automatic fallbacks, retries, and load balancing for production resilience
Cost Optimization
Real-time cost tracking and spend management across all your AI operations
Multi-Provider Access
Access 300+ LLMs and 20+ providers through a single, unified integration
Prerequisites
Before integrating LiveKit Agents with Orq.ai, ensure you have:- An Orq.ai account and API Key
- Python 3.9 or higher
- A LiveKit account with URL, API key, and API secret
To setup your API key, see API keys & Endpoints.
Installation
Install LiveKit Agents with the OpenAI plugin:Configuration
Configure LiveKit Agents to use Orq.ai’s AI Gateway via the OpenAI plugin’sbase_url parameter:
Python
base_url: https://api.orq.ai/v3/router
Environment Variables
Set up your LiveKit and Orq.ai credentials:Basic Voice Agent
Here’s a complete example of a voice agent using Orq.ai’s AI Gateway:Python
Agent with Function Tools
Add tools to your voice agent for dynamic responses:Python
Observability
Installation
LiveKit Agents has built-in OTEL support via
livekit.agents.telemetry. No additional instrumentation package is required.Configuring Orq.ai Observability
Useset_tracer_provider from livekit.agents.telemetry to register the exporter. Call it before your agent entrypoint starts:
LiveKit uses
livekit.agents.telemetry.set_tracer_provider, not the standard opentelemetry.trace.set_tracer_provider. BatchSpanProcessor is preferred over SimpleSpanProcessor for production voice workloads.Basic Example
Evaluations & Experiments
Once your agents are running, use Evaluatorq to score outputs across a dataset and Experiments to compare configurations side-by-side.Run Evaluations with Evaluatorq
Run parallel evaluations across your agents and compare results.
Run Experiments via the API
Compare agent configurations and view results in the AI Studio.