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)
2import { Agent, AgentSession } from '@livekit/agents';
3
4// After (SignalWire LiveWire)
5import { Agent, AgentSession } from '@signalwire/sdk/livewire';

SignalWire’s control plane handles STT, TTS, VAD, and turn detection automatically. Pipeline plugin parameters (stt, tts, vad, turnDetection) 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

1import {
2 Agent, AgentSession, JobContext,
3 tool, defineAgent, runApp,
4} from '@signalwire/sdk/livewire';
5
6const lookupOrder = tool({
7 description: 'Look up the status of a customer order.',
8 parameters: { orderId: { type: 'string' } },
9 execute: (params) => {
10 return `Order ${params.orderId} shipped yesterday.`;
11 },
12});
13
14const agentDef = defineAgent({
15 entry: async (ctx: JobContext) => {
16 const agent = new Agent({
17 instructions: 'You are a helpful customer support agent.',
18 tools: { lookupOrder },
19 });
20 const session = new AgentSession();
21 await session.start({ agent });
22 session.generateReply({ instructions: 'Greet the user.' });
23 },
24});
25
26runApp(agentDef);

Namespace Aliases

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

AliasContentsMirrors
voiceAgent, AgentSessionlivekit.agents.voice
llmtool, handoff, ToolError, ChatContextlivekit.agents.llm
clirunApplivekit.agents.cli
inferenceSTT, LLM, TTSlivekit.agents.inference
1import { voice, inference, cli } from '@signalwire/sdk/livewire';
2
3const agent = new voice.Agent({ instructions: 'Hello' });
4const session = new voice.AgentSession({
5 llm: new inference.LLM('gpt-4o'),
6});

Learn More