{"slug": "build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute", "title": "Build an SMS Support Agent with Follow-Up on Telnyx Edge Compute", "summary": "Telnyx has released a code example demonstrating an SMS support agent built on its Edge Compute platform. The agent uses durable actors from the Agent SDK to maintain conversation history, process messages asynchronously, and schedule follow-up messages if the customer does not reply within 24 hours. The example integrates with Telnyx AI Inference and Messaging APIs, with authentication handled via a zero-credential binding.", "body_md": "A lot of AI support demos stop after one reply.\n\nCustomer asks a question. Model answers. Demo done.\n\nReal support usually needs a little more than that. You need message history, background processing, a way to send the reply, and sometimes a follow-up if the customer goes quiet.\n\nThis example builds that flow as an SMS support agent on Telnyx Edge Compute.\n\nCode: [https://github.com/team-telnyx/telnyx-code-examples/tree/main/sms-support-agent-with-followup](https://github.com/team-telnyx/telnyx-code-examples/tree/main/sms-support-agent-with-followup)\n\nThe app receives inbound SMS messages, routes each sender to a durable Agent SDK actor, calls Telnyx AI Inference, sends a reply through Telnyx Messaging, and schedules a 24-hour follow-up.\n\nThe flow:\n\n``` php\nInbound SMS\n  -> /webhooks/sms\n  -> SupportAgent.receive()\n  -> this.messages.add()\n  -> this.queue(\"process\")\n  -> Telnyx AI Inference\n  -> Telnyx Messaging reply\n  -> this.schedule(24h, \"followup\")\n```\n\nThe important part is that the webhook does not need to wait on the LLM. It stores the message and queues the work, so the webhook can acknowledge quickly.\n\nThe `SupportAgent`\n\nextends the Agent SDK `Agent`\n\nclass from `@telnyx/edge-runtime`\n\n.\n\nIt uses:\n\n`this.messages.add()`\n\nfor durable conversation history`this.messages.toOpenAI()`\n\nto format history for the model`this.queue(\"process\")`\n\nfor background AI processing`this.schedule(86400, \"followup\")`\n\nfor the next-day check-in`this.setState()`\n\nand `this.getState()`\n\nfor sender/recipient state`this.env.TELNYX`\n\nfor zero-credential Telnyx API accessThe `[telnyx]`\n\nbinding in `telnyx.toml`\n\nhandles API auth:\n\n```\n[telnyx]\nbinding = \"TELNYX\"\n```\n\nThen the agent can call:\n\n```\nawait this.env.TELNYX.ai.openai.chat.createCompletion(...)\nawait this.env.TELNYX.messages.send(...)\n```\n\nNo API key is hardcoded in the application code.\n\n`POST /webhooks/sms`\n\nreceives Telnyx `message.received`\n\nwebhooks`POST /debug/message`\n\nsimulates an inbound SMS for testing`GET /debug/state`\n\ninspects an actor state for a sender`GET /health/liveness`\n\nand `GET /health/readiness`\n\nare health checksAfter deploying, you can simulate an inbound SMS:\n\n```\ncurl -X POST https://sms-support-agent-<id>.telnyxcompute.com/debug/message \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from\":\"+15551230000\",\n    \"to\":\"+15559870000\",\n    \"text\":\"How do I send an SMS?\"\n  }'\n```\n\nResponse:\n\n```\n{\n  \"action\": \"queued\",\n  \"from\": \"+15551230000\",\n  \"to\": \"+15559870000\"\n}\n```\n\nFor real SMS, set your Telnyx Messaging Profile webhook URL to:\n\n```\nhttps://sms-support-agent-<id>.telnyxcompute.com/webhooks/sms\n```\n\nThen text the Telnyx number.\n\nThe follow-up task runs 24 hours later.\n\nIt checks the last message in the durable conversation history. If the last message is still from the assistant, the customer has not replied since the AI answer, so the agent sends:\n\n```\nDid that solve your problem? Reply yes or no, or ask for a human.\n```\n\nIf the customer already replied, it skips the nudge.\n\nThat is the piece I like. The agent is not just a stateless webhook. It has memory and scheduled work.\n\nBefore shipping this pattern in a real support workflow, I would add:\n\nBut as a starter pattern, this is a clean way to build an AI support agent that can answer, remember, and follow up.\n\nResources:", "url": "https://wpnews.pro/news/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute", "canonical_source": "https://dev.to/sonam_50a41a4ced7e6b4f3fa/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute-2aei", "published_at": "2026-08-11 21:51:10+00:00", "updated_at": "2026-08-11 22:17:26.658435+00:00", "lang": "en", "topics": ["ai-agents", "ai-products", "developer-tools", "natural-language-processing"], "entities": ["Telnyx", "Agent SDK", "Telnyx Edge Compute", "Telnyx AI Inference", "Telnyx Messaging"], "alternates": {"html": "https://wpnews.pro/news/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute", "markdown": "https://wpnews.pro/news/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute.md", "text": "https://wpnews.pro/news/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute.txt", "jsonld": "https://wpnews.pro/news/build-an-sms-support-agent-with-follow-up-on-telnyx-edge-compute.jsonld"}}