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
ReferenceGuides
ReferenceGuides
  • Core
    • Introduction to SWML
    • Expressions
    • Template functions
    • Variables
    • Errors
  • Calling
    • Overview
    • ai
    • ai_sidecar
      • params
      • prompt
      • SWAIG
    • amazon_bedrock
    • answer
    • cond
    • connect
    • denoise
    • detect_machine
    • enter_queue
    • execute
    • goto
    • hangup
    • join_conference
    • join_room
    • label
    • live_transcribe
    • live_translate
    • pay
    • play
    • prompt
    • receive_fax
    • record
    • record_call
    • request
    • return
    • send_digits
    • send_fax
    • send_sms
    • set
    • sip_refer
    • sleep
    • stop_denoise
    • stop_record_call
    • stop_tap
    • switch
    • tap
    • transcribe
    • transcribe_stop
    • transfer
    • unset
    • user_event
  • Messaging
    • Overview
    • execute
    • goto
    • label
    • receive
    • reply
    • request
    • return
    • switch
    • transfer
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Prompt forms
  • Properties
  • Variable expansion
  • Examples
Callingai_sidecar

prompt

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

SWAIG

Next
Built with

The operator prompt instructs the sidecar how to coach the agent — what to watch for, when to speak up, and when to stay silent. SignalWire automatically adds built-in instructions for the sidecar’s role, so your prompt only needs to describe the coaching behavior. It is recommended to write prompts using markdown formatting, as models better understand structured content.

prompt is optional. When omitted, the sidecar falls back to a minimal default prompt, so setting one is strongly recommended.

The sidecar prompt supports the text, POM, and file forms below. The model’s settings are configured separately — see the model field and params.

Prompt forms

There are three ways to define the prompt content:

  • Text — A single string with the full prompt. Provide it as a bare string (prompt: "...") or as an object with a text field. Best for simple coaching instructions.
  • POM (Prompt Object Model) — A structured array of sections with titles, body text, and bullets. SignalWire renders the POM into a markdown document before sending it to the model. Best for prompts that benefit from clear organization.
  • File — A path to a server-side file whose contents become the prompt.

Properties

ai_sidecar.prompt
string | object

The operator prompt. Provide a plain string, or one of the objects below.

Text
POM
File
prompt.text
stringRequired

The full operator prompt as a single block of text. Equivalent to passing prompt as a bare string.

Variable expansion

The prompt supports variable expansion in any form. Reference values from global_data, from the persistent ai_agents_global_data, and from the following call variables:

${global_data.*}
string

Any value from the sidecar’s global_data, e.g. ${global_data.customer_id}.

${ai_agents_global_data.*}
string

Any value from ai_agents_global_data, which persists across sessions on the same call leg, e.g. ${ai_agents_global_data.deal.mrr}.

${caller_id_number}
string

The caller’s phone number.

${destination_number}
string

The destination phone number.

${customer_role}
string

Which leg is the customer — remote-caller or local-caller.

${local_date}
string

The current local date.

${local_time}
string

The current local time.

${local_tz}
string

The local timezone.

${session_uuid}
string

The unique identifier for the call session.

Examples

1ai_sidecar:
2 prompt: "You are a real-time sales copilot. After each customer turn, give the agent one concise piece of advice, or call sidecar_skip if no advice is needed."
3 lang: "en-US"