Competitor alerts

An AI listener rides along on a call already in progress, notices when a competitor is named, and posts that out over HTTP. It never speaks into the call. This is the ai_sidecar SWML verb.

Try it without a call

Feed a line of speech in and watch an alert come back:

curl -s -X POST https://sidecar-demo.signalwire.me/simulate \
  -H 'Content-Type: application/json' \
  -d '{"text":"we already run Acme Cloud for the desk","final":true}'

Then look at /alerts and /timeline. The timeline is the interesting one: it shows how many words of the sentence were still to come when the alert fired.

Routes

RouteWhat it does
GET /This page.
GET /healthLiveness, plus how many competitors are loaded.
GET /configThe ai_sidecar verb this service emits, as JSON.
GET /alertsCompetitor mentions recorded so far.
GET /timelineTranscript and alerts on one clock, as text.
POST /simulateFeed a line of speech in and watch it land.
GET /sidecar/The SWML document the platform fetches.basic auth
POST /sidecar/eventsLifecycle and transcription events from the sidecar.
POST /sidecar/swaigTool calls from the sidecar's own LLM.

Competitors being listened for

Passed to the verb as hints, because competitor names are exactly the words a general speech model tends to mangle.

The verb this service emits

{
  "prompt": "You are listening to a live sales call. You never speak. Whenever the customer names one of these competitors, call flag_competitor once with the name: Acme Cloud, Acme, Northwind, Contoso Voice, Globex. Do not call it for any other company.",
  "lang": "en-US",
  "direction": [
    "remote-caller",
    "local-caller"
  ],
  "customer_role": "remote-caller",
  "hints": [
    "Acme Cloud",
    "Acme",
    "Northwind",
    "Contoso Voice",
    "Globex"
  ],
  "url": "https://sidecar-demo.signalwire.me/sidecar/events",
  "SWAIG": {
    "defaults": {
      "web_hook_url": "https://sidecar-demo.signalwire.me/sidecar/swaig"
    }
  }
}

What this does not do