Skip to main content
Every interaction between an AI Assistant and an end user is stored as a conversation in AI Conversations. Conversations are keyed by channel and by the two endpoints of the conversation — the assistant’s target (a phone number, SIP URI, or other identifier) and the end user’s target — and the same assistant can have several independent conversations with the same end user, one per channel.

Keying model per channel

Conversation metadata

Each conversation carries identifying metadata you can read on every list and get response: The same fields are available to the assistant’s instructions and tools as dynamic variables: {{telnyx_conversation_channel}}, {{telnyx_agent_target}}, and {{telnyx_end_user_target}}.

One pair, one conversation per channel

A single number pair — one assistant number and one end-user number — can have several concurrent or sequential conversations, one per channel. A phone call to the assistant’s number creates a phone_call conversation for that call, while texts with the same number pair continue in their own long-lived sms_chat conversation. The two records are independent: closing the call does not close the text conversation, and the assistant’s memory can span both by querying on telnyx_end_user_target without a channel filter.

Querying conversations by channel or participant

The List Conversations endpoint filters on any metadata field using PostgREST-style parameters. All SMS conversations with one end user:
Every conversation — calls and texts — between one number pair:
Phone-call conversations created in a window:
Message rows carry channel metadata too: a turn recorded with telnyx_conversation_channel: sms_chat inside a conversation whose own channel is phone_call did not come from the call. When inspecting a transcript, read the channel on both the conversation and each message.