Build an Edge Backend for a Telnyx AI Assistant Telnyx released a Go-based Edge Compute function that serves as a backend for its AI Assistant, enabling dynamic context and tool invocation during phone calls. The example demonstrates a home-services lead screener that resolves company names and schedules estimates using a single public URL, eliminating the need for separate servers or Docker setups. The pattern can be applied to various use cases like order tracking and appointment booking. Voice AI demos get interesting when the assistant needs real backend context. It is one thing to have an assistant answer a call. It is another thing to have that assistant greet the caller with dynamic context, collect information, call a backend tool, and read a confirmation back during the same phone call. This Go example shows how to use one Telnyx Edge Compute function as the backend for a Telnyx AI Assistant. Code: https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-ai-assistant-backend-go https://github.com/team-telnyx/telnyx-code-examples/tree/main/edge-ai-assistant-backend-go Full guide: https://developers.telnyx.com/docs/edge-compute/guides/ai-assistant-backend https://developers.telnyx.com/docs/edge-compute/guides/ai-assistant-backend The app is a Go Edge Compute function with one public URL. That one URL handles two AI Assistant callbacks: In the demo, the assistant is a home-services lead screener. It can resolve a company name for the greeting, then call a schedule estimate webhook tool after collecting enough information from the caller. Usually, the moment an AI assistant needs application context, you need to build a webhook server. That means hosting, deployment, secrets, request verification, and a public URL. With Edge Compute, that backend can live close to the Telnyx communications layer. You deploy a function, store secrets, and point the assistant callbacks to the function URL. No separate server. No Docker setup. No Kubernetes just to answer a webhook. The handler does three useful things: Dynamic variables must be returned under a dynamic variables key: { "dynamic variables": { "company name": "Pinecrest Home Services", "timeframe": "two business days" } } The webhook tool returns data the assistant can use in the live conversation: { "scheduled date": "2025-04-10", "scheduled time": "10:00", "confirmation number": "CONF-1715234567", "estimate id": "EST-1715234567" } Scaffold a Go function: telnyx-edge new-func -l go -n edge-ai-assistant-backend cd edge-ai-assistant-backend Fetch your Telnyx public key and store it as an Edge secret: PUBLIC KEY=$ curl -s -H "Authorization: Bearer $TELNYX API KEY" \ https://api.telnyx.com/v2/public key | jq -r '.data.public' telnyx-edge secrets add TELNYX PUBLIC KEY "$PUBLIC KEY" Deploy: telnyx-edge ship telnyx-edge list Then configure your AI Assistant so both the dynamic variables webhook URL and the schedule estimate webhook tool URL point to the same Edge Compute invoke URL. The full setup is in the guide: https://developers.telnyx.com/docs/edge-compute/guides/ai-assistant-backend https://developers.telnyx.com/docs/edge-compute/guides/ai-assistant-backend This example uses a scheduling flow, but the backend pattern applies to: The core idea is simple: keep the assistant conversational, and put the callback logic at the edge. Edge Compute quickstart: https://developers.telnyx.com/docs/edge-compute/quickstart https://developers.telnyx.com/docs/edge-compute/quickstart AI Assistant dynamic variables: https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables Webhook signing: https://developers.telnyx.com/development/api-fundamentals/webhooks/receiving-webhooks webhook-signing https://developers.telnyx.com/development/api-fundamentals/webhooks/receiving-webhooks webhook-signing Telnyx AI skills and toolkits: https://github.com/team-telnyx/ai https://github.com/team-telnyx/ai