conversational-intelligence
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: conversational-intelligence
- 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
- conversation-relay-referenceSkill
- conversation-relaySkill
- conversationrelaySkill
- conversations-v2Skill
- 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
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Run Language Operators per-message (COMMUNICATION trigger) for real-time analysis (~4s latency)
- Very specific: line 25
Run Language Operators post-conversation (CONVERSATION_END trigger) for full-context analysis
- Very specific: line 26
Run Language Operators on inactivity (CONVERSATION_INACTIVE trigger)
- Distinctive: line 27
Use 4 Twilio-authored operators: Sentiment, Summary, Next Best Response, Script Adherence
- Distinctive: line 28
Create custom Language Operators with free-form prompts and structured output (TEXT, JSON, CLASSIFICATION, EXTRACTION)
- Distinctive: line 33
Use Enterprise Knowledge context (knowledge bases) in operator rules
- Very specific: line 195
displayName must be alphanumeric + hyphens/underscores only: No spaces. Regex: ^(?![Dd][Ee][Ff][Aa][Uu][Ll][Tt])[a-zA-Z0-9-_]+$.
- Distinctive: line 218
Dual capture rules produce duplicate results: If a Conversation Configuration captures both directions (FROM→TO and TO→FROM) as separate …
- Distinctive: line 247
Data flow: Call audio → Twilio transcription → Operator processing (may route to OpenAI for custom operators) → Results stored in Twilio's …
≈ “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: conversational-intelligence description: Twilio Conversational Intelligence v3 development guide. Use when building real-time or post-call conversation analysis with Language Operators, creating custom operators, or choosing between Intelligence v2 and v3. Do NOT use for recording-based transcription (use Voice Intelligence v2 via /recordings skill). allowed-tools: mcp__twilio__*, Read, Grep, Glob
Twilio Conversational Intelligence v3
Real-time and post-conversation GenAI analysis engine. Processes conversations captured by Conversations Orchestrator (v2) using Language Operators — Twilio-authored or custom. Produces structured results (sentiment, summaries, classifications, extractions) delivered via webhook or queryable via API.
Generally available — HTTP-only (no SDK). Requires Conversations Orchestrator for conversation capture. AI model: OpenAI GPT-4o.
Evidence: Claims sourced from live testing (2026-03-26). MCP tool implementations verified in intelligence-v3.ts of the Twilio MCP server.
Scope
CAN
- Run Language Operators per-message (COMMUNICATION trigger) for real-time analysis (~4s latency)
- Run Language Operators post-conversation (CONVERSATION_END trigger) for full-context analysis
- Run Language Operators on inactivity (CONVERSATION_INACTIVE trigger)
- Use 4 Twilio-authored operators: Sentiment, Summary, Next Best Response, Script Adherence
- Create custom Language Operators with free-form prompts and structured output (TEXT, JSON, CLASSIFICATION, EXTRACTION)
- Deliver results via webhook (POST) with full execution context
- Query results via REST API (filter by configuration or conversation)
- Link up to 5 Intelligence Configurations per Conversation Configuration
- Define up to 5 rules per configuration, each with up to 5 operators and 2 webhook actions
- Use Enterprise Knowledge context (knowledge bases) in operator rules
- Access Intelligence-processed conversations read-only via v3 Conversations endpoint
CANNOT
- No standalone operation — Requires Conversations Orchestrator (v2) for conversation capture. Cannot feed raw messages, recordings, or external data into v3. [Live-tested: T9 in conversations test-results]
- No recording ingestion — v3 processes real-time communications from Conversations, not recording files. For recording-based analysis, use Voice Intelligence v2.
- No per-message sentiment — Sentiment is conversation-level, accumulating across all messages.
+positive+negative=mixed, not separate per-message scores. [Live-tested] - No Customer Memory context in operators (beta) —
context.customer_memory.enabledfield exists in rules but is non-functional. Enterprise Knowledge context works. [conversations skill CANNOT #4] - No SDK support — All operations require raw HTTP with
Content-Type: application/jsonand Basic auth. - No operator parameter templating at runtime — Parameters are set at configuration time, not per-invocation.
- Never PUT to update operators — PUT creates an inactive version with no activation API. The operator silently stops producing results. Delete + POST to recreate. [conversations-invariants.md]
- Cross-config result pollution —
intelligenceConfigurationquery parameter does server-side filtering, but built-in Twilio operators from OTHER configs still appear. Filter by specificoperator.idin code. [conversations-invariants.md]
Quick Decision
| Need | Use | Why |
| Real-time conversation analysis (per-message) | Intelligence v3 + COMMUNICATION trigger | ~4s latency, webhook delivery |
| Post-call summary and QA | Intelligence v3 + CONVERSATION_END trigger | Full conversation context |
| Recording transcription + operators | Voice Intelligence v2 | v3 cannot ingest recordings |
| Simple call recording without analysis | Recording API | No Intelligence needed |
| Sentiment during a live call | Intelligence v3 | But note: conversation-level only, not per-message |
| Custom scoring with structured output | Custom operator (JSON output format) | Define schema, get typed results |
Decision Frameworks
Voice Intelligence v2 vs Conversational Intelligence v3
| Criterion | v2 (Voice Intelligence) | v3 (Conversational Intelligence) |
| Input source | Recordings (via source_sid) | Live conversations (via Conversations Orchestrator) |
| Analysis timing | Post-call only (after recording complete) | Real-time (per-message) + post-conversation |
| Channels | Voice only (recordings) | All 6 (SMS, Voice, WhatsApp, RCS, Chat, Email) |
| API style | Twilio SDK (client.intelligence.v2) | Raw HTTP (no SDK) |
| ID format | Traditional SIDs (GT..., GA...) | intelligence_configuration_*, intelligence_operator_* |
| Operator execution | Auto-runs on all transcripts per service | Configurable per-rule with triggers |
| Status | GA (Generally Available) | GA (Generally Available) |
| Setup complexity | Low (one service, attach to recording) | Higher (requires Conv Orchestrator + Memory Store) |
| Best for | Post-call QA, recording archives | Real-time agent assist, omnichannel analytics |
Migration path: v2 and v3 coexist independently. v3 does NOT replace v2 — they serve different input sources. Use v2 for recordings, v3 for live conversations.
Real-Time vs Post-Conversation Triggers
| Criterion | COMMUNICATION | CONVERSATION_END | CONVERSATION_INACTIVE |
| Fires when | Each message (configurable count threshold) | Conversation explicitly closed | No activity for timeout period |
| Context available | Messages up to trigger point | Full conversation | Messages up to inactivity |
| Latency | ~4s from message to webhook | Depends on close event | Depends on timeout config |
| Use case | Live agent assist, real-time scoring | Post-call summary, QA | Abandoned conversation analysis |
| Count parameter | {"count": N} — fire every N messages | N/A | N/A |
Custom Operators: Output Format Selection
| Format | JSON Shape | Best For |
| TEXT | {"result": "free text string"} | Summaries, explanations, agent responses |
| JSON | {"result": {custom schema}} | Structured extraction, scoring, multi-field analysis |
| CLASSIFICATION | {"result": {"label": "category"}} | Intent detection, sentiment override, routing |
| EXTRACTION | {"result": {"entities": [...]}} | Named entity extraction, key-value pairs |
Creating Custom Operators
// Create a custom operator
const response = await fetch('https://intelligence.twilio.com/v3/ControlPlane/Operators', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${accountSid}:${authToken}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
displayName: 'intent-classifier',
description: 'Classifies customer intent from conversation',
prompt: 'Analyze the conversation and classify the customer intent. Categories: billing, technical_support, sales, general_inquiry, complaint.',
outputFormat: 'CLASSIFICATION',
parameters: {} // Optional: define {{parameters.X}} placeholders
}),
});
// Returns: intelligence_operator_* IDCreating Intelligence Configurations
// Create a configuration with rules
const config = await fetch('https://intelligence.twilio.com/v3/ControlPlane/Configurations', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${accountSid}:${authToken}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
displayName: 'my-analytics', // No spaces! ^[a-zA-Z0-9-_]+$
description: 'Real-time conversation analytics',
rules: [{
displayName: 'real-time-sentiment',
operators: [{ id: 'intelligence_operator_01kcrvw16kfa88qvgrfmr7y151' }], // Twilio Sentiment
triggers: [{ on: 'COMMUNICATION', parameters: { count: 1 } }],
actions: [{ type: 'WEBHOOK', method: 'POST', url: 'https://your-server.com/intel-results' }],
context: {
customer_memory: { enabled: false }, // Non-functional in beta
knowledge: { bases: [] }
}
}]
}),
});
// Returns: intelligence_configuration_* IDThen link to Conversation Configuration (PUT replaces entire resource):
await fetch(`https://conversations.twilio.com/v2/ControlPlane/Configurations/${convConfigId}`, {
method: 'PUT',
headers: { 'Authorization': `Basic ${auth}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
// Must include ALL existing fields (PUT = full replace)
displayName: existingConfig.displayName,
memoryStoreId: existingConfig.memoryStoreId,
intelligenceConfigurationIds: ['intelligence_configuration_...'], // Add here
// ... all other fields
}),
});Consuming Results
Webhook Handler
// POST handler for Intelligence webhook
app.post('/intel-results', (req, res) => {
const { conversationId, operatorResults, intelligenceConfiguration } = req.body;
for (const result of operatorResults) {
// Filter out cross-config pollution (gotcha #8)
if (result.operator.id === 'intelligence_operator_01kcrvw16kfa88qvgrfmr7y151'
&& result.executionDetails.trigger.on === 'COMMUNICATION') {
// This is OUR Sentiment result from OUR config
console.log(`Sentiment: ${JSON.stringify(result.result)}`);
}
}
res.sendStatus(200);
});Querying Results via API
// List results for a specific conversation
const results = await fetch(
`https://intelligence.twilio.com/v3/OperatorResults?conversationId=${convId}`,
{ headers: { 'Authorization': `Basic ${auth}` } }
);Gotchas
Configuration
- displayName must be alphanumeric + hyphens/underscores only: No spaces. Regex:
^(?![Dd][Ee][Ff][Aa][Uu][Ll][Tt])[a-zA-Z0-9-_]+$. "default" is reserved. Conversation v2 displayName allows spaces — this is an inconsistency. [Live-tested: T7 in conversations test-results] - PUT replaces ALL rules in configuration: Adding a rule requires sending all existing rules plus the new one. Omitting existing rules deletes them silently.
- Max 5 rules per configuration: API rejects additional rules.
- Max 5 operators per rule, max 2 actions per rule: Hard limits.
- Max 5 Intelligence Configurations per Conversation Configuration: At the linkage level.
Operators
- Never PUT to update operators: Creates inactive version. Delete + POST to recreate. [conversations-invariants.md]
- Twilio-authored operators return
prompt: null: Cannot see their implementation. Only custom operators expose the prompt. - Cannot delete Twilio-authored operators: Returns 404, not 403.
- Twilio-authored operator IDs: Sentiment
01kcrvw16kfa88qvgrfmr7y151, Summary01kcv35pnkeysaf6z6cqtbpegn, Script Adherence01kf34tcyefpyb1t4m0nbd8rxg, Next Best Response01kea27sy7ffsafmtsfp17nzx4.
Results & Webhooks
- Cross-config result pollution: Built-in Sentiment from OTHER configs appears in your results. Filter by
intelligenceConfiguration.idor specificoperator.id. The most common pollutant is a Sentiment result withinputCharacters: 0and result always "neutral". [conversations-invariants.md] - ~4s end-to-end latency for COMMUNICATION trigger: SMS sent → operator result webhook received. Acceptable for async agent assist, tight for real-time UX.
- Webhook payload includes full execution context:
participants[].profileId,communications.first/last, channel types. Useful for routing results to the right customer profile. - Customer Memory context non-functional:
context.customer_memory.enabled: trueis accepted but memory data is not injected into operator execution. Enterprise Knowledge (context.knowledge.bases) works.
Integration
- Cannot operate without Conversations Orchestrator: Intelligence v3 has no independent ingestion path. A conversation must exist via Conv v2 for analysis to run.
- Dual capture rules produce duplicate results: If a Conversation Configuration captures both directions (FROM→TO and TO→FROM) as separate communications, operators fire twice per message exchange. Expected behavior, not a bug.
- OperatorResults omit displayName post-GA:
/v3/OperatorResultsreturnsoperator: { id, parameters, version }withoutnameordisplayName. Must resolve via/v3/ControlPlane/Operatorsand join by ID. Dashboard code must maintain an ID→displayName map. [Live-tested: 2026-05-18] - TAC SDK CintelParticipantSchema rejects null profileId: CI v3 webhooks send
profileId: nullfor participants without Memory profiles (synthetic callers, uncaptured numbers). Zod schemaz.string().optional()rejects null — needs.nullable().optional(). Error: "No memory store ID in event" is a downstream symptom. [Live-tested: twilio-agent-connect dist line 656]
MCP Tools
14 tools available via mcp__twilio__*:
| Operation | Tool |
| Create Configuration | create_intelligence_v3_configuration |
| List Configurations | list_intelligence_v3_configurations |
| Get Configuration | get_intelligence_v3_configuration |
| Update Configuration | update_intelligence_v3_configuration |
| Delete Configuration | delete_intelligence_v3_configuration |
| List Operators | list_intelligence_v3_operators |
| Get Operator | get_intelligence_v3_operator |
| Create Custom Operator | create_intelligence_v3_operator |
| Update Operator | update_intelligence_v3_operator |
| Delete Operator | delete_intelligence_v3_operator |
| List Results | list_intelligence_v3_operator_results |
| Get Result | get_intelligence_v3_operator_result |
| List Conversations | list_intelligence_v3_conversations |
| Get Conversation | get_intelligence_v3_conversation |
Data Processing & Sub-Processors
Custom operators may use OpenAI. CLASSIFICATION and EXTRACTION Language Operators route transcript data to OpenAI for processing. Built-in operators (sentiment, summarization) use Twilio's own models and do not involve external sub-processors.
Data flow. Call audio → Twilio transcription → Operator processing (may route to OpenAI for custom operators) → Results stored in Twilio's region. Document this sub-processor chain in your Data Processing Agreement (DPA).
Data residency. Transcripts and operator results are stored in the Twilio region where the account is configured.
Related Resources
- Conversations skill (Twilio Conversations documentation) — Full pipeline setup with all three products
- Customer Memory skill (
/customer-memory) — Profile context for operators - ConversationRelay skill (
/conversationrelay) — Voice AI that feeds conversations - Recordings skill (
/recordings) — For v2 Intelligence (recording-based) - API surface reference (
../conversations/references/api-surface.md) — Full endpoint catalog - 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 v3 API call (shared reference) |
| Webhook payload shapes | ../conversations/references/api-surface.md §Intelligence v3 | Parsing webhook results |
| Test evidence | ../conversations/references/test-results.md | Verifying behavioral claims with SIDs (T7-T12) |
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.

