Agent
The Agent<UserData> class mirrors a LiveKit voice agent. It holds the system
prompt (instructions), a set of tools, and optional user data. When bound to an
AgentSession, the session translates this into a SignalWire
AgentBase under the hood.
Constructor
The constructor options are source-compatible with LiveKit’s Agent
constructor, including pipeline fields like stt, tts, vad,
turnDetection, and mcpServers. SignalWire handles speech, TTS, and VAD on
the control plane, so those fields are accepted but logged as a no-op the
first time they are supplied.
instructions
System prompt text. Mapped to the SignalWire prompt when the session starts.
tools
Array of FunctionTool objects. Stored internally as a
name-keyed record; each tool is registered as a SWAIG function on the
underlying agent.
userData
Arbitrary data attached to the agent. Accessible from tool handlers via
RunContext.userData.
llm
Accepted for LiveKit parity. Pipeline mapping hint — SignalWire selects the
model from the SWML ai.params.
allowInterruptions
Accepted for LiveKit parity. Forwarded to the SignalWire AI params when the session starts.
minEndpointingDelay
Accepted for LiveKit parity. Forwarded to the SignalWire AI params when the session starts.
maxEndpointingDelay
Accepted for LiveKit parity. Forwarded to the SignalWire AI params when the session starts.
stt / tts / vad / turnDetection / mcpServers
Accepted for LiveKit source compatibility. SignalWire handles these capabilities on the control plane; passing a value logs a one-time “no-op” advisory and does not affect behavior.
Properties
instructions
The system prompt text for the agent. Can be read or modified directly.
tools
Internal name-keyed map of registered tools.
userData
The user data attached to this agent.
session
The AgentSession bound to this agent, if any. Set when
session.start({ agent }) is called.