cd /news/ai-agents/ai-support-agent-that-carries-contex… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-151394] src=github.com β†— pub= topic=ai-agents verified=true sentiment=Β· neutral

AI Support Agent That Carries Context Between Email and WhatsApp (Python)

Telnyx published a Python code example, email-whatsapp-support-python, that demonstrates a unified customer support dashboard carrying context across Email and WhatsApp channels using Telnyx APIs. The demo runs without Telnyx credentials via `pip install -r requirements.txt` and `python demo/demo_server.py`, serving a four-panel dashboard at http://localhost:5050 that walks through a scripted journey from a damaged-headphones report to order status transitions of delivered β†’ damage_reported β†’ replacement_shipping β†’ resolved. Production use requires copying .env.example to .env with real credentials, running app.py, and configuring the /webhooks/email and /webhooks/whatsapp endpoints.

read2 min views3 publishedOct 16, 2026
AI Support Agent That Carries Context Between Email and WhatsApp (Python)
Image: Michielbdejong (auto-discovered)

A unified dashboard demo showing customer support across Email and WhatsApp channels using Telnyx APIs.

Scenario: A customer reports a damaged order via email. Support follows up on WhatsApp to collect a damage photo, approves a replacement, and sends a shipping confirmation back via email β€” all tracked in a single dashboard.

No Telnyx credentials needed:

pip install -r requirements.txt
python demo/demo_server.py

Open http://localhost:5050 and click Run Demo Journey.

The dashboard has four panels:

Panel Content
Customer Profile card with name, email, phone
Email Thread Subject/body cards with inbound (blue) / outbound (green) borders
WhatsApp Phone-frame UI with chat bubbles, delivery ticks, image thumbnails
Order & Timeline Order status badge transitions, damage photo, chronological event log
Step Channel Direction What Happens
1a Inbound Customer reports damaged headphones
1b Outbound Auto-acknowledgment, mentions WhatsApp follow-up
2 Outbound Template message requesting damage photo
3 Inbound Customer sends photo + description
4 Outbound Support confirms replacement approved
5 Outbound Shipping confirmation with tracking number

Order status transitions: delivered β†’ damage_reported β†’ replacement_shipping β†’ resolved

To run with real Telnyx credentials:

cp .env.example .env
python app.py

Configure Telnyx webhooks:

  • Email :https://your-domain.com/webhooks/email
  • WhatsApp :https://your-domain.com/webhooks/whatsapp
email-whatsapp-support-python/
β”œβ”€β”€ app.py                  # Flask app: webhooks, channel helpers, SSE, customer registry
β”œβ”€β”€ demo/
β”‚   └── demo_server.py      # Imports app.py, mocks APIs, runs scripted journey
β”œβ”€β”€ templates/
β”‚   └── index.html          # Dashboard UI (4-panel layout)
β”œβ”€β”€ requirements.txt        # flask, python-dotenv, telnyx, requests
β”œβ”€β”€ .env.example            # Credential placeholders
β”œβ”€β”€ smoke_test.py           # Basic tests
β”œβ”€β”€ README.md               # This file
β”œβ”€β”€ API.md                  # Endpoint reference
└── GUIDE.md                # Tutorial walkthrough

See API.md for the full endpoint reference.

Endpoint Method Description
/ GET Dashboard UI
/health GET Status + mode
/customers GET List customers
/conversations GET Conversation history
/orders GET Order state
/stream GET SSE event stream
/webhooks/email POST Email webhook
/webhooks/whatsapp POST WhatsApp webhook
python smoke_test.py
── more in #ai-agents 4 stories Β· sorted by recency
── more on @telnyx 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/ai-support-agent-tha…] indexed:0 read:2min 2026-10-16 Β· β€”