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.

// Before (livekit-agents)
import { Agent, AgentSession } from '@livekit/agents';
// After (SignalWire LiveWire)
import { 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

import {
Agent, AgentSession, JobContext,
tool, defineAgent, runApp,
} from '@signalwire/sdk/livewire';
const lookupOrder = tool({
description: 'Look up the status of a customer order.',
parameters: { orderId: { type: 'string' } },
execute: (params) => {
return `Order ${params.orderId} shipped yesterday.`;
},
});
const agentDef = defineAgent({
entry: async (ctx: JobContext) => {
const agent = new Agent({
instructions: 'You are a helpful customer support agent.',
tools: { lookupOrder },
});
const session = new AgentSession();
await session.start({ agent });
session.generateReply({ instructions: 'Greet the user.' });
},
});
runApp(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
import { voice, inference, cli } from '@signalwire/sdk/livewire';
const agent = new voice.Agent({ instructions: 'Hello' });
const session = new voice.AgentSession({
llm: new inference.LLM('gpt-4o'),
});

Learn More