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
  • files
AgentsSkills

play_background_file

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

spider

Next
Built with

Control background file playback during calls. A single tool handles both starting and stopping playback via an action parameter with dynamic enum values generated from the configured file list. Supports audio and video files.

Tools: play_background_file (default, customizable via tool_name)

Requirements: None (files must be accessible via URL)

Multi-instance: Yes (use different tool_name per instance)

files
list[dict]Required

Array of file configurations to make available for playback. Each object must include:

  • key (str, required) — Unique identifier for the file (alphanumeric, underscores, hyphens).
  • description (str, required) — Human-readable description of the file.
  • url (str, required) — URL of the audio/video file to play.
  • wait (bool, optional, default False) — Whether to wait for the file to finish playing.
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("play_background_file", {
8 "tool_name": "play_testimonial",
9 "files": [
10 {
11 "key": "massey",
12 "description": "Customer success story from Massey Energy",
13 "url": "https://example.com/massey.mp4",
14 "wait": True
15 }
16 ]
17 })
18
19agent = MyAgent()
20agent.serve()