Conversational AI

Build Provisional Voice API Agents with Telnyx

Learn how to use one reusable AI assistant configuration across many runtime contexts with provisional agents. Route by called number, load business config, and start call-specific assistants at runtime.

Provisional agents are a pattern for using one reusable AI assistant configuration across many runtime contexts. Instead of creating a separate assistant for every business, location, or campaign, your application selects the right instructions at call time and starts the assistant with that context.

The canonical code example is in the Telnyx code examples repo: https://github.com/team-telnyx/telnyx-code-examples/tree/codex/provisional-voice-api-agents/provisional-telnyx-voice-api-agents-nodejs

The example is currently in PR #28: https://github.com/team-telnyx/telnyx-code-examples/pull/28

What This Example Shows

The Node.js example demonstrates how to answer a Telnyx Voice API call, route by called number, load runtime business configuration, and start a Telnyx AI assistant with call-specific instructions.

Why It Matters

This pattern is useful when the base assistant behavior is stable but the active business context changes per call. Appointment scheduling is a natural example: the assistant workflow is similar, but the business name, services, hours, greeting, and tone can all vary.

Start Here

git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples
git checkout codex/provisional-voice-api-agents
cd provisional-telnyx-voice-api-agents-nodejs
npm install
cp .env.example .env
npm start
Share on Social
Anusha Thukral
Developer Advocate

Anusha Thukral is a Developer Advocate at Telnyx, she helps developers understand and build with Voice AI and communications technologies. She studied Cognitive Systems at the University of British Columbia, focusing on the intersection of technology and human behavior.

Sign up for emails of our latest articles and news