A useful AI assistant demo does not always need a phone call. Sometimes the fastest way to show the value of a Portal-managed assistant is a simple web chat: type a question,.
A useful AI assistant demo does not always need a phone call. Sometimes the fastest way to show the value of a Portal-managed assistant is a simple web chat: type a question, send it to the assistant, and render the answer in your own UI.
The canonical code example is in the Telnyx code examples repo:
https://github.com/team-telnyx/telnyx-code-examples/tree/main/chat-with-ai-assistant-python
This example shows how to build a small Flask app that talks to a Telnyx AI Assistant. The assistant is configured in the Telnyx Mission Control Portal, while the application controls the user experience.
The flow is:
This is a clean pattern for developer demos because the API key stays on the server, the assistant configuration stays in the Portal, and the frontend can be customized like any other web app.
Developers often want two things at the same time: a managed assistant they can configure without redeploying code, and a custom interface that matches their product. Telnyx AI Assistants support that split.
You can configure instructions, model behavior, voice or messaging settings, and conversation history in Telnyx, then build a web, mobile, voice, or messaging experience around the assistant.
For this demo, the assistant is a Telnyx Chatbot. It answers product questions like:
The current chat flow has two steps.
First, create a conversation:
Then send a message to the assistant:
The Flask backend wraps those calls so the browser never sees the Telnyx API key.
Add your environment variables:
Open:
For a live demo, keep the questions short:
The point is not to show a generic chatbot. The point is to show that a Portal-managed Telnyx AI Assistant can power a custom product experience.
For production, add user authentication, persistent conversation storage, rate limiting, logging, and a clearer separation between demo shortcuts and real assistant calls. If you expose this publicly, keep the Telnyx API key on the server and validate all user input before sending it to downstream systems.
Related articles