For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
        • Agent
        • AgentSession
          • generateReply
          • interrupt
          • say
          • start
          • updateAgent
        • Infrastructure
        • Plugins
        • runApp
        • RunContext
        • Signals
        • tool / FunctionTool
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Signature
  • Parameters
  • Returns
  • Example
AgentsLiveWireAgentSession

updateAgent

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

Infrastructure

Next
Built with

Swap in a new Agent mid-session. The new agent’s instructions replace the previous agent’s prompt on the underlying SignalWire AgentBase.

Signature

1updateAgent(agent: Agent<UserData>): void

Parameters

agent
AgentRequired

The new Agent to bind to this session.

Returns

void

Example

1import { Agent } from '@signalwire/sdk/livewire';
2
3const billingAgent = new Agent({
4 instructions: 'You are now a billing specialist. Help the user with invoices and payments.',
5});
6
7session.updateAgent(billingAgent);