[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GB8EW9MJS1BJWR0RXZEQJ":3,"skill-same:01M79GB8EW9MJS1BJWR0RXZEQJ":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79GB8EW9MJS1BJWR0RXZEQJ","twilio-enterprise-knowledge",null,"Add knowledge retrieval to AI agents using Twilio's Enterprise Knowledge product. Enterprise Knowledge is a centralized, searchable repository of your organization's documents, websites, and content — FAQs, support policies, warranty terms, product catalogs. Current models don't have access to how you run your business today. Enterprise Knowledge gives agents a way to query this repository during a conversation and ground their responses in your actual approved source material. This skill covers provisioning a Knowledge Base and uploading knowledge sources from web URLs, PDFs, and raw text, and running semantic search to retrieve relevant chunks at runtime. Enterprise Knowledge is shared across your organization — it captures what your organization knows and how it is meant to run. It is distinct from Conversation Memory (twilio-customer-memory), which is scoped to individual end-customers and captures what you know about a specific person. The two are designed to be combined: enterprise content for business practices, customer memory for personalization.","zfifteen\u002Fskills-catalog","zfifteen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221906715?v=4","01M79CQFXDZM5J5CJTCECPFA66","Dionisio Alberto Lopez III","01M79CQFY4C62PN8A2T5KDAHGA",1,"MIT","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Ftwilio-enterprise-knowledge\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: twilio-enterprise-knowledge\ndescription: >\n  Add knowledge retrieval to AI agents using Twilio's Enterprise Knowledge\n  product. Enterprise Knowledge is a centralized, searchable repository of your\n  organization's documents, websites, and content — FAQs, support policies,\n  warranty terms, product catalogs. Current models don't have access to how you\n  run your business today. Enterprise Knowledge gives agents a way to query this\n  repository during a conversation and ground their responses in your actual\n  approved source material. This skill covers provisioning a Knowledge Base and\n  uploading knowledge sources from web URLs, PDFs, and raw text, and running\n  semantic search to retrieve relevant chunks at runtime. Enterprise Knowledge is\n  shared across your organization — it captures what your organization knows and\n  how it is meant to run. It is distinct from Conversation Memory\n  (twilio-customer-memory), which is scoped to individual end-customers and\n  captures what you know about a specific person. The two are designed to be\n  combined: enterprise content for business practices, customer memory for\n  personalization.\n---\n\n## Overview\n\nEnterprise Knowledge gives AI and human agents access to your organization's actual source material during a conversation — FAQs, warranty policies, support scripts, product catalogs. Models trained on general data don't know how your business operates today; Enterprise Knowledge closes that gap by letting agents query a searchable repository of your approved content and inject accurate, up-to-date answers rather than hallucinated ones.\n\n```\nYour content (web\u002FPDF\u002Ftext) → Knowledge Base → Indexed chunks\nAgent query → Search → Ranked chunks → Inject into LLM prompt\n```\n\nEnterprise Knowledge is shared across your organization and captures institutional content: how your products work, what your policies say, what your agents are supposed to do. It is distinct from Conversation Memory, which is scoped to individual end-customers. The two are designed to be combined — enterprise content for accuracy and business practices, customer memory for personalization.\n\n**Auth: Basic Auth** — `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN`.\n\n---\n\n## Prerequisites\n\n- Twilio account with Enterprise Knowledge access (requires enablement)\n  — New to Twilio? See `twilio-account-setup`\n- `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN` — see `twilio-iam-auth-setup`\n\n---\n\n## Quickstart\n\n### Step 1 — Create a Knowledge Base\n\nKnowledge Bases are containers for knowledge sources. Creation is async — returns 202, poll the `Location` header until `status: ACTIVE`.\n\n**Python**\n```python\nimport os, requests, time\n\naccount_sid = os.environ[\"TWILIO_ACCOUNT_SID\"]\nauth_token = os.environ[\"TWILIO_AUTH_TOKEN\"]\n\nres = requests.post(\n    \"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FControlPlane\u002FKnowledgeBases\",\n    auth=(account_sid, auth_token),\n    json={\n        \"displayName\": \"product-docs\",          # alphanumeric + hyphens only\n        \"description\": \"Product documentation for customer support agents\"\n    }\n)\n\noperation_url = res.headers[\"Location\"]\n\n# Poll until ready\nwhile True:\n    kb = requests.get(operation_url, auth=(account_sid, auth_token)).json()\n    if kb.get(\"status\") == \"ACTIVE\":\n        kb_id = kb[\"id\"]\n        break\n    if kb.get(\"status\") == \"FAILED\":\n        raise Exception(\"Knowledge Base creation failed\")\n    time.sleep(2)\n\nprint(kb_id)\n```\n\n**Node.js**\n```javascript\nconst accountSid = process.env.TWILIO_ACCOUNT_SID;\nconst authToken = process.env.TWILIO_AUTH_TOKEN;\nconst authHeader = \"Basic \" + btoa(`${accountSid}:${authToken}`);\n\nconst res = await fetch(\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FControlPlane\u002FKnowledgeBases\", {\n    method: \"POST\",\n    headers: {\n        \"Authorization\": authHeader,\n        \"Content-Type\": \"application\u002Fjson\",\n    },\n    body: JSON.stringify({\n        displayName: \"product-docs\",\n        description: \"Product documentation for customer support agents\",\n    }),\n});\n\nconst operationUrl = res.headers.get(\"Location\");\n\nlet kbId;\nwhile (true) {\n    const kb = await fetch(operationUrl, {\n        headers: { \"Authorization\": authHeader },\n    }).then(r => r.json());\n    if (kb.status === \"ACTIVE\") { kbId = kb.id; break; }\n    if (kb.status === \"FAILED\") throw new Error(\"Knowledge Base creation failed\");\n    await new Promise(r => setTimeout(r, 2000));\n}\n```\n\n### Step 2 — Add a Knowledge Source\n\nThree source types: **Web** (crawl a URL), **File** (upload PDF\u002FCSV\u002FMarkdown\u002Ftext), **Text** (inline raw text).\n\n#### Web source\n\n```python\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Product Documentation\",\n        \"description\": \"Public product docs\",\n        \"source\": {\n            \"type\": \"Web\",\n            \"url\": \"https:\u002F\u002Fdocs.example.com\",\n            \"crawlDepth\": 3,           # 1–10, default 2\n            \"crawlPeriod\": \"WEEKLY\"    # WEEKLY | BIWEEKLY | MONTHLY | NEVER\n        }\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\n```\n\n#### File source (PDF, CSV, Markdown, TSV, plain text — max 16MB)\n\n```python\n# Step 1: Create the source — returns a presigned upload URL\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Company Handbook\",\n        \"source\": {\n            \"type\": \"File\",\n            \"fileName\": \"handbook.pdf\",\n            \"fileSize\": 2048576,\n            \"mimeType\": \"application\u002Fpdf\"\n        }\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\nupload_url = knowledge[\"source\"][\"importUrl\"]   # presigned S3 URL\n\n# Step 2: PUT file to presigned URL — no auth header, URL is already signed\nwith open(\"handbook.pdf\", \"rb\") as f:\n    requests.put(upload_url, data=f, headers={\"Content-Type\": \"application\u002Fpdf\"})\n```\n\n#### Text source (inline content, max 185,000 chars)\n\n```python\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Refund Policy\",\n        \"source\": {\n            \"type\": \"Text\",\n            \"content\": \"Our refund policy: customers may return items within 30 days...\"\n        }\n    }\n).json()\n```\n\n### Step 3 — Wait for Processing\n\nKnowledge sources are processed asynchronously. Poll until `status` is `COMPLETED`.\n\n```python\ndef wait_for_knowledge(kb_id, knowledge_id):\n    while True:\n        k = requests.get(\n            f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\",\n            auth=(account_sid, auth_token)\n        ).json()\n        if k[\"status\"] == \"COMPLETED\":\n            return k\n        if k[\"status\"] == \"FAILED\":\n            raise Exception(f\"Knowledge processing failed: {k}\")\n        time.sleep(3)\n\nwait_for_knowledge(kb_id, knowledge_id)\n```\n\nStatuses: `SCHEDULED` → `QUEUED` → `PROCESSING` → `COMPLETED` \u002F `FAILED`\n\n### Step 4 — Search and Inject into LLM\n\n**Python**\n```python\nresults = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\n        \"query\": \"How do I reset my password?\",\n        \"top\": 5,                              # max 20\n        \"knowledgeIds\": [knowledge_id]         # optional — search specific sources\n    }\n).json()\n\nchunks = \"\\n\\n\".join(c[\"content\"] for c in results.get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"You are a helpful support agent.\n\nRelevant knowledge:\n{chunks}\n\nAnswer the customer's question using only the above content.\"\"\"\n```\n\n**Node.js**\n```javascript\nconst results = await fetch(\n    `https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F${kbId}\u002FSearch`,\n    {\n        method: \"POST\",\n        headers: {\n            \"Authorization\": authHeader,\n            \"Content-Type\": \"application\u002Fjson\",\n        },\n        body: JSON.stringify({\n            query: userMessage,\n            top: 5,\n            knowledgeIds: [knowledgeId],\n        }),\n    }\n).then(r => r.json());\n\nconst chunks = results.chunks.map(c => c.content).join(\"\\n\\n\");\nconst systemPrompt = `You are a helpful support agent.\\n\\nRelevant knowledge:\\n${chunks}`;\n```\n\n---\n\n## Key Patterns\n\n### Combine Enterprise Knowledge with Conversation Memory Recall\n\nFor the best agent responses, combine both: Enterprise Knowledge for company content, Recall for individual customer history.\n\n**Python**\n```python\n# Run both in parallel\nrecall_res = requests.post(\n    f\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FServices\u002F{MEMORY_STORE_SID}\u002FProfiles\u002F{profile_id}\u002FRecall\",\n    auth=(account_sid, auth_token),\n    json={\"query\": user_query, \"observationsLimit\": 5}\n)\nsearch_res = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{KB_ID}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\"query\": user_query, \"top\": 3}\n)\n\ncustomer_history = \"\\n\".join(o[\"content\"] for o in recall_res.json().get(\"observations\", []))\nknowledge_chunks = \"\\n\\n\".join(c[\"content\"] for c in search_res.json().get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"Customer history:\n{customer_history}\n\nRelevant documentation:\n{knowledge_chunks}\"\"\"\n```\n\n### Refresh Stale Web Sources\n\nRe-crawl a web source without changing its config:\n\n```python\nrequests.patch(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}?refresh=true\",\n    auth=(account_sid, auth_token),\n    json={}\n)\n# Returns 202 — source re-queued for processing\n```\n\n### Filter Search to Specific Sources\n\nWhen your knowledge base has multiple sources (scripts, FAQs, policies), target search to the relevant one:\n\n```python\nresults = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\n        \"query\": \"cancellation policy\",\n        \"top\": 5,\n        \"knowledgeIds\": [policy_knowledge_id]\n    }\n).json()\n```\n\nOmit `knowledgeIds` to search across all sources in the knowledge base.\n\n### Inspect Processed Chunks\n\nTo audit what got indexed from a source:\n\n```python\nchunks = requests.get(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\u002FChunks\",\n    auth=(account_sid, auth_token),\n    params={\"pageSize\": 50}\n).json()\n\nfor chunk in chunks[\"chunks\"]:\n    print(chunk[\"content\"][:100])\n```\n\n---\n\n## CANNOT\n\n- **Cannot add sources before Knowledge Base is active** — Creation is async (returns 202). Poll `Location` header until `status: ACTIVE`.\n- **Cannot use one host for all operations** — Management is on `memory.twilio.com`; sources and search are on `knowledge.twilio.com`. Wrong host returns 404.\n- **Cannot include auth header when uploading to presigned URL** — `importUrl` is already signed. Adding your auth header will fail.\n- **Cannot use expired presigned URLs** — `uploadExpiration` is typically 1 hour. Upload promptly.\n- **Cannot search before processing completes** — Web crawl and file indexing are async (seconds to minutes). Poll status first.\n- **Cannot use high crawl depth without performance impact** — `crawlDepth` 1–10, default 2. Higher depths dramatically increase processing time.\n- **Cannot exceed 16MB per file upload** — Hard limit\n- **Cannot exceed 185,000 characters per text source** — Hard limit\n- **Cannot retrieve more than 20 search results per query** — `top-K` max is 20\n- **Cannot use spaces or underscores in `displayName`** — Alphanumeric and hyphens only (`^[a-zA-Z0-9-]+$`)\n- **Cannot use Knowledge for customer-specific context** — Knowledge is shared across all customers. Use `twilio-customer-memory` for per-customer context.\n- **Cannot retry FAILED sources** — Delete and recreate. No retry endpoint. Check chunk count after `COMPLETED` to verify extraction.\n\n---\n\n## Next Steps\n\n- **Per-customer context:** `twilio-customer-memory` — combine with Enterprise Knowledge for full agent context (company knowledge + individual customer history)\n- **Conversation Intelligence operators with enterprise context:** `twilio-conversation-intelligence` — feed Enterprise Knowledge chunks into Conversation Intelligence operators to give them business context. Examples:\n  - **Script Adherence:** index your approved call scripts as a knowledge source; the operator can evaluate agent compliance against the retrieved script for the current conversation type\n  - **Custom upsell classifier:** index product offers, pricing tiers, or eligibility rules; a custom classification operator can use retrieved offer details to detect upsell opportunities mid-conversation\n  - **Next Best Response:** retrieved policy or FAQ chunks injected alongside the operator prompt improve suggestion quality\n- **Wire into a voice AI agent:** `twilio-voice-conversation-relay`\n- **TAC SDK integration:** `twilio-agent-connect`\n- **Debug integration issues:** `twilio-debugging-observability`\n","## Overview\n\nEnterprise Knowledge gives AI and human agents access to your organization's actual source material during a conversation — FAQs, warranty policies, support scripts, product catalogs. Models trained on general data don't know how your business operates today; Enterprise Knowledge closes that gap by letting agents query a searchable repository of your approved content and inject accurate, up-to-date answers rather than hallucinated ones.\n\n```\nYour content (web\u002FPDF\u002Ftext) → Knowledge Base → Indexed chunks\nAgent query → Search → Ranked chunks → Inject into LLM prompt\n```\n\nEnterprise Knowledge is shared across your organization and captures institutional content: how your products work, what your policies say, what your agents are supposed to do. It is distinct from Conversation Memory, which is scoped to individual end-customers. The two are designed to be combined — enterprise content for accuracy and business practices, customer memory for personalization.\n\n**Auth: Basic Auth** — `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN`.\n\n---\n\n## Prerequisites\n\n- Twilio account with Enterprise Knowledge access (requires enablement)\n  — New to Twilio? See `twilio-account-setup`\n- `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN` — see `twilio-iam-auth-setup`\n\n---\n\n## Quickstart\n\n### Step 1 — Create a Knowledge Base\n\nKnowledge Bases are containers for knowledge sources. Creation is async — returns 202, poll the `Location` header until `status: ACTIVE`.\n\n**Python**\n```python\nimport os, requests, time\n\naccount_sid = os.environ[\"TWILIO_ACCOUNT_SID\"]\nauth_token = os.environ[\"TWILIO_AUTH_TOKEN\"]\n\nres = requests.post(\n    \"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FControlPlane\u002FKnowledgeBases\",\n    auth=(account_sid, auth_token),\n    json={\n        \"displayName\": \"product-docs\",          # alphanumeric + hyphens only\n        \"description\": \"Product documentation for customer support agents\"\n    }\n)\n\noperation_url = res.headers[\"Location\"]\n\n# Poll until ready\nwhile True:\n    kb = requests.get(operation_url, auth=(account_sid, auth_token)).json()\n    if kb.get(\"status\") == \"ACTIVE\":\n        kb_id = kb[\"id\"]\n        break\n    if kb.get(\"status\") == \"FAILED\":\n        raise Exception(\"Knowledge Base creation failed\")\n    time.sleep(2)\n\nprint(kb_id)\n```\n\n**Node.js**\n```javascript\nconst accountSid = process.env.TWILIO_ACCOUNT_SID;\nconst authToken = process.env.TWILIO_AUTH_TOKEN;\nconst authHeader = \"Basic \" + btoa(`${accountSid}:${authToken}`);\n\nconst res = await fetch(\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FControlPlane\u002FKnowledgeBases\", {\n    method: \"POST\",\n    headers: {\n        \"Authorization\": authHeader,\n        \"Content-Type\": \"application\u002Fjson\",\n    },\n    body: JSON.stringify({\n        displayName: \"product-docs\",\n        description: \"Product documentation for customer support agents\",\n    }),\n});\n\nconst operationUrl = res.headers.get(\"Location\");\n\nlet kbId;\nwhile (true) {\n    const kb = await fetch(operationUrl, {\n        headers: { \"Authorization\": authHeader },\n    }).then(r => r.json());\n    if (kb.status === \"ACTIVE\") { kbId = kb.id; break; }\n    if (kb.status === \"FAILED\") throw new Error(\"Knowledge Base creation failed\");\n    await new Promise(r => setTimeout(r, 2000));\n}\n```\n\n### Step 2 — Add a Knowledge Source\n\nThree source types: **Web** (crawl a URL), **File** (upload PDF\u002FCSV\u002FMarkdown\u002Ftext), **Text** (inline raw text).\n\n#### Web source\n\n```python\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Product Documentation\",\n        \"description\": \"Public product docs\",\n        \"source\": {\n            \"type\": \"Web\",\n            \"url\": \"https:\u002F\u002Fdocs.example.com\",\n            \"crawlDepth\": 3,           # 1–10, default 2\n            \"crawlPeriod\": \"WEEKLY\"    # WEEKLY | BIWEEKLY | MONTHLY | NEVER\n        }\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\n```\n\n#### File source (PDF, CSV, Markdown, TSV, plain text — max 16MB)\n\n```python\n# Step 1: Create the source — returns a presigned upload URL\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Company Handbook\",\n        \"source\": {\n            \"type\": \"File\",\n            \"fileName\": \"handbook.pdf\",\n            \"fileSize\": 2048576,\n            \"mimeType\": \"application\u002Fpdf\"\n        }\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\nupload_url = knowledge[\"source\"][\"importUrl\"]   # presigned S3 URL\n\n# Step 2: PUT file to presigned URL — no auth header, URL is already signed\nwith open(\"handbook.pdf\", \"rb\") as f:\n    requests.put(upload_url, data=f, headers={\"Content-Type\": \"application\u002Fpdf\"})\n```\n\n#### Text source (inline content, max 185,000 chars)\n\n```python\nknowledge = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=(account_sid, auth_token),\n    json={\n        \"name\": \"Refund Policy\",\n        \"source\": {\n            \"type\": \"Text\",\n            \"content\": \"Our refund policy: customers may return items within 30 days...\"\n        }\n    }\n).json()\n```\n\n### Step 3 — Wait for Processing\n\nKnowledge sources are processed asynchronously. Poll until `status` is `COMPLETED`.\n\n```python\ndef wait_for_knowledge(kb_id, knowledge_id):\n    while True:\n        k = requests.get(\n            f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\",\n            auth=(account_sid, auth_token)\n        ).json()\n        if k[\"status\"] == \"COMPLETED\":\n            return k\n        if k[\"status\"] == \"FAILED\":\n            raise Exception(f\"Knowledge processing failed: {k}\")\n        time.sleep(3)\n\nwait_for_knowledge(kb_id, knowledge_id)\n```\n\nStatuses: `SCHEDULED` → `QUEUED` → `PROCESSING` → `COMPLETED` \u002F `FAILED`\n\n### Step 4 — Search and Inject into LLM\n\n**Python**\n```python\nresults = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\n        \"query\": \"How do I reset my password?\",\n        \"top\": 5,                              # max 20\n        \"knowledgeIds\": [knowledge_id]         # optional — search specific sources\n    }\n).json()\n\nchunks = \"\\n\\n\".join(c[\"content\"] for c in results.get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"You are a helpful support agent.\n\nRelevant knowledge:\n{chunks}\n\nAnswer the customer's question using only the above content.\"\"\"\n```\n\n**Node.js**\n```javascript\nconst results = await fetch(\n    `https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F${kbId}\u002FSearch`,\n    {\n        method: \"POST\",\n        headers: {\n            \"Authorization\": authHeader,\n            \"Content-Type\": \"application\u002Fjson\",\n        },\n        body: JSON.stringify({\n            query: userMessage,\n            top: 5,\n            knowledgeIds: [knowledgeId],\n        }),\n    }\n).then(r => r.json());\n\nconst chunks = results.chunks.map(c => c.content).join(\"\\n\\n\");\nconst systemPrompt = `You are a helpful support agent.\\n\\nRelevant knowledge:\\n${chunks}`;\n```\n\n---\n\n## Key Patterns\n\n### Combine Enterprise Knowledge with Conversation Memory Recall\n\nFor the best agent responses, combine both: Enterprise Knowledge for company content, Recall for individual customer history.\n\n**Python**\n```python\n# Run both in parallel\nrecall_res = requests.post(\n    f\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FServices\u002F{MEMORY_STORE_SID}\u002FProfiles\u002F{profile_id}\u002FRecall\",\n    auth=(account_sid, auth_token),\n    json={\"query\": user_query, \"observationsLimit\": 5}\n)\nsearch_res = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{KB_ID}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\"query\": user_query, \"top\": 3}\n)\n\ncustomer_history = \"\\n\".join(o[\"content\"] for o in recall_res.json().get(\"observations\", []))\nknowledge_chunks = \"\\n\\n\".join(c[\"content\"] for c in search_res.json().get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"Customer history:\n{customer_history}\n\nRelevant documentation:\n{knowledge_chunks}\"\"\"\n```\n\n### Refresh Stale Web Sources\n\nRe-crawl a web source without changing its config:\n\n```python\nrequests.patch(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}?refresh=true\",\n    auth=(account_sid, auth_token),\n    json={}\n)\n# Returns 202 — source re-queued for processing\n```\n\n### Filter Search to Specific Sources\n\nWhen your knowledge base has multiple sources (scripts, FAQs, policies), target search to the relevant one:\n\n```python\nresults = requests.post(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=(account_sid, auth_token),\n    json={\n        \"query\": \"cancellation policy\",\n        \"top\": 5,\n        \"knowledgeIds\": [policy_knowledge_id]\n    }\n).json()\n```\n\nOmit `knowledgeIds` to search across all sources in the knowledge base.\n\n### Inspect Processed Chunks\n\nTo audit what got indexed from a source:\n\n```python\nchunks = requests.get(\n    f\"https:\u002F\u002Fknowledge.twilio.com\u002Fv1\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\u002FChunks\",\n    auth=(account_sid, auth_token),\n    params={\"pageSize\": 50}\n).json()\n\nfor chunk in chunks[\"chunks\"]:\n    print(chunk[\"content\"][:100])\n```\n\n---\n\n## CANNOT\n\n- **Cannot add sources before Knowledge Base is active** — Creation is async (returns 202). Poll `Location` header until `status: ACTIVE`.\n- **Cannot use one host for all operations** — Management is on `memory.twilio.com`; sources and search are on `knowledge.twilio.com`. Wrong host returns 404.\n- **Cannot include auth header when uploading to presigned URL** — `importUrl` is already signed. Adding your auth header will fail.\n- **Cannot use expired presigned URLs** — `uploadExpiration` is typically 1 hour. Upload promptly.\n- **Cannot search before processing completes** — Web crawl and file indexing are async (seconds to minutes). Poll status first.\n- **Cannot use high crawl depth without performance impact** — `crawlDepth` 1–10, default 2. Higher depths dramatically increase processing time.\n- **Cannot exceed 16MB per file upload** — Hard limit\n- **Cannot exceed 185,000 characters per text source** — Hard limit\n- **Cannot retrieve more than 20 search results per query** — `top-K` max is 20\n- **Cannot use spaces or underscores in `displayName`** — Alphanumeric and hyphens only (`^[a-zA-Z0-9-]+$`)\n- **Cannot use Knowledge for customer-specific context** — Knowledge is shared across all customers. Use `twilio-customer-memory` for per-customer context.\n- **Cannot retry FAILED sources** — Delete and recreate. No retry endpoint. Check chunk count after `COMPLETED` to verify extraction.\n\n---\n\n## Next Steps\n\n- **Per-customer context:** `twilio-customer-memory` — combine with Enterprise Knowledge for full agent context (company knowledge + individual customer history)\n- **Conversation Intelligence operators with enterprise context:** `twilio-conversation-intelligence` — feed Enterprise Knowledge chunks into Conversation Intelligence operators to give them business context. Examples:\n  - **Script Adherence:** index your approved call scripts as a knowledge source; the operator can evaluate agent compliance against the retrieved script for the current conversation type\n  - **Custom upsell classifier:** index product offers, pricing tiers, or eligibility rules; a custom classification operator can use retrieved offer details to detect upsell opportunities mid-conversation\n  - **Next Best Response:** retrieved policy or FAQ chunks injected alongside the operator prompt improve suggestion quality\n- **Wire into a voice AI agent:** `twilio-voice-conversation-relay`\n- **TAC SDK integration:** `twilio-agent-connect`\n- **Debug integration issues:** `twilio-debugging-observability`\n",{"name":5,"description":7},"main","d9535210da9af28aa76bca80de80355197e1b6d6","skills\u002Ftwilio-enterprise-knowledge","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog","https:\u002F\u002Fgithub.com\u002Fzfifteen","I like to measure things.","2026-07-19 23:41:54",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add zfifteen\u002Fskills-catalog --skill twilio-enterprise-knowledge",{"tool":37,"command":38},"bunx","bunx skills add zfifteen\u002Fskills-catalog --skill twilio-enterprise-knowledge",{"tool":40,"command":41},"pnpm","pnpm dlx skills add zfifteen\u002Fskills-catalog --skill twilio-enterprise-knowledge","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Ftwilio-enterprise-knowledge\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",235,"https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Ftwilio-enterprise-knowledge\u002Fagents\u002Fopenai.yaml",[52,59,66,73,82,89],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M79GXQ2PWPT2E4CJYHXVJ0YE","Zotero","Use Zotero Desktop from Codex to enable\u002Fprobe the local API, search a local Zotero library, list items\u002Fcollections\u002Ftags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text when requested, and import BibTeX\u002FRIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fzotero\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79GXN85NETKBE06865CWK6Z","zoom-apps-sdk","Use when using Apps SDK.","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79GXCYD7FGYS932J9N9RFFY","youtube","Obtain accurate, timestamped YouTube video transcripts (preferring manual captions over auto-generated) as the primary deliverable, then derive summaries, key claims, or notes from that transcript.  Use when the user provides a YouTube URL (or video ID) and wants the transcript, a faithful summary, key claims with attribution, timestamped notes, or \"what does this video actually say\".  The skill is transcript-first: never substitute metadata, title, description, or search snippets for the spoken content.  Triggers: \"youtube transcript\", \"get the transcript of this video\", \"summarize this youtube video\", \"what did they say in https:\u002F\u002Fyoutube.com\u002F...\", \"key claims from this talk\".","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79GX8EXHHYM566BKR7MS778","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M79GX2HFJPX84NMRE5VBTYX9","x-post-creator","Create X-ready post threads and co-located story packages from the active conversation or referenced project material. Use when the user says turn this into an X-post, \u002Fx-post, make this into an X thread, or wants plain-language social posts with supporting images saved to docs\u002Fx-posts\u002F[story-name]\u002F.","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fx-post-creator\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79GWXQT4HBT6QME6QSBZJFA","x-api","Search, read, and write X posts through the local X API MCP server (the same backend used by the Codex x-api skill). Use for searching X\u002Fx.com, reading threads and replies, creating lists, staging\u002Fpublishing posts for @alltheputs, finding high-visibility reply targets for research outreach, ingesting public context, or any request that mentions \u002Fx-api or \"search X\".","https:\u002F\u002Fgithub.com\u002Fzfifteen\u002Fskills-catalog\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]