Agents

LiveWire

LiveKit-compatible agents powered by SignalWire infrastructure

View as MarkdownOpen in Claude

LiveWire is a compatibility layer that lets developers familiar with livekit-agents use the same class and function names while running on SignalWire infrastructure. Change your import path and your existing code runs on SignalWire with no other modifications.

1# Before (livekit-agents)
2from livekit.agents import Agent, AgentSession, function_tool
3
4# After (SignalWire LiveWire)
5from signalwire.livewire import Agent, AgentSession, function_tool

SignalWire’s control plane handles STT, TTS, VAD, and turn detection automatically. Pipeline plugin parameters (stt, tts, vad, turn_detection) are accepted for API compatibility but are no-ops. LiveWire logs an informational message the first time each no-op parameter is used.

Quick Start

1from signalwire.livewire import (
2 Agent,
3 AgentSession,
4 AgentServer,
5 JobContext,
6 JobProcess,
7 function_tool,
8 run_app,
9)
10
11@function_tool
12def lookup_order(order_id: str) -> str:
13 """Look up the status of a customer order."""
14 return f"Order {order_id} shipped yesterday."
15
16server = AgentServer()
17
18@server.rtc_session()
19async def entrypoint(ctx: JobContext):
20 agent = Agent(
21 instructions="You are a helpful order-status assistant.",
22 tools=[lookup_order],
23 )
24 session = AgentSession()
25 await session.start(agent, room=ctx.room)
26
27run_app(server)

Namespace Aliases

LiveWire provides namespace objects that mirror common livekit-agents import paths:

AliasContentsMirrors
voiceAgent, AgentSessionlivekit.agents.voice
llm_nstool (alias for function_tool), ToolError, ChatContextlivekit.agents.llm
cli_nsrun_applivekit.agents.cli
inferenceSTT, LLM, TTSlivekit.agents.inference
1from signalwire.livewire import voice, llm_ns, inference
2
3agent = voice.Agent(instructions="Hello")
4session = voice.AgentSession(llm=inference.LLM(model="gpt-4o"))

Learn More