conversations-v2
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: conversations-v2
- Reads credentials
- Sends data out
In this repository66 other files it gives its agents.
- adversarial-reviewSkill
- agent-connectSkill
- agent-teams-guideSkill
- agent-testingSkill
- android-sdkSkill
- brainstormSkill
- branded-callingSkill
- callbacksSkill
- compliance-regulatorySkill
- conferenceSkill
- context-engineeringSkill
- context-hubSkill
- conversational-intelligenceSkill
- conversation-relay-referenceSkill
- conversation-relaySkill
- conversationrelaySkill
- customer-memorySkill
- deepgramSkill
- deep-validationSkill
- elastic-sip-trunkingSkill
- env-doctorSkill
- event-streamsSkill
- getting-startedSkill
- hooks-referenceSkill
- iamSkill
- ios-sdkSkill
- ivr-crawlerSkill
- ivr-migratorSkill
- lookupSkill
- media-streamsSkill
- memory-systemsSkill
- messaging-services-referenceSkill
- messaging-servicesSkill
- messagingSkill
- multi-agent-patternsSkill
- operational-gotchasSkill
- paymentsSkill
- paySkill
- phone-numbersSkill
- proxySkill
- real-time-transcriptionSkill
- recordingsSkill
- segmentSkill
- sendgrid-emailSkill
- sip-byocSkill
- sipSkill
- sync-referenceSkill
- syncSkill
- taskrouter-referenceSkill
- taskrouterSkill
- tdd-workflowSkill
- tool-boundariesSkill
- twilio-cliSkill
- twilio-invariantsSkill
- verify-referenceSkill
- verifySkill
- video-patternsSkill
- videoSkill
- voice-insightsSkill
- voice-referenceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 191
PUT replaces entire Configuration: Must send all fields including unchanged ones.
- Distinctive: line 203
Communications are append-only: No edit, no delete. Content is permanent once created.
- Distinctive: line 242
Data retention: Check current documentation for retention periods and policies.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
name: conversations-v2 description: Twilio Conversations v2 (Conversation Orchestrator) development guide. Use when building omnichannel conversation tracking, managing participants and communications, configuring capture rules, or debugging conversation lifecycle issues. Do NOT use for Customer Memory (use /customer-memory) or Intelligence analysis (use /conversational-intelligence). allowed-tools: mcp__twilio__*, Read, Grep, Glob
Twilio Conversations v2 (Conversation Orchestrator)
Omnichannel conversation tracking API. Captures conversations across SMS, Voice, WhatsApp, RCS, Chat, and Email channels. Automatically resolves customer profiles via linked Memory Store, groups communications into logical conversations, and feeds data to Intelligence v3 for analysis.
Generally available — HTTP-only (no SDK). Requires Customer Memory Store for configuration. Not PCI/HIPAA compliant.
Evidence: Claims sourced from live testing (2026-03-26). MCP tools verified in conversations-v2.ts of the Twilio MCP server.
Scope
CAN
- Capture conversations across 6 channel types: SMS, VOICE, WHATSAPP, RCS, CHAT, EMAIL
- Group conversations by participant addresses (cross-channel) or by addresses + channel type
- Auto-resolve customer profiles from phone/email via linked Memory Store identity resolution
- Track 3 participant types: CUSTOMER, HUMAN_AGENT, AI_AGENT
- Inject communications programmatically (for channels not auto-captured)
- Close conversations manually (PUT with
status: CLOSED) - Link up to 5 Intelligence Configurations for automated analysis
- Configure capture rules per channel (which numbers/addresses trigger capture)
- Enable PII redaction at the configuration level
- Enable memory extraction (auto-extract observations when conversations close)
- Configure status callbacks (webhooks for conversation lifecycle events)
- Filter conversations by status, channelId, or participant addresses
CANNOT
- No participant deletion — Once a Participant is added to a Conversation, it cannot be removed. Plan additions carefully. [Live-tested]
- No communication editing or deletion — Communications are append-only. No UPDATE or DELETE. [Live-tested]
- No grouping type change post-creation —
conversationGroupingTypeis immutable after Configuration creation. Must create a new Configuration to change it. [conversations-invariants.md] - No SDK support — All operations require raw HTTP with
Content-Type: application/jsonand Basic auth. - No standalone without Memory Store —
memoryStoreIdis required when creating a Configuration. You must create a Memory Store first (even if you don't use memory features). - No form-encoded requests — Returns 422 "Unsupported Format" if you send form-encoded data. JSON only.
- No page-number pagination — Token-based only. Cannot jump to page N.
Quick Decision
| Need | Use | Why |
| Track conversations across channels | Conversations v2 | Purpose-built omnichannel tracking |
| Simple SMS auto-reply (no history) | Programmable Messaging | Conversations layer is overhead |
| Voice AI with conversation context | Conversations v2 + ConversationRelay | Auto-capture voice, feed to Intelligence |
| Customer profile management | Customer Memory API | Conv v2 links to it but doesn't manage profiles |
| Real-time analysis of conversations | Intelligence v3 | Conv v2 captures; Intelligence v3 analyzes |
| Chat widget in web app | Conversations v2 (CHAT channel) | Native web chat support |
Decision Frameworks
Grouping Strategy
| Strategy | Behavior | Best For |
GROUP_BY_PARTICIPANT_ADDRESSES | Same FROM→TO pair = same conversation regardless of channel | Omnichannel: customer calls then texts, tracked as one conversation |
GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE | Same FROM→TO pair on same channel = same conversation; different channels = different conversations | Separate tracking per channel (e.g., voice QA separate from SMS support) |
Critical: Grouping type is immutable after creation. Cannot be changed — must create a new Configuration.
Concurrency gotcha: GROUP_BY_PARTICIPANT_ADDRESSES only allows one active conversation per FROM→TO pair. A new call/message reuses the existing active conversation (or creates one if none active). If running concurrent synthetic calls with the same phone pair, conversations collide. [conversations-invariants.md]
Channel Settings & Capture Rules
Capture rules control which phone numbers/addresses trigger automatic conversation capture:
{
"channelSettings": {
"SMS": {
"captureRules": [
{ "type": "UNIDIRECTIONAL", "from": "+15551234567" },
{ "type": "BIDIRECTIONAL", "to": "+15559876543" }
],
"statusTimeouts": {
"inactive": 900 // seconds until conversation goes INACTIVE (default 15 min)
}
},
"VOICE": {
"captureRules": [
{ "type": "BIDIRECTIONAL", "to": "+15551234567" }
]
}
}
}| Rule Type | Captures | Use Case |
| UNIDIRECTIONAL (from) | Messages FROM this address only | Track outbound campaigns |
| UNIDIRECTIONAL (to) | Messages TO this address only | Track inbound to support number |
| BIDIRECTIONAL | Both directions on this address | Full conversation tracking |
Participant Types
| Type | Identity Resolution | Use Case |
| CUSTOMER | Auto-resolved via Memory Store identifiers | The end-user calling/messaging |
| HUMAN_AGENT | Not auto-resolved | Contact center agent, supervisor |
| AI_AGENT | Not auto-resolved | Your LLM agent, bot |
Configuration Creation
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const auth = Buffer.from(`${accountSid}:${authToken}`).toString('base64');
// Step 1: Create Configuration (requires existing Memory Store)
const config = await fetch('https://conversations.twilio.com/v2/ControlPlane/Configurations', {
method: 'POST',
headers: { 'Authorization': `Basic ${auth}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
displayName: 'my-config',
description: 'Production conversation tracking',
conversationGroupingType: 'GROUP_BY_PARTICIPANT_ADDRESSES',
memoryStoreId: 'mem_store_...',
memoryExtractionEnabled: true,
intelligenceConfigurationIds: [], // Link Intelligence later
channelSettings: {
SMS: {
captureRules: [{ type: 'BIDIRECTIONAL', to: '+15551234567' }],
statusTimeouts: { inactive: 900 }
},
VOICE: {
captureRules: [{ type: 'BIDIRECTIONAL', to: '+15551234567' }]
}
},
redaction: { pii: { enabled: false } }
}),
});
// Returns: conv_configuration_* IDConversation Lifecycle
ACTIVE (auto-created by capture rule match)
│
├── Receives Communications (append-only)
├── Intelligence runs per rule triggers
│
├── No activity for statusTimeouts.inactive →
│ Status: INACTIVE
│ Intelligence CONVERSATION_INACTIVE triggers fire
│ Memory extraction runs (if enabled)
│
└── Explicit close (PUT status: CLOSED) →
Status: CLOSED
Intelligence CONVERSATION_END triggers fire
Memory extraction runs (if enabled)Programmatic Conversation Management
// Close a conversation (triggers Intelligence + Memory extraction)
await fetch(`https://conversations.twilio.com/v2/Conversations/${convId}`, {
method: 'PUT',
headers: { 'Authorization': `Basic ${auth}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ status: 'CLOSED' }),
});
// Add a communication programmatically
await fetch(`https://conversations.twilio.com/v2/Conversations/${convId}/Communications`, {
method: 'POST',
headers: { 'Authorization': `Basic ${auth}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
author: 'conv_participant_...',
content: 'Hello, how can I help?',
channelId: 'SMS',
recipients: ['conv_participant_...']
}),
});Gotchas
Configuration
- memoryStoreId is required: Cannot create a Configuration without a Memory Store, even if you don't use memory features. Create the store first. [Live-tested: T6]
- displayName allows spaces (unlike Intelligence v3): Conv v2 regex is
^[a-zA-Z0-9-_ ]+$(with space). Intelligence v3 is^[a-zA-Z0-9-_]+$(no space). Cross-product inconsistency. [Live-tested: T7] - PUT replaces entire Configuration: Must send all fields including unchanged ones. Omitting
channelSettingsdeletes all capture rules. Version auto-increments. - Grouping type immutable: Cannot change after creation. Must create a new Configuration.
- Max 5 Intelligence Configurations linkable: At the Configuration level.
Capture Rules
- Never remove VOICE capture rules to fix a single number: Removing a capture rule stops ALL voice conversation capture for that channel, not just the problem number. Close stale conversations instead. [conversations-invariants.md]
- Verify phone number webhook config: A number pointing at the wrong URL creates conversations with no matching capture rules → zero operator results. Use
list_phone_numbersMCP tool to verify. [conversations-invariants.md]
Conversations & Communications
- Participants cannot be deleted: Plan additions carefully. Adding the wrong participant is permanent for that conversation.
- Communications are append-only: No edit, no delete. Content is permanent once created.
- TwiML
<Redirect>causes double conversation creation: Two sequential POST requests from Twilio each create a conversation → 409 Conflict. Serve TwiML directly instead of redirecting. [conversations-invariants.md] - GROUP_BY_PARTICIPANT_ADDRESSES blocks concurrent calls: Same FROM→TO pair can only have one active conversation at a time. Synthetic orchestrators at 1 CPS collide. Lower to 0.2 CPS or use INDIVIDUAL grouping. [conversations-invariants.md]
Integration
- memoryExtractionEnabled defaults to true: Conversations auto-extract observations when closed/inactive. Disable explicitly if you don't want this.
- PII redaction is Configuration-level: Cannot enable/disable per conversation. All or nothing.
- Status callbacks fire for all lifecycle events: Configure
statusCallbacksto receive ACTIVE, INACTIVE, CLOSED transitions.
MCP Tools
14 tools available via mcp__twilio__*:
| Operation | Tool |
| Create Configuration | create_conversations_v2_configuration |
| List Configurations | list_conversations_v2_configurations |
| Get Configuration | get_conversations_v2_configuration |
| Update Configuration | update_conversations_v2_configuration |
| Delete Configuration | delete_conversations_v2_configuration |
| Create Conversation | create_conversations_v2_conversation |
| List Conversations | list_conversations_v2_conversations |
| Get Conversation | get_conversations_v2_conversation |
| Update Conversation | update_conversations_v2_conversation |
| Create Participant | create_conversations_v2_participant |
| List Participants | list_conversations_v2_participants |
| Get Participant | get_conversations_v2_participant |
| Create Communication | create_conversations_v2_communication |
| List Communications | list_conversations_v2_communications |
Data Retention & GDPR
Append-only communications. There is no DELETE endpoint for individual communication records. To comply with GDPR erasure requests, delete the entire conversation — this cascades to all communications and participants.
Participant identifiers are PII. Phone numbers, email addresses, and user IDs stored as participant identifiers require appropriate consent and handling.
Memory Store linkage is not bidirectional. memoryStoreId links conversations to Customer Memory profiles. Deleting a memory profile does not delete conversation records, and vice versa. Erasure must be coordinated across both systems.
Data retention: Check current documentation for retention periods and policies.
Related Resources
- Conversations skill (Twilio Conversations documentation) — Full pipeline setup with all three products
- Customer Memory skill (
/customer-memory) — Profile management, required for Configuration - Intelligence v3 skill (
/conversational-intelligence) — Analysis engine that consumes conversations - Agent Connect skill (
/agent-connect) — SDK that uses Conv v2 under the hood - API surface reference (
../conversations/references/api-surface.md) — Full endpoint catalog with request/response shapes - Setup guide (
../conversations/references/setup-guide.md) — Step-by-step configuration sequence - Conversations invariants (
/conversations-v2and/conversational-intelligenceskills) — Cross-product gotchas
Reference Files
| Topic | File | When to read |
| Full API surface | ../conversations/references/api-surface.md | Making any Conv v2 API call (shared reference) |
| Setup sequence | ../conversations/references/setup-guide.md | First-time configuration (Memory → Conv → Intel → Link) |
| Test evidence | ../conversations/references/test-results.md | Verifying claims with SIDs (T4-T10) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

