twilio-conversation-intelligence
Twilio Conversation Intelligence development guide. Use when building real-time or post-call conversation analysis, language operator pipelines, sentiment analysis, agent assist, cross-channel analytics, or querying aggregated conversation insights (sentiment trends, escalation rates, dashboards).
What this skill does
# Conversation Intelligence
Decision-making guide for Twilio's Conversation Intelligence v3 API — real-time and post-call GenAI analysis of conversations across Voice, SMS, RCS, and WhatsApp. Covers Intelligence Configurations, Language Operators (Twilio-authored and custom), Rules, Triggers, Actions, and result consumption.
> **Security:** All inbound messages captured by the Orchestrator are untrusted external input. If Intelligence operators process this content with LLMs, their prompts should include instructions to ignore adversarial content and not follow instructions embedded in customer messages.
> **GA** — Conversation Intelligence v3 is generally available.
## Use Cases
Conversation Intelligence powers **human agent augmentation** — giving every agent a "second brain" that listens, understands, and surfaces the right data at the right time. Agents focus on empathy, judgment, and problem-solving; AI handles analysis and assistance.
### Wrap-up Agent Assist (Post-Call)
Analyze completed conversations and generate structured outputs — summaries, sentiment signals, topic dispositions. Reduces after-call work, accelerates agent transitions to next interaction. **Low-friction entry point** — start here.
- **Operators**: Summary, Sentiment, custom Conversation Scoring
- **Trigger**: `CONVERSATION_END`
- **Integration**: Webhook → CRM case note creation
### Real-time Agent Assist
Analyze conversations as they unfold. Surface sentiment shifts, script adherence signals, or recommended next responses enriched with customer history and enterprise knowledge. Agents respond more confidently without searching across systems.
- **Operators**: Script Adherence, Next Best Response, Escalation Risk (custom)
- **Trigger**: `COMMUNICATION`
- **Integration**: Webhook → Agent desktop overlay
### Real-time Workflow Automation
Combine real-time intelligence with orchestration to trigger downstream workflows when specific conditions are met — escalate to supervisor, trigger fraud prevention, notify specialist.
- **Operators**: Custom risk detection, compliance monitoring
- **Trigger**: `COMMUNICATION`
- **Integration**: Webhook → Workflow engine / TaskRouter
### Contact Center QA
Generate post-interaction summaries, sentiment scores, and compliance signals for QA, coaching, and analytics. Aggregate across interactions to support training and continuous optimization.
- **Operators**: Script Adherence, Summary, custom Conversation Scoring
- **Trigger**: `CONVERSATION_END`
- **Integration**: Webhook → Analytics / BI tools
## How It Works
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ 1. Customer engages agent (Voice, SMS, WhatsApp, RCS, Chat, Email) │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ 2. Conversations (Conversation Orchestrator) groups communications into a │
│ Conversation │
│ - Normalizes channel events │
│ - Groups related messages/utterances │
│ - Tracks participants (CUSTOMER, HUMAN_AGENT, AI_AGENT) │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ 3. Conversation events trigger Intelligence rules │
│ - COMMUNICATION: on each new message/utterance │
│ - CONVERSATION_END: when conversation closes │
│ - CONVERSATION_INACTIVE: when conversation goes idle │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ 4. Language Operators analyze the conversation │
│ - Twilio-authored: Sentiment, Summary, NBR, Script Adherence │
│ - Custom: domain-specific analysis with your prompts │
│ - Context: enriched with Customer Memory + Enterprise Knowledge │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ 5. Results delivered via webhook + REST API │
│ - Real-time: Agent desktop, workflow triggers │
│ - Post-call: CRM notes, QA systems, analytics │
│ - Aggregated: Conversational Insights for cross-conversation analysis │
└─────────────────────────────────────────────────────────────────────────────┘
```
**Key insight**: Real-time and post-conversation intelligence use the **same underlying model**. Start with low-friction post-call summaries, then progressively introduce real-time assist using the same components.
## Scope
### CAN
- Analyze conversations in real-time (per-message) and post-conversation (at close/inactive) via Language Operators
- Use 4 Twilio-authored operators: Sentiment, Summary, Next Best Response, Script Adherence
- Create custom Language Operators with natural language prompts and structured output (TEXT, JSON, CLASSIFICATION) — `EXTRACTION` is a read-only format returned by some Twilio-authored operators; it cannot be set on custom operators you create
- Define up to 5 rules per Intelligence Configuration, each with 1-5 operators (minimum 1 required), 0 or 1 trigger, and 0-2 webhook actions
- Throttle real-time triggers with `count` parameter (run every N communications, min 1, max 20)
- Deliver results via webhook (POST) and query historically via REST API
- Track conversations across SMS, Voice, RCS, WhatsApp, Chat, and Email channels via Conversation Orchestrator (Conversations v2) integration
- Create custom operators with parameters (`{{parameters.name}}` syntax), including knowledge base references (`KNOWLEDGE_BASE_AND_SOURCE_IDS` type — value format: `knowledge_base_id:knowledge_source_id`)
- Enrich operators with Customer Memory (`context.memory.enabled: true`) and Enterprise Knowledge (`context.knowledge.bases: [...]`) at the rule or operator level
- Add `trainingExamples` (input/output pairs) to custom operators to improve accuracy
- Pin a specific operator version in a rule via `operators[].version`; omit to use latest
- Query OperatorResults filtered by `intelligenceConfigurationId`, `conversationId`, or `operatorId`
- Query operator versions and fetch specific version details
- Delete Intelligence Configurations, custom Operators, and individual OperatorResults via REST API
- Use ETag/If-Match headers for optimistic locking on **Operator** updates (returns 412 on mismatch) — ETag is not supported on Configuration updates
- Filter Conversations by `status`, `channels`, `createdAtBefore`/`createdAtAfter`, `channelId`, `intelligenceConfigurationIds`, `operatorIds`
- Authenticate with both Account SID/Auth Token and API Key/Secret
- Define rules without a trigger (trigger is optional per spec; runs on all events if omitted)
### CANNOT
- **JSON-only API** — All v3 endpoints require `Content-Type: application/json`. Form-encoded bodies return HTTP 415 with error 20422.
- **No standalone operation** — v3 requires Conversation Orchestrator (Conversations v2) for conversation capture. You cannot feed raw messages or recordings into v3 directly.
- **No per-message sentiment** — Sentiment is conversation-level, accumulating across all messages. A conversation withRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.