> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# LiveWire

> LiveKit-compatible API layer that maps to SignalWire infrastructure.

[agent]: /docs/server-sdks/reference/typescript/agents/livewire/agent

[agent-session]: /docs/server-sdks/reference/typescript/agents/livewire/agent-session

[run-context]: /docs/server-sdks/reference/typescript/agents/livewire/run-context

[function-tool]: /docs/server-sdks/reference/typescript/agents/livewire/function-tool

[run-app]: /docs/server-sdks/reference/typescript/agents/livewire/run-app

[job-context]: /docs/server-sdks/reference/typescript/agents/livewire/job-context

[signals]: /docs/server-sdks/reference/typescript/agents/livewire/signals

[plugins]: /docs/server-sdks/reference/typescript/agents/livewire/plugins

LiveWire is a compatibility layer that lets developers familiar with
[livekit-agents](https://docs.livekit.io/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.

```typescript {5}
// 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

```typescript {26}
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:

| Alias       | Contents                                      | Mirrors                    |
| ----------- | --------------------------------------------- | -------------------------- |
| `voice`     | `Agent`, `AgentSession`                       | `livekit.agents.voice`     |
| `llm`       | `tool`, `handoff`, `ToolError`, `ChatContext` | `livekit.agents.llm`       |
| `cli`       | `runApp`                                      | `livekit.agents.cli`       |
| `inference` | `STT`, `LLM`, `TTS`                           | `livekit.agents.inference` |

```typescript {3-5}
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**

#### [Agent](/docs/server-sdks/reference/typescript/agents/livewire/agent)

LiveKit-compatible agent class. Holds instructions, tools, and user data.

#### [AgentSession](/docs/server-sdks/reference/typescript/agents/livewire/agent-session)

Session orchestrator that binds an Agent to the SignalWire platform.

#### [RunContext](/docs/server-sdks/reference/typescript/agents/livewire/run-context)

Context object available inside tool handler functions.

#### [tool / FunctionTool](/docs/server-sdks/reference/typescript/agents/livewire/function-tool)

Factory function for creating agent tools with typed parameters.

#### [runApp](/docs/server-sdks/reference/typescript/agents/livewire/run-app)

Main entry point that prints the banner, runs setup, and starts the agent.

#### [Infrastructure](/docs/server-sdks/reference/typescript/agents/livewire/job-context)

JobContext, JobProcess, and Room stubs for connection lifecycle.

#### [Signals](/docs/server-sdks/reference/typescript/agents/livewire/signals)

StopResponse, ToolError, AgentHandoff, and ChatContext.

#### [Plugins](/docs/server-sdks/reference/typescript/agents/livewire/plugins)

No-op plugin stubs: DeepgramSTT, OpenAILLM, CartesiaTTS, ElevenLabsTTS, SileroVAD, and inference classes.