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
      • BedrockAgent
      • CLI Tools
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions
      • LiveWire
      • MCP Gateway
      • PomBuilder
      • Prefabs
      • Search
      • SkillBase
      • Skills
        • api_ninjas_trivia
        • claude_skills
        • Custom Skills
        • datasphere
        • datasphere_serverless
        • datetime
        • google_maps
        • info_gatherer
        • joke
        • math
        • mcp_gateway
        • native_vector_search
        • play_background_file
        • spider
        • swml_transfer
        • weather_api
        • web_search
        • wikipedia_search
      • SWAIGFunction
      • SWMLBuilder
      • SWMLService
      • WebService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • Chat
      • Compat
      • Datasphere
      • Fabric
      • Imported Numbers
      • Logs
      • Lookup
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSub
      • Queues
      • Recordings
      • Registry
      • RestClient
      • Short Codes
      • SignalWireRestError
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • transfers
  • description
  • parameter_name
  • parameter_description
  • default_message
  • default_post_process
  • required_fields
AgentsSkills

swml_transfer

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

weather_api

Next
Built with

Transfer calls between agents using SWML or direct connect, with regex pattern matching to route to different destinations from a single tool. Each transfer destination can use either a SWML endpoint URL or a phone number / SIP address.

Tools: transfer_call (default, customizable via tool_name)

Requirements: None

Multi-instance: Yes

transfers
dictRequired

Transfer configurations mapping regex patterns to destinations. Each key is a regex pattern (e.g., /sales/i) and each value is an object with:

  • url (str) — SWML endpoint URL for agent transfer. Mutually exclusive with address.
  • address (str) — Phone number or SIP address for direct connect. Mutually exclusive with url.
  • message (str, default "Transferring you now...") — Message to say before transferring.
  • return_message (str, default "The transfer is complete. How else can I help you?") — Message when returning from transfer.
  • post_process (bool, default True) — Whether to process message with AI before saying.
  • final (bool, default True) — Whether transfer is permanent (True) or temporary (False).
  • from_addr (str, optional) — Caller ID for connect action.
description
strDefaults to Transfer call based on pattern matching

Description for the transfer tool.

parameter_name
strDefaults to transfer_type

Name of the parameter that accepts the transfer type.

parameter_description
strDefaults to The type of transfer to perform

Description for the transfer type parameter.

default_message
strDefaults to Please specify a valid transfer type.

Message when no pattern matches.

default_post_process
boolDefaults to False

Whether to process the default (no-match) message with AI.

required_fields
dictDefaults to {}

Additional required fields to collect before transfer. Keys are field names, values are descriptions. Collected values are saved under call_data in global data.

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 self.add_skill("swml_transfer", {
8 "tool_name": "route_call",
9 "transfers": {
10 "/sales/i": {
11 "url": "https://your-server.com/sales-agent",
12 "message": "Let me connect you with our sales team."
13 },
14 "/support/i": {
15 "address": "+15551234567",
16 "final": False
17 }
18 }
19 })
20
21agent = MyAgent()
22agent.serve()