twilio-customer-memory
预览截图
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "twilio-customer-memory":https://skillpi.com/zh/skills/deepskill-7d51fa1ccca303413b4d2658960ce0d83b44f1d7a1453fa811ba2bc4296def1e。安装前核对上游来源和版本:https://github.com/openai/plugins。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
使用 Twilio Conversations Memory 存储和检索客户上下文的技能。涵盖 Memory Store 配置、客户资料管理、特征与观察、对话摘要以及语义召回功能。此技能可用于为 AI 代理或人工代理在跨会话和跨渠道场景中持久化并检索客户交互记忆。
介绍来源: third_party · openai · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 对话内存会给你的应用程序持续客户记忆. 观察(发生的事)和特征(客户是谁)是自动通过对话Orchestrator/Orchestrator进行的对话书写出来的,或者在运行自己的提取时直接发布. 在回复前通过Recall检索相关上下文.
- 软件、账号及付费要求
- 与对话内存连接的Twilio账户(需要启用)——新到Twilio? 见 `twilio-account-setup` `TWILIO_ACCOUNT_SID` 和 `TWILIO_AUTH_TOKEN` - 看到没? `twilio-iam-auth-setup` ** Memory Store 必须先创建一个在 conversation Orchestrator/Orchestrator** 中的Conversions Service——在对话配置中需要SID用于对话的调谐: `twilio-conversation-orchestrator`
- 实测状态
- 未测试
文件浏览
Frontmatter
name: twilio-customer-memory
description: >
Store and retrieve customer context using Twilio Conversation Memory.
Covers Memory Store provisioning, profile management, traits, observations,
conversation summaries, and semantic Recall. Use this skill to give AI agents
or human agents persistent memory of customer interactions across sessions
and channels.Overview
Conversation Memory gives your application persistent customer memory. Observations (what happened) and traits (who the customer is) are written automatically from conversations flowing through Conversation Orchestrator/Orchestrator — or posted directly if you run your own extraction. Retrieve relevant context via Recall before responding.
Conversation Orchestrator/Orchestrator conversation → auto-extracted observations & summaries → Memory Store
Your App → Recall → relevant context injected into LLM prompt
All Conversation Memory APIs are on memory.twilio.com. Observations, traits, profiles, summaries — everything is on the same host.
Auth: Basic Auth — TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN.
Prerequisites
- Twilio account with Conversation Memory access (requires enablement)
— New to Twilio? See
twilio-account-setup TWILIO_ACCOUNT_SIDandTWILIO_AUTH_TOKEN— seetwilio-iam-auth-setup- Memory Store must be created before creating a Conversations Service in Conversation Orchestrator/Orchestrator — the store SID is required in the conversation config
- For conversation orchestration:
twilio-conversation-orchestrator
Quickstart
Step 1 — Create a Memory Store
Do this before setting up Conversation Orchestrator/Orchestrator. The Memory Store SID goes into your conversation service config.
Python
import os, requests
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
store = requests.post(
"https://memory.twilio.com/v1/Services",
auth=(account_sid, auth_token),
json={
"uniqueName": "my-app-memory",
"friendlyName": "My App Memory Store"
}
).json()
memory_store_sid = store["sid"]
print(memory_store_sid)
Node.js
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const store = await fetch("https://memory.twilio.com/v1/Services", {
method: "POST",
headers: {
"Authorization": "Basic " + btoa(`${accountSid}:${authToken}`),
"Content-Type": "application/json",
},
body: JSON.stringify({
uniqueName: "my-app-memory",
friendlyName: "My App Memory Store",
}),
}).then(r => r.json());
const memoryStoreSid = store.sid;
Use memory_store_sid when creating your Conversations Service in Conversation Orchestrator/Orchestrator. The two must be linked for automatic observation and summary extraction to work.
Step 2 — Profiles
Profiles are created automatically when conversations flow through Conversation Orchestrator/Orchestrator — the conversation config determines how participants are resolved into profiles. You can also create or enrich profiles manually using traits.
Create a profile manually with traits:
Python
profile = requests.post(
f"https://memory.twilio.com/v1/Services/{memory_store_sid}/Profiles",
auth=(account_sid, auth_token),
json={
"traits": {
"Contact": {
"phone": "+15558675310",
"firstName": "Alyssa",
"lastName": "Mock",
"email": "alyssa@example.com"
}
}
}
).json()
profile_id = profile["id"]
Node.js
const profile = await fetch(
`https://memory.twilio.com/v1/Services/${memoryStoreSid}/Profiles`,
{
method: "POST",
headers: {
"Authorization": "Basic " + btoa(`${accountSid}:${authToken}`),
"Content-Type": "application/json",
},
body: JSON.stringify({
traits: {
Contact: {
phone: "+15558675310",
firstName: "Alyssa",
lastName: "Mock",
email: "alyssa@example.com",
}
}
}),
}
).then(r => r.json());
const profileId = profile.id;
Look up a profile by phone number (for inbound calls where you only have the caller's number):
Python
lookup = requests.post(
f"https://memory.twilio.com/v1/Services/{memory_store_sid}/Profiles/Lookup",
auth=(account_sid, auth_token),
json={"idType": "phone", "value": "+15558675310"}
).json()
profile_id = lookup["profiles"][0]["id"] if lookup.get("profiles") else None
Step 3 — Observations
Observations are extracted automatically from conversations when a conversation becomes inactive or is closed, based on your conversation config. You don't need to write them manually for Conversation Orchestrator-managed conversations.
If you run your own extraction (custom pipeline outside Conversation Orchestrator), post results directly:
Python
requests.post(
f"https://memory.twilio.com/v1/Services/{memory_store_sid}/Profiles/{profile_id}/Observations",
auth=(account_sid, auth_token),
json={
"observations": [
{
"content": "Customer asked about order #4521. Wants expedited shipping. Prefers SMS updates.",
"source": "custom_extraction",
"occurredAt": "2026-04-20T14:30:00Z",
"conversationIds": [conversation_sid]
}
]
}
)
Node.js
await fetch(
`https://memory.twilio.com/v1/Services/${memoryStoreSid}/Profiles/${profileId}/Observations`,
{
method: "POST",
headers: {
"Authorization": "Basic " + btoa(`${accountSid}:${authToken}`),
"Content-Type": "application/json",
},
body: JSON.stringify({
observations: [{
content: "Customer asked about order #4521. Wants expedited shipping. Prefers SMS updates.",
source: "custom_extraction",
occurredAt: new Date().toISOString(),
conversationIds: [conversationSid],
}]
}),
}
);
Batch up to 10 observations in one request.
Step 4 — Recall Context Before Responding
Recall runs hybrid lexical + semantic search and returns the most relevant observations and summaries for an LLM prompt.
Recommended: pass a conversationId from Conversation Orchestrator/Orchestrator. Recall builds a contextually relevant query from the active conversation automatically — no need to craft one yourself.
Python
recall = requests.post(
f"https://memory.twilio.com/v1/Services/{memory_store_sid}/Profiles/{profile_id}/Recall",
auth=(account_sid, auth_token),
json={
"conversationId": orchestrator_conversation_sid,
"observationsLimit": 10,
"summariesLimit": 3,
}
).json()
observations = "\n".join(o["content"] for o in recall.get("observations", []))
summaries = "\n".join(s["content"] for s in recall.get("summaries", []))
system_prompt = f"""You are a helpful support agent.
Customer history:
{observations}
Recent summaries:
{summaries}"""
Node.js
const recall = await fetch(
`https://memory.twilio.com/v1/Services/${memoryStoreSid}/Profiles/${profileId}/Recall`,
{
method: "POST",
headers: {
"Authorization": "Basic " + btoa(`${accountSid}:${authToken}`),
"Content-Type": "application/json",
},
body: JSON.stringify({
conversationId: orchestratorConversationSid,
observationsLimit: 10,
summariesLimit: 3,
}),
}
).then(r => r.json());
const context = [
...recall.observations.map(o => o.content),
...recall.summaries.map(s => s.content),
].join("\n");
Other Recall modes:
| Mode | How | When to use |
|---|---|---|
| Conversation ID (recommended) | "conversationId": orchestrator_sid |
Active Conversation Orchestrator/Orchestrator conversation — query is generated from conversation context |
| Custom query | "query": "your question" |
Custom pipelines outside Conversation Orchestrator, or when you need precise control over relevance |
| No query | Omit both query and conversationId |
Returns most recent observations in chronological order — useful for loading history at session start |
Key Patterns
Trait Groups
Traits are organized into named groups. The Contact group is the standard identity anchor — its fields are promoted to profile identifiers for lookup.
| Group | Fields | Use |
|---|---|---|
Contact |
phone, email, firstName, lastName | Identity anchor — always include |
Account |
accountNumber, tier, region | Business account data |
Support |
disposition, caseId, lastIssueType | Support history |
Define your own groups for domain-specific data.
Summaries
Summaries are written automatically at conversation close or when a conversation goes inactive, based on your conversation config — the same trigger as observations. You can also write them manually:
Python
requests.post(
f"https://memory.twilio.com/v1/Services/{memory_store_sid}/Profiles/{profile_id}/ConversationSummaries",
auth=(account_sid, auth_token),
json={
"conversationId": conversation_sid,
"content": "Customer called about order #4521. Resolved: approved expedited upgrade.",
"source": "manual"
}
)
Summaries are returned in the summaries array of Recall results.
Voice Agent Integration
Retrieve memory at call start, store observations at call end. For voice AI agents on ConversationRelay.
Python (WebSocket handler)
async def handle_call(websocket):
setup = json.loads(await websocket.recv())
caller = setup.get("from", "unknown")
# Look up profile by caller phone
lookup = requests.post(
f"https://memory.twilio.com/v1/Services/{MEMORY_STORE_SID}/Profiles/Lookup",
auth=(ACCOUNT_SID, AUTH_TOKEN),
json={"idType": "phone", "value": caller}
).json()
profiles = lookup.get("profiles", [])
profile_id = profiles[0]["id"] if profiles else None
context = ""
if profile_id:
recall = requests.post(
f"https://memory.twilio.com/v1/Services/{MEMORY_STORE_SID}/Profiles/{profile_id}/Recall",
auth=(ACCOUNT_SID, AUTH_TOKEN),
json={"observationsLimit": 5, "summariesLimit": 2}
).json()
context = "\n".join(o["content"] for o in recall.get("observations", []))
system_prompt = f"You are a helpful agent.\n\nCustomer history:\n{context}" if context else "You are a helpful agent."
# ... handle conversation ...
# Store observation at end if running custom extraction
if profile_id:
requests.post(
f"https://memory.twilio.com/v1/Services/{MEMORY_STORE_SID}/Profiles/{profile_id}/Observations",
auth=(ACCOUNT_SID, AUTH_TOKEN),
json={"observations": [{"content": call_summary, "source": "voice_agent", "conversationIds": [orchestrator_conversation_sid]}]}
)
Multi-Tenant (ISV) Pattern
Use one Memory Store per client. The uniqueName doubles as a namespace.
# At client onboarding
store = requests.post(
"https://memory.twilio.com/v1/Services",
auth=(account_sid, auth_token),
json={"uniqueName": f"client-{client_id}", "friendlyName": client_name}
).json()
# Store store["sid"] in your tenant config — pass it to Conversation Orchestrator conversation service setup
CANNOT
- Cannot create Conversation Orchestrator before Memory Store — Create Memory Store first. Its SID is required when creating the Conversations Service. Reversing this order breaks the linkage.
- Cannot extract observations mid-conversation — Automatic extraction happens on conversation close or inactive. For real-time writing, post directly to the Observations endpoint.
- Cannot read observations immediately after write — Eventual consistency. Allow ~2 seconds after write before querying Recall.
- Cannot exceed 15 Memory Stores per account — ISVs with more than 15 tenants should use sub-accounts
- Cannot detect misconfigured linkages — If Memory Store is not correctly linked in Conversation Orchestrator config, observations are silently not extracted. See
twilio-debugging-observability. - Cannot recover deleted profiles — Profile deletion is irreversible, permanent
- Cannot exceed 20 observations per Recall query —
observationsLimitmax 20, default 5.summariesLimitandcommunicationsLimitsimilar. - Cannot batch more than 10 observations per request — Hard limit on batch writes
Next Steps
- Set up Conversation Orchestrator conversations:
twilio-conversation-orchestrator - Add real-time intelligence:
twilio-conversation-intelligence - Enterprise knowledge retrieval (scripts, offers, policies):
twilio-enterprise-knowledge - Voice agent setup:
twilio-voice-conversation-relay - Debug integration issues:
twilio-debugging-observability
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的 Twilio Conversation Memory 端到端集成方案
- 解决企业级客户上下文持久化的核心痛点
- 支持自动提取与自定义提取双模式
亮点
- 触发描述完整覆盖 Memory Store、Profile、Observations、Recall 等核心能力
- 边界清晰,限定在 Twilio 生态内
- 支持多种使用模式变体
待提升项
-
缺少独立 When to Use 章节 原报告严重程度:轻微
未设置独立的 When to Use 章节,但使用场景已在 Overview 和 Quickstart 中体现
改进建议:可考虑增加独立的使用场景说明章节以提升可读性
亮点
- Phase 划分清晰:Prerequisites → Quickstart → Key Patterns → Limitations
- 每步均含 Python/Node.js 双语言完整示例
- frontmatter 完整规范
亮点
- API 来源明确(memory.twilio.com)
- 参数完整且符合官方规范
- 明确列出 8 项关键限制(CANNOT)和异常处理建议
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- memory.twilio.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
与对话内存连接的Twilio账户(需要启用)——新到Twilio? 见 `twilio-account-setup` `TWILIO_ACCOUNT_SID` 和 `TWILIO_AUTH_TOKEN` - 看到没? `twilio-iam-auth-setup` ** Memory Store 必须先创建一个在 conversation Orchestrator/Orchestrator** 中的Conversions Service——在对话配置中需要SID用于对话的调谐: `twilio-conversation-orchestrator`
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。