Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
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 Router, you get production-ready voice AI with enterprise-grade LLM access without vendor lock-in.
Add tools to your voice agent for dynamic responses:
Python
Copy
import osfrom livekit.agents import Agent, AgentSession, WorkerOptions, cli, function_toolfrom livekit.plugins import openai@function_toolasync def get_weather(location: str) -> str: """Get the current weather for a location.""" return f"The weather in {location} is sunny and 72°F"@function_toolasync def get_time(timezone: str) -> str: """Get the current time in a timezone.""" return f"The current time in {timezone} is 14:30"class Assistant(Agent): def __init__(self): super().__init__( instructions="You are a helpful voice assistant with access to weather and time tools.", tools=[get_weather, get_time], )async def entrypoint(ctx): session = AgentSession( llm=openai.LLM( model="gpt-4o", base_url="https://api.orq.ai/v2/router", api_key=os.getenv("ORQ_API_KEY"), ), ) await session.start(ctx.room, agent=Assistant())if __name__ == "__main__": cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
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.