agentleFS
wittyreferencewittyreference/twilio-claude-plugin/skills/conversations-v2/SKILL.md

conversations-v2

Skill2 starsChanged 8 months agoMITView on GitHub

Twilio development skill: conversations-v2

  • Reads credentials
  • Sends data out

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
  1. Very specific:

    PUT replaces entire Configuration: Must send all fields including unchanged ones.

    line 191
  2. Distinctive:

    Communications are append-only: No edit, no delete. Content is permanent once created.

    line 203
  3. Distinctive:

    Data retention: Check current documentation for retention periods and policies.

    line 242

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. No participant deletion — Once a Participant is added to a Conversation, it cannot be removed. Plan additions carefully. [Live-tested]
  2. No communication editing or deletion — Communications are append-only. No UPDATE or DELETE. [Live-tested]
  3. No grouping type change post-creation — conversationGroupingType is immutable after Configuration creation. Must create a new Configuration to change it. [conversations-invariants.md]
  4. No SDK support — All operations require raw HTTP with Content-Type: application/json and Basic auth.
  5. No standalone without Memory Store — memoryStoreId is required when creating a Configuration. You must create a Memory Store first (even if you don't use memory features).
  6. No form-encoded requests — Returns 422 "Unsupported Format" if you send form-encoded data. JSON only.
  7. No page-number pagination — Token-based only. Cannot jump to page N.

Quick Decision

NeedUseWhy
Track conversations across channelsConversations v2Purpose-built omnichannel tracking
Simple SMS auto-reply (no history)Programmable MessagingConversations layer is overhead
Voice AI with conversation contextConversations v2 + ConversationRelayAuto-capture voice, feed to Intelligence
Customer profile managementCustomer Memory APIConv v2 links to it but doesn't manage profiles
Real-time analysis of conversationsIntelligence v3Conv v2 captures; Intelligence v3 analyzes
Chat widget in web appConversations v2 (CHAT channel)Native web chat support

Decision Frameworks

Grouping Strategy

StrategyBehaviorBest For
GROUP_BY_PARTICIPANT_ADDRESSESSame FROM→TO pair = same conversation regardless of channelOmnichannel: customer calls then texts, tracked as one conversation
GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPESame FROM→TO pair on same channel = same conversation; different channels = different conversationsSeparate 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 TypeCapturesUse Case
UNIDIRECTIONAL (from)Messages FROM this address onlyTrack outbound campaigns
UNIDIRECTIONAL (to)Messages TO this address onlyTrack inbound to support number
BIDIRECTIONALBoth directions on this addressFull conversation tracking

Participant Types

TypeIdentity ResolutionUse Case
CUSTOMERAuto-resolved via Memory Store identifiersThe end-user calling/messaging
HUMAN_AGENTNot auto-resolvedContact center agent, supervisor
AI_AGENTNot auto-resolvedYour 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_* ID

Conversation 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

  1. 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]
  2. 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]
  3. PUT replaces entire Configuration: Must send all fields including unchanged ones. Omitting channelSettings deletes all capture rules. Version auto-increments.
  4. Grouping type immutable: Cannot change after creation. Must create a new Configuration.
  5. Max 5 Intelligence Configurations linkable: At the Configuration level.

Capture Rules

  1. 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]
  2. 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_numbers MCP tool to verify. [conversations-invariants.md]

Conversations & Communications

  1. Participants cannot be deleted: Plan additions carefully. Adding the wrong participant is permanent for that conversation.
  2. Communications are append-only: No edit, no delete. Content is permanent once created.
  3. 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]
  4. 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

  1. memoryExtractionEnabled defaults to true: Conversations auto-extract observations when closed/inactive. Disable explicitly if you don't want this.
  2. PII redaction is Configuration-level: Cannot enable/disable per conversation. All or nothing.
  3. Status callbacks fire for all lifecycle events: Configure statusCallbacks to receive ACTIVE, INACTIVE, CLOSED transitions.

MCP Tools

14 tools available via mcp__twilio__*:

OperationTool
Create Configurationcreate_conversations_v2_configuration
List Configurationslist_conversations_v2_configurations
Get Configurationget_conversations_v2_configuration
Update Configurationupdate_conversations_v2_configuration
Delete Configurationdelete_conversations_v2_configuration
Create Conversationcreate_conversations_v2_conversation
List Conversationslist_conversations_v2_conversations
Get Conversationget_conversations_v2_conversation
Update Conversationupdate_conversations_v2_conversation
Create Participantcreate_conversations_v2_participant
List Participantslist_conversations_v2_participants
Get Participantget_conversations_v2_participant
Create Communicationcreate_conversations_v2_communication
List Communicationslist_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-v2 and /conversational-intelligence skills) — Cross-product gotchas

Reference Files

TopicFileWhen to read
Full API surface../conversations/references/api-surface.mdMaking any Conv v2 API call (shared reference)
Setup sequence../conversations/references/setup-guide.mdFirst-time configuration (Memory → Conv → Intel → Link)
Test evidence../conversations/references/test-results.mdVerifying claims with SIDs (T4-T10)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.