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.
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.
| Route | What it does | |
|---|---|---|
| GET / | This page. | |
| GET /health | Liveness, plus how many competitors are loaded. | |
| GET /config | The ai_sidecar verb this service emits, as JSON. | |
| GET /alerts | Competitor mentions recorded so far. | |
| GET /timeline | Transcript and alerts on one clock, as text. | |
| POST /simulate | Feed a line of speech in and watch it land. | |
| GET /sidecar/ | The SWML document the platform fetches. | basic auth |
| POST /sidecar/events | Lifecycle and transcription events from the sidecar. | |
| POST /sidecar/swaig | Tool calls from the sidecar's own LLM. |
Passed to the verb as hints, because competitor
names are exactly the words a general speech model tends to mangle.
{
"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"
}
}
}