> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # 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'; ``` > **Note** > > 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. > LiveKit-compatible agents powered by SignalWire infrastructure ## Docs - [Agent](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent.md): LiveKit-compatible agent class that holds instructions, tools, and user data. - [AgentSession](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session.md): Session orchestrator that binds an Agent to the SignalWire platform. - [generateReply](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session/generate-reply.md): Trigger the agent to generate a reply. - [interrupt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session/interrupt.md): No-op. SignalWire handles barge-in automatically via its control plane. - [say](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session/say.md): Queue text to be spoken by the agent. - [start](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session/start.md): Bind an Agent and prepare the underlying SignalWire AgentBase. - [updateAgent](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/agent-session/update-agent.md): Swap in a new Agent mid-session. - [Infrastructure](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/job-context.md): JobContext, JobProcess, and Room stubs for connection lifecycle. - [Plugins](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/plugins.md): No-op plugin stubs and inference classes for LiveKit API compatibility. - [runApp](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/run-app.md): Main entry point that starts a LiveWire agent. - [RunContext](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/run-context.md): Context object available inside tool handler functions. - [Signals](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/signals.md): Error and signal classes for controlling tool behavior and multi-agent handoffs. - [tool / FunctionTool](https://signalwire.com/docs/server-sdks/reference/typescript/agents/livewire/function-tool.md): Factory function and interface for creating agent tools.