Signals
LiveWire provides error and signal classes that tool handlers can throw or return to control agent behavior.
StopResponse
Extends Error. When thrown inside a tool handler, signals that the tool should
not trigger another LLM reply. Use this when the tool’s side effect is the
final action and no further conversation is needed.
Constructor
message
Optional error message. Defaults to "StopResponse".
ToolError
Extends Error. Signals a tool execution failure. Throw this when a tool
encounters a problem that should be reported back to the LLM so it can
communicate the issue to the user or retry.
Constructor
message
Error message describing what went wrong. This is sent back to the LLM.
AgentHandoff
A signal class for handing off a conversation to a different agent in multi-agent
scenarios. Created via the handoff() helper function.
Properties
agent
The target Agent for the handoff.
returns
Optional return message for the handoff.
handoff()
Factory function that creates an AgentHandoff instance.
agent
The target agent to hand off to.
returns
Optional return value for the handoff.
ChatContext
A minimal empty class mirroring the LiveKit ChatContext. Exists for API
compatibility. On SignalWire, conversation history is managed by the platform.
ChatContext has no methods or properties in the LiveWire implementation. It is an
empty stub provided solely so that existing livekit-agents code that references
ChatContext compiles without errors.