[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-twilio-twilio-enterprise-knowledge":3,"mdc-6vvnas-key":36,"related-org-twilio-twilio-enterprise-knowledge":6743,"related-repo-twilio-twilio-enterprise-knowledge":6924},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":34,"mdContent":35},"twilio-enterprise-knowledge","add RAG to agents with Twilio Knowledge","Add knowledge retrieval (RAG) to AI agents using Twilio Enterprise Knowledge. Covers provisioning Knowledge Bases, uploading sources from web URLs, PDFs, and raw text, and running semantic search to retrieve relevant chunks at runtime. Use this skill to ground agent responses in your organization's actual approved content — FAQs, policies, product docs — rather than hallucinated answers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"twilio","Twilio","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftwilio.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"PDF","pdf","tag",{"name":17,"slug":18,"type":15},"RAG","rag",{"name":20,"slug":21,"type":15},"Knowledge Base","knowledge-base",{"name":23,"slug":24,"type":15},"Search","search",{"name":9,"slug":8,"type":15},25,"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai","2026-07-17T06:07:51.538339",null,7,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":29},[],"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai\u002Ftree\u002FHEAD\u002Fskills\u002Ftwilio\u002Ftwilio-enterprise-knowledge","---\nname: twilio-enterprise-knowledge\ndescription: >\n  Add knowledge retrieval (RAG) to AI agents using Twilio Enterprise Knowledge.\n  Covers provisioning Knowledge Bases, uploading sources from web URLs, PDFs,\n  and raw text, and running semantic search to retrieve relevant chunks at\n  runtime. Use this skill to ground agent responses in your organization's\n  actual approved content — FAQs, policies, product docs — rather than\n  hallucinated answers.\n---\n\n## Overview\n\nEnterprise Knowledge gives AI agents access to your organization's source material during conversations — FAQs, warranty policies, support scripts, product catalogs. It closes the gap between general model knowledge and how your business actually operates.\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 — it captures institutional content. It is distinct from Conversation Memory (`twilio-conversation-memory`), which is per-customer context. The two are designed to be combined: enterprise content for accuracy, customer memory for personalization.\n\n**Base URL:** `https:\u002F\u002Fknowledge.twilio.com`\n\n**Authentication:** HTTP Basic — `Authorization: Basic {base64(accountSid:authToken)}`\n\n**Rules for agents:**\n- Always poll `statusUrl` after any 202 response — all writes are async\n- Always wait for Knowledge Base status `COMPLETED` before adding sources\n- Always wait for source processing to complete before searching\n- Never use `\u002Fv1\u002F` paths — all routes use `\u002Fv2\u002F` prefix\n- Never include auth headers when uploading to presigned URLs — they're already signed\n- Never use spaces or underscores in `displayName` — pattern is `^[a-zA-Z0-9-]+$`\n- Never exceed 16MB per file upload or 1,048,576 chars per text source\n\n---\n\n## Prerequisites\n\n- Twilio account with Enterprise Knowledge enabled\n  — A credit card must be added to the account\n  — See `twilio-account-setup` for initial setup\n  — See `twilio-iam-auth-setup` for credential best practices\n- Environment variables:\n  - `TWILIO_ACCOUNT_SID`\n  - `TWILIO_AUTH_TOKEN`\n- SDK: `pip install twilio` \u002F `npm install twilio`\n\n---\n\n## Quickstart\n\n**Step 1 — Create a Knowledge Base**\n\n**Python**\n```python\nimport os, requests, time\n\naccount_sid = os.environ[\"TWILIO_ACCOUNT_SID\"]\nauth_token = os.environ[\"TWILIO_AUTH_TOKEN\"]\nbase_url = \"https:\u002F\u002Fknowledge.twilio.com\"\nauth = (account_sid, auth_token)\n\nres = requests.post(\n    f\"{base_url}\u002Fv2\u002FControlPlane\u002FKnowledgeBases\",\n    auth=auth,\n    json={\"displayName\": \"product-docs\", \"description\": \"Support agent knowledge\"}\n)\n\nstatus_url = res.json()[\"statusUrl\"]\n\nwhile True:\n    op = requests.get(status_url, auth=auth).json()\n    if op[\"status\"] == \"COMPLETED\":\n        kb_id = op[\"result\"][\"id\"]\n        break\n    if op[\"status\"] == \"FAILED\":\n        raise Exception(op[\"error\"][\"detail\"])\n    time.sleep(2)\n\nprint(kb_id)  # know_knowledgebase_xxx\n```\n\n**Node.js**\n```javascript\nconst accountSid = process.env.TWILIO_ACCOUNT_SID;\nconst authToken = process.env.TWILIO_AUTH_TOKEN;\nconst baseUrl = \"https:\u002F\u002Fknowledge.twilio.com\";\nconst authHeader = \"Basic \" + btoa(`${accountSid}:${authToken}`);\nconst headers = { \"Authorization\": authHeader, \"Content-Type\": \"application\u002Fjson\" };\n\nconst res = await fetch(`${baseUrl}\u002Fv2\u002FControlPlane\u002FKnowledgeBases`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ displayName: \"product-docs\", description: \"Support agent knowledge\" }),\n});\n\nconst { statusUrl } = await res.json();\n\nlet kbId;\nwhile (true) {\n    const op = await fetch(statusUrl, { headers: { \"Authorization\": authHeader } }).then(r => r.json());\n    if (op.status === \"COMPLETED\") { kbId = op.result.id; break; }\n    if (op.status === \"FAILED\") throw new Error(op.error.detail);\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, max 16MB), **Text** (inline, max 1,048,576 chars).\n\n**Python**\n```python\nknowledge = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=auth,\n    json={\n        \"name\": \"Product Documentation\",\n        \"description\": \"Public product docs\",\n        \"source\": {\"type\": \"Web\", \"url\": \"https:\u002F\u002Fdocs.example.com\", \"crawlDepth\": 3}\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\n```\n\n**Node.js**\n```javascript\nconst knowledge = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({\n        name: \"Product Documentation\",\n        description: \"Public product docs\",\n        source: { type: \"Web\", url: \"https:\u002F\u002Fdocs.example.com\", crawlDepth: 3 },\n    }),\n}).then(r => r.json());\n\nconst knowledgeId = knowledge.id;\n```\n\n**Step 3 — Wait for processing**\n\nSources are processed asynchronously. Poll until `status` is `COMPLETED`.\n\n**Python**\n```python\nwhile True:\n    k = requests.get(\n        f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\", auth=auth\n    ).json()\n    if k[\"status\"] == \"COMPLETED\":\n        break\n    if k[\"status\"] == \"FAILED\":\n        raise Exception(f\"Processing failed: {k}\")\n    time.sleep(3)\n```\n\n**Node.js**\n```javascript\nwhile (true) {\n    const k = await fetch(\n        `${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}`,\n        { headers: { \"Authorization\": authHeader } }\n    ).then(r => r.json());\n    if (k.status === \"COMPLETED\") break;\n    if (k.status === \"FAILED\") throw new Error(JSON.stringify(k));\n    await new Promise(r => setTimeout(r, 3000));\n}\n```\n\nStatuses: `SCHEDULED` → `QUEUED` → `PROCESSING` → `COMPLETED` \u002F `FAILED`\n\n**Step 4 — Search and inject into LLM prompt**\n\n**Python**\n```python\nresults = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": \"How do I reset my password?\", \"top\": 5}\n).json()\n\nchunks = \"\\n\\n\".join(c[\"content\"] for c in results[\"chunks\"])\n\nsystem_prompt = f\"\"\"You are a helpful support agent.\n\nRelevant knowledge:\n{chunks}\n\nAnswer using only the above content.\"\"\"\n```\n\n**Node.js**\n```javascript\nconst results = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ query: \"How do I reset my password?\", top: 5 }),\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 with Conversation Memory\n\nFor the best agent responses, combine Enterprise Knowledge (company content) with Conversation Memory Recall (individual customer history).\n\n**Python**\n```python\nrecall_res = requests.post(\n    f\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F{store_id}\u002FProfiles\u002F{profile_id}\u002FRecall\",\n    auth=auth,\n    json={\"query\": user_query, \"observationsLimit\": 5}\n).json()\n\nsearch_res = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": user_query, \"top\": 3}\n).json()\n\ncustomer_context = \"\\n\".join(o[\"content\"] for o in recall_res.get(\"observations\", []))\nknowledge = \"\\n\\n\".join(c[\"content\"] for c in search_res.get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"Customer history:\\n{customer_context}\\n\\nDocumentation:\\n{knowledge}\"\"\"\n```\n\n**Node.js**\n```javascript\nconst [recallRes, searchRes] = await Promise.all([\n    fetch(`https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F${storeId}\u002FProfiles\u002F${profileId}\u002FRecall`, {\n        method: \"POST\",\n        headers,\n        body: JSON.stringify({ query: userQuery, observationsLimit: 5 }),\n    }).then(r => r.json()),\n    fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n        method: \"POST\",\n        headers,\n        body: JSON.stringify({ query: userQuery, top: 3 }),\n    }).then(r => r.json()),\n]);\n\nconst customerContext = recallRes.observations.map(o => o.content).join(\"\\n\");\nconst knowledge = searchRes.chunks.map(c => c.content).join(\"\\n\\n\");\n```\n\n### File Upload (PDF\u002FCSV\u002FMarkdown)\n\nFile sources return a presigned URL. Upload the file there — do not include auth headers.\n\n**Python**\n```python\nknowledge = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=auth,\n    json={\"name\": \"Handbook\", \"description\": \"Employee handbook\", \"source\": {\"type\": \"File\"}}\n).json()\n\nupload_url = knowledge[\"source\"][\"importUrl\"]\n\nwith open(\"handbook.pdf\", \"rb\") as f:\n    requests.put(upload_url, data=f, headers={\"Content-Type\": \"application\u002Fpdf\"})\n```\n\n**Node.js**\n```javascript\nconst knowledge = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ name: \"Handbook\", description: \"Employee handbook\", source: { type: \"File\" } }),\n}).then(r => r.json());\n\nconst file = await fs.promises.readFile(\"handbook.pdf\");\nawait fetch(knowledge.source.importUrl, {\n    method: \"PUT\",\n    headers: { \"Content-Type\": \"application\u002Fpdf\" },\n    body: file,\n});\n```\n\n### Filter Search to Specific Sources\n\nWhen your Knowledge Base has multiple sources, target search to specific ones:\n\n**Python**\n```python\nresults = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": \"cancellation policy\", \"top\": 5, \"knowledgeIds\": [policy_source_id]}\n).json()\n\nfor chunk in results[\"chunks\"]:\n    print(f\"[{chunk['score']:.3f}] {chunk['content'][:100]}\")\n```\n\n**Node.js**\n```javascript\nconst results = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ query: \"cancellation policy\", top: 5, knowledgeIds: [policySourceId] }),\n}).then(r => r.json());\n\nfor (const chunk of results.chunks) {\n    console.log(`[${chunk.score.toFixed(3)}] ${chunk.content.slice(0, 100)}`);\n}\n```\n\nOmit `knowledgeIds` to search across all sources. Max 100 IDs per request.\n\n### Refresh a Web Source\n\nRe-crawl without changing config. Set `crawlPeriod` for automatic recrawling.\n\n**Python**\n```python\nrequests.patch(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}?refresh=true\",\n    auth=auth,\n    json={\"name\": \"Product Documentation\"}\n)\n\nrequests.patch(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\",\n    auth=auth,\n    json={\"name\": \"Product Documentation\", \"source\": {\"type\": \"Web\", \"crawlPeriod\": \"WEEKLY\"}}\n)\n```\n\n**Node.js**\n```javascript\nawait fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}?refresh=true`, {\n    method: \"PATCH\",\n    headers,\n    body: JSON.stringify({ name: \"Product Documentation\" }),\n});\n\nawait fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}`, {\n    method: \"PATCH\",\n    headers,\n    body: JSON.stringify({ name: \"Product Documentation\", source: { type: \"Web\", crawlPeriod: \"WEEKLY\" } }),\n});\n```\n\nCrawl period options: `WEEKLY` | `BIWEEKLY` | `MONTHLY` | `NEVER`\n\n### Inspect Chunks\n\nAudit what was indexed from a source:\n\n**Python**\n```python\nchunks = requests.get(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\u002FChunks\",\n    auth=auth,\n    params={\"pageSize\": 50}\n).json()\n\nfor chunk in chunks[\"chunks\"]:\n    print(f\"[{chunk['metadata']['sourceType']}] {chunk['content'][:100]}\")\n```\n\n**Node.js**\n```javascript\nconst chunks = await fetch(\n    `${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}\u002FChunks?pageSize=50`,\n    { headers: { \"Authorization\": authHeader } }\n).then(r => r.json());\n\nfor (const chunk of chunks.chunks) {\n    console.log(`[${chunk.metadata.sourceType}] ${chunk.content.slice(0, 100)}`);\n}\n```\n\nPaginate with `pageToken` from `chunks.meta.nextToken`.\n\n---\n\n## CANNOT\n\n- Cannot exceed 5 Knowledge Bases per account\n- Cannot exceed 10 knowledge sources per Knowledge Base\n- Cannot add sources before Knowledge Base is active — poll `statusUrl` until `COMPLETED`\n- Cannot use v1 endpoints — all routes use `\u002Fv2\u002F` prefix on `knowledge.twilio.com`\n- Cannot include auth header when uploading to presigned URL — `importUrl` is already signed\n- Cannot search before source processing completes — poll source status first\n- Cannot exceed 16 MiB (16,777,216 bytes) per file upload\n- Cannot exceed 1,048,576 characters (~1MB) per text source pushed via API\n- Cannot exceed 2048 characters in a search query\n- Cannot exceed 2048 characters in a web source URL\n- Cannot retrieve more than 20 search results per query (`top` max is 20)\n- Cannot exceed 100 `knowledgeIds` in a search filter\n- Cannot set crawl depth beyond 1–10 levels for web sources\n- Cannot use custom crawl schedules — locked to fixed intervals: `WEEKLY`, `BIWEEKLY`, `MONTHLY`, or `NEVER`\n- Cannot use spaces or underscores in `displayName` — alphanumeric and hyphens only\n- Cannot use `name` longer than 30 characters for knowledge sources\n- Cannot modify immutable fields (`id`, `type`, `status`, `url`, `createdAt`, `updatedAt`) via PATCH\n- Cannot use Knowledge for per-customer context — use `twilio-conversation-memory` for that\n\n---\n\n## Next Steps\n\n- **Per-customer context:** `twilio-conversation-memory` — combine with Enterprise Knowledge for full agent context\n- **Background transcript intelligence:** `twilio-conversation-intelligence`\n- **Voice agent with ConversationRelay:** `twilio-voice-conversation-relay`\n- **TAC SDK integration:** `twilio-agent-connect`\n- **Debug integration issues:** `twilio-debugging-observability`\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,50,56,69,82,99,115,123,209,213,219,288,291,297,305,313,544,552,1588,1596,1622,1629,1722,1729,2131,2139,2157,2164,2241,2248,2661,2699,2707,2714,2827,2834,3249,3252,3258,3265,3270,3277,3404,3411,4130,4136,4141,4148,4229,4236,4763,4769,4774,4781,4847,4854,5315,5328,5334,5347,5354,5443,5450,5906,5938,5944,5949,5956,6024,6031,6392,6412,6415,6421,6649,6652,6658,6737],{"type":42,"tag":43,"props":44,"children":46},"element","h2",{"id":45},"overview",[47],{"type":48,"value":49},"text","Overview",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54],{"type":48,"value":55},"Enterprise Knowledge gives AI agents access to your organization's source material during conversations — FAQs, warranty policies, support scripts, product catalogs. It closes the gap between general model knowledge and how your business actually operates.",{"type":42,"tag":57,"props":58,"children":62},"pre",{"className":59,"code":61,"language":48},[60],"language-text","Your content (web\u002FPDF\u002Ftext) → Knowledge Base → Indexed chunks\nAgent query → Search → Ranked chunks → Inject into LLM prompt\n",[63],{"type":42,"tag":64,"props":65,"children":67},"code",{"__ignoreMap":66},"",[68],{"type":48,"value":61},{"type":42,"tag":51,"props":70,"children":71},{},[72,74,80],{"type":48,"value":73},"Enterprise Knowledge is shared across your organization — it captures institutional content. It is distinct from Conversation Memory (",{"type":42,"tag":64,"props":75,"children":77},{"className":76},[],[78],{"type":48,"value":79},"twilio-conversation-memory",{"type":48,"value":81},"), which is per-customer context. The two are designed to be combined: enterprise content for accuracy, customer memory for personalization.",{"type":42,"tag":51,"props":83,"children":84},{},[85,91,93],{"type":42,"tag":86,"props":87,"children":88},"strong",{},[89],{"type":48,"value":90},"Base URL:",{"type":48,"value":92}," ",{"type":42,"tag":64,"props":94,"children":96},{"className":95},[],[97],{"type":48,"value":98},"https:\u002F\u002Fknowledge.twilio.com",{"type":42,"tag":51,"props":100,"children":101},{},[102,107,109],{"type":42,"tag":86,"props":103,"children":104},{},[105],{"type":48,"value":106},"Authentication:",{"type":48,"value":108}," HTTP Basic — ",{"type":42,"tag":64,"props":110,"children":112},{"className":111},[],[113],{"type":48,"value":114},"Authorization: Basic {base64(accountSid:authToken)}",{"type":42,"tag":51,"props":116,"children":117},{},[118],{"type":42,"tag":86,"props":119,"children":120},{},[121],{"type":48,"value":122},"Rules for agents:",{"type":42,"tag":124,"props":125,"children":126},"ul",{},[127,141,154,159,180,185,204],{"type":42,"tag":128,"props":129,"children":130},"li",{},[131,133,139],{"type":48,"value":132},"Always poll ",{"type":42,"tag":64,"props":134,"children":136},{"className":135},[],[137],{"type":48,"value":138},"statusUrl",{"type":48,"value":140}," after any 202 response — all writes are async",{"type":42,"tag":128,"props":142,"children":143},{},[144,146,152],{"type":48,"value":145},"Always wait for Knowledge Base status ",{"type":42,"tag":64,"props":147,"children":149},{"className":148},[],[150],{"type":48,"value":151},"COMPLETED",{"type":48,"value":153}," before adding sources",{"type":42,"tag":128,"props":155,"children":156},{},[157],{"type":48,"value":158},"Always wait for source processing to complete before searching",{"type":42,"tag":128,"props":160,"children":161},{},[162,164,170,172,178],{"type":48,"value":163},"Never use ",{"type":42,"tag":64,"props":165,"children":167},{"className":166},[],[168],{"type":48,"value":169},"\u002Fv1\u002F",{"type":48,"value":171}," paths — all routes use ",{"type":42,"tag":64,"props":173,"children":175},{"className":174},[],[176],{"type":48,"value":177},"\u002Fv2\u002F",{"type":48,"value":179}," prefix",{"type":42,"tag":128,"props":181,"children":182},{},[183],{"type":48,"value":184},"Never include auth headers when uploading to presigned URLs — they're already signed",{"type":42,"tag":128,"props":186,"children":187},{},[188,190,196,198],{"type":48,"value":189},"Never use spaces or underscores in ",{"type":42,"tag":64,"props":191,"children":193},{"className":192},[],[194],{"type":48,"value":195},"displayName",{"type":48,"value":197}," — pattern is ",{"type":42,"tag":64,"props":199,"children":201},{"className":200},[],[202],{"type":48,"value":203},"^[a-zA-Z0-9-]+$",{"type":42,"tag":128,"props":205,"children":206},{},[207],{"type":48,"value":208},"Never exceed 16MB per file upload or 1,048,576 chars per text source",{"type":42,"tag":210,"props":211,"children":212},"hr",{},[],{"type":42,"tag":43,"props":214,"children":216},{"id":215},"prerequisites",[217],{"type":48,"value":218},"Prerequisites",{"type":42,"tag":124,"props":220,"children":221},{},[222,243,269],{"type":42,"tag":128,"props":223,"children":224},{},[225,227,233,235,241],{"type":48,"value":226},"Twilio account with Enterprise Knowledge enabled\n— A credit card must be added to the account\n— See ",{"type":42,"tag":64,"props":228,"children":230},{"className":229},[],[231],{"type":48,"value":232},"twilio-account-setup",{"type":48,"value":234}," for initial setup\n— See ",{"type":42,"tag":64,"props":236,"children":238},{"className":237},[],[239],{"type":48,"value":240},"twilio-iam-auth-setup",{"type":48,"value":242}," for credential best practices",{"type":42,"tag":128,"props":244,"children":245},{},[246,248],{"type":48,"value":247},"Environment variables:\n",{"type":42,"tag":124,"props":249,"children":250},{},[251,260],{"type":42,"tag":128,"props":252,"children":253},{},[254],{"type":42,"tag":64,"props":255,"children":257},{"className":256},[],[258],{"type":48,"value":259},"TWILIO_ACCOUNT_SID",{"type":42,"tag":128,"props":261,"children":262},{},[263],{"type":42,"tag":64,"props":264,"children":266},{"className":265},[],[267],{"type":48,"value":268},"TWILIO_AUTH_TOKEN",{"type":42,"tag":128,"props":270,"children":271},{},[272,274,280,282],{"type":48,"value":273},"SDK: ",{"type":42,"tag":64,"props":275,"children":277},{"className":276},[],[278],{"type":48,"value":279},"pip install twilio",{"type":48,"value":281}," \u002F ",{"type":42,"tag":64,"props":283,"children":285},{"className":284},[],[286],{"type":48,"value":287},"npm install twilio",{"type":42,"tag":210,"props":289,"children":290},{},[],{"type":42,"tag":43,"props":292,"children":294},{"id":293},"quickstart",[295],{"type":48,"value":296},"Quickstart",{"type":42,"tag":51,"props":298,"children":299},{},[300],{"type":42,"tag":86,"props":301,"children":302},{},[303],{"type":48,"value":304},"Step 1 — Create a Knowledge Base",{"type":42,"tag":51,"props":306,"children":307},{},[308],{"type":42,"tag":86,"props":309,"children":310},{},[311],{"type":48,"value":312},"Python",{"type":42,"tag":57,"props":314,"children":318},{"className":315,"code":316,"language":317,"meta":66,"style":66},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import os, requests, time\n\naccount_sid = os.environ[\"TWILIO_ACCOUNT_SID\"]\nauth_token = os.environ[\"TWILIO_AUTH_TOKEN\"]\nbase_url = \"https:\u002F\u002Fknowledge.twilio.com\"\nauth = (account_sid, auth_token)\n\nres = requests.post(\n    f\"{base_url}\u002Fv2\u002FControlPlane\u002FKnowledgeBases\",\n    auth=auth,\n    json={\"displayName\": \"product-docs\", \"description\": \"Support agent knowledge\"}\n)\n\nstatus_url = res.json()[\"statusUrl\"]\n\nwhile True:\n    op = requests.get(status_url, auth=auth).json()\n    if op[\"status\"] == \"COMPLETED\":\n        kb_id = op[\"result\"][\"id\"]\n        break\n    if op[\"status\"] == \"FAILED\":\n        raise Exception(op[\"error\"][\"detail\"])\n    time.sleep(2)\n\nprint(kb_id)  # know_knowledgebase_xxx\n","python",[319],{"type":42,"tag":64,"props":320,"children":321},{"__ignoreMap":66},[322,333,343,352,361,370,379,386,395,404,413,422,431,439,448,456,465,474,483,492,501,510,519,528,536],{"type":42,"tag":323,"props":324,"children":327},"span",{"class":325,"line":326},"line",1,[328],{"type":42,"tag":323,"props":329,"children":330},{},[331],{"type":48,"value":332},"import os, requests, time\n",{"type":42,"tag":323,"props":334,"children":336},{"class":325,"line":335},2,[337],{"type":42,"tag":323,"props":338,"children":340},{"emptyLinePlaceholder":339},true,[341],{"type":48,"value":342},"\n",{"type":42,"tag":323,"props":344,"children":346},{"class":325,"line":345},3,[347],{"type":42,"tag":323,"props":348,"children":349},{},[350],{"type":48,"value":351},"account_sid = os.environ[\"TWILIO_ACCOUNT_SID\"]\n",{"type":42,"tag":323,"props":353,"children":355},{"class":325,"line":354},4,[356],{"type":42,"tag":323,"props":357,"children":358},{},[359],{"type":48,"value":360},"auth_token = os.environ[\"TWILIO_AUTH_TOKEN\"]\n",{"type":42,"tag":323,"props":362,"children":364},{"class":325,"line":363},5,[365],{"type":42,"tag":323,"props":366,"children":367},{},[368],{"type":48,"value":369},"base_url = \"https:\u002F\u002Fknowledge.twilio.com\"\n",{"type":42,"tag":323,"props":371,"children":373},{"class":325,"line":372},6,[374],{"type":42,"tag":323,"props":375,"children":376},{},[377],{"type":48,"value":378},"auth = (account_sid, auth_token)\n",{"type":42,"tag":323,"props":380,"children":381},{"class":325,"line":30},[382],{"type":42,"tag":323,"props":383,"children":384},{"emptyLinePlaceholder":339},[385],{"type":48,"value":342},{"type":42,"tag":323,"props":387,"children":389},{"class":325,"line":388},8,[390],{"type":42,"tag":323,"props":391,"children":392},{},[393],{"type":48,"value":394},"res = requests.post(\n",{"type":42,"tag":323,"props":396,"children":398},{"class":325,"line":397},9,[399],{"type":42,"tag":323,"props":400,"children":401},{},[402],{"type":48,"value":403},"    f\"{base_url}\u002Fv2\u002FControlPlane\u002FKnowledgeBases\",\n",{"type":42,"tag":323,"props":405,"children":407},{"class":325,"line":406},10,[408],{"type":42,"tag":323,"props":409,"children":410},{},[411],{"type":48,"value":412},"    auth=auth,\n",{"type":42,"tag":323,"props":414,"children":416},{"class":325,"line":415},11,[417],{"type":42,"tag":323,"props":418,"children":419},{},[420],{"type":48,"value":421},"    json={\"displayName\": \"product-docs\", \"description\": \"Support agent knowledge\"}\n",{"type":42,"tag":323,"props":423,"children":425},{"class":325,"line":424},12,[426],{"type":42,"tag":323,"props":427,"children":428},{},[429],{"type":48,"value":430},")\n",{"type":42,"tag":323,"props":432,"children":434},{"class":325,"line":433},13,[435],{"type":42,"tag":323,"props":436,"children":437},{"emptyLinePlaceholder":339},[438],{"type":48,"value":342},{"type":42,"tag":323,"props":440,"children":442},{"class":325,"line":441},14,[443],{"type":42,"tag":323,"props":444,"children":445},{},[446],{"type":48,"value":447},"status_url = res.json()[\"statusUrl\"]\n",{"type":42,"tag":323,"props":449,"children":451},{"class":325,"line":450},15,[452],{"type":42,"tag":323,"props":453,"children":454},{"emptyLinePlaceholder":339},[455],{"type":48,"value":342},{"type":42,"tag":323,"props":457,"children":459},{"class":325,"line":458},16,[460],{"type":42,"tag":323,"props":461,"children":462},{},[463],{"type":48,"value":464},"while True:\n",{"type":42,"tag":323,"props":466,"children":468},{"class":325,"line":467},17,[469],{"type":42,"tag":323,"props":470,"children":471},{},[472],{"type":48,"value":473},"    op = requests.get(status_url, auth=auth).json()\n",{"type":42,"tag":323,"props":475,"children":477},{"class":325,"line":476},18,[478],{"type":42,"tag":323,"props":479,"children":480},{},[481],{"type":48,"value":482},"    if op[\"status\"] == \"COMPLETED\":\n",{"type":42,"tag":323,"props":484,"children":486},{"class":325,"line":485},19,[487],{"type":42,"tag":323,"props":488,"children":489},{},[490],{"type":48,"value":491},"        kb_id = op[\"result\"][\"id\"]\n",{"type":42,"tag":323,"props":493,"children":495},{"class":325,"line":494},20,[496],{"type":42,"tag":323,"props":497,"children":498},{},[499],{"type":48,"value":500},"        break\n",{"type":42,"tag":323,"props":502,"children":504},{"class":325,"line":503},21,[505],{"type":42,"tag":323,"props":506,"children":507},{},[508],{"type":48,"value":509},"    if op[\"status\"] == \"FAILED\":\n",{"type":42,"tag":323,"props":511,"children":513},{"class":325,"line":512},22,[514],{"type":42,"tag":323,"props":515,"children":516},{},[517],{"type":48,"value":518},"        raise Exception(op[\"error\"][\"detail\"])\n",{"type":42,"tag":323,"props":520,"children":522},{"class":325,"line":521},23,[523],{"type":42,"tag":323,"props":524,"children":525},{},[526],{"type":48,"value":527},"    time.sleep(2)\n",{"type":42,"tag":323,"props":529,"children":531},{"class":325,"line":530},24,[532],{"type":42,"tag":323,"props":533,"children":534},{"emptyLinePlaceholder":339},[535],{"type":48,"value":342},{"type":42,"tag":323,"props":537,"children":538},{"class":325,"line":26},[539],{"type":42,"tag":323,"props":540,"children":541},{},[542],{"type":48,"value":543},"print(kb_id)  # know_knowledgebase_xxx\n",{"type":42,"tag":51,"props":545,"children":546},{},[547],{"type":42,"tag":86,"props":548,"children":549},{},[550],{"type":48,"value":551},"Node.js",{"type":42,"tag":57,"props":553,"children":557},{"className":554,"code":555,"language":556,"meta":66,"style":66},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const accountSid = process.env.TWILIO_ACCOUNT_SID;\nconst authToken = process.env.TWILIO_AUTH_TOKEN;\nconst baseUrl = \"https:\u002F\u002Fknowledge.twilio.com\";\nconst authHeader = \"Basic \" + btoa(`${accountSid}:${authToken}`);\nconst headers = { \"Authorization\": authHeader, \"Content-Type\": \"application\u002Fjson\" };\n\nconst res = await fetch(`${baseUrl}\u002Fv2\u002FControlPlane\u002FKnowledgeBases`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ displayName: \"product-docs\", description: \"Support agent knowledge\" }),\n});\n\nconst { statusUrl } = await res.json();\n\nlet kbId;\nwhile (true) {\n    const op = await fetch(statusUrl, { headers: { \"Authorization\": authHeader } }).then(r => r.json());\n    if (op.status === \"COMPLETED\") { kbId = op.result.id; break; }\n    if (op.status === \"FAILED\") throw new Error(op.error.detail);\n    await new Promise(r => setTimeout(r, 2000));\n}\n","javascript",[558],{"type":42,"tag":64,"props":559,"children":560},{"__ignoreMap":66},[561,610,650,685,774,858,865,928,958,970,1066,1081,1088,1140,1147,1164,1193,1325,1425,1518,1580],{"type":42,"tag":323,"props":562,"children":563},{"class":325,"line":326},[564,570,576,582,587,592,597,601,605],{"type":42,"tag":323,"props":565,"children":567},{"style":566},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[568],{"type":48,"value":569},"const",{"type":42,"tag":323,"props":571,"children":573},{"style":572},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[574],{"type":48,"value":575}," accountSid ",{"type":42,"tag":323,"props":577,"children":579},{"style":578},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[580],{"type":48,"value":581},"=",{"type":42,"tag":323,"props":583,"children":584},{"style":572},[585],{"type":48,"value":586}," process",{"type":42,"tag":323,"props":588,"children":589},{"style":578},[590],{"type":48,"value":591},".",{"type":42,"tag":323,"props":593,"children":594},{"style":572},[595],{"type":48,"value":596},"env",{"type":42,"tag":323,"props":598,"children":599},{"style":578},[600],{"type":48,"value":591},{"type":42,"tag":323,"props":602,"children":603},{"style":572},[604],{"type":48,"value":259},{"type":42,"tag":323,"props":606,"children":607},{"style":578},[608],{"type":48,"value":609},";\n",{"type":42,"tag":323,"props":611,"children":612},{"class":325,"line":335},[613,617,622,626,630,634,638,642,646],{"type":42,"tag":323,"props":614,"children":615},{"style":566},[616],{"type":48,"value":569},{"type":42,"tag":323,"props":618,"children":619},{"style":572},[620],{"type":48,"value":621}," authToken ",{"type":42,"tag":323,"props":623,"children":624},{"style":578},[625],{"type":48,"value":581},{"type":42,"tag":323,"props":627,"children":628},{"style":572},[629],{"type":48,"value":586},{"type":42,"tag":323,"props":631,"children":632},{"style":578},[633],{"type":48,"value":591},{"type":42,"tag":323,"props":635,"children":636},{"style":572},[637],{"type":48,"value":596},{"type":42,"tag":323,"props":639,"children":640},{"style":578},[641],{"type":48,"value":591},{"type":42,"tag":323,"props":643,"children":644},{"style":572},[645],{"type":48,"value":268},{"type":42,"tag":323,"props":647,"children":648},{"style":578},[649],{"type":48,"value":609},{"type":42,"tag":323,"props":651,"children":652},{"class":325,"line":345},[653,657,662,666,671,676,681],{"type":42,"tag":323,"props":654,"children":655},{"style":566},[656],{"type":48,"value":569},{"type":42,"tag":323,"props":658,"children":659},{"style":572},[660],{"type":48,"value":661}," baseUrl ",{"type":42,"tag":323,"props":663,"children":664},{"style":578},[665],{"type":48,"value":581},{"type":42,"tag":323,"props":667,"children":668},{"style":578},[669],{"type":48,"value":670}," \"",{"type":42,"tag":323,"props":672,"children":674},{"style":673},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[675],{"type":48,"value":98},{"type":42,"tag":323,"props":677,"children":678},{"style":578},[679],{"type":48,"value":680},"\"",{"type":42,"tag":323,"props":682,"children":683},{"style":578},[684],{"type":48,"value":609},{"type":42,"tag":323,"props":686,"children":687},{"class":325,"line":354},[688,692,697,701,705,710,714,719,725,730,735,740,745,750,755,760,765,770],{"type":42,"tag":323,"props":689,"children":690},{"style":566},[691],{"type":48,"value":569},{"type":42,"tag":323,"props":693,"children":694},{"style":572},[695],{"type":48,"value":696}," authHeader ",{"type":42,"tag":323,"props":698,"children":699},{"style":578},[700],{"type":48,"value":581},{"type":42,"tag":323,"props":702,"children":703},{"style":578},[704],{"type":48,"value":670},{"type":42,"tag":323,"props":706,"children":707},{"style":673},[708],{"type":48,"value":709},"Basic ",{"type":42,"tag":323,"props":711,"children":712},{"style":578},[713],{"type":48,"value":680},{"type":42,"tag":323,"props":715,"children":716},{"style":578},[717],{"type":48,"value":718}," +",{"type":42,"tag":323,"props":720,"children":722},{"style":721},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[723],{"type":48,"value":724}," btoa",{"type":42,"tag":323,"props":726,"children":727},{"style":572},[728],{"type":48,"value":729},"(",{"type":42,"tag":323,"props":731,"children":732},{"style":578},[733],{"type":48,"value":734},"`${",{"type":42,"tag":323,"props":736,"children":737},{"style":572},[738],{"type":48,"value":739},"accountSid",{"type":42,"tag":323,"props":741,"children":742},{"style":578},[743],{"type":48,"value":744},"}",{"type":42,"tag":323,"props":746,"children":747},{"style":673},[748],{"type":48,"value":749},":",{"type":42,"tag":323,"props":751,"children":752},{"style":578},[753],{"type":48,"value":754},"${",{"type":42,"tag":323,"props":756,"children":757},{"style":572},[758],{"type":48,"value":759},"authToken",{"type":42,"tag":323,"props":761,"children":762},{"style":578},[763],{"type":48,"value":764},"}`",{"type":42,"tag":323,"props":766,"children":767},{"style":572},[768],{"type":48,"value":769},")",{"type":42,"tag":323,"props":771,"children":772},{"style":578},[773],{"type":48,"value":609},{"type":42,"tag":323,"props":775,"children":776},{"class":325,"line":363},[777,781,786,790,795,799,805,809,813,818,823,827,832,836,840,844,849,853],{"type":42,"tag":323,"props":778,"children":779},{"style":566},[780],{"type":48,"value":569},{"type":42,"tag":323,"props":782,"children":783},{"style":572},[784],{"type":48,"value":785}," headers ",{"type":42,"tag":323,"props":787,"children":788},{"style":578},[789],{"type":48,"value":581},{"type":42,"tag":323,"props":791,"children":792},{"style":578},[793],{"type":48,"value":794}," {",{"type":42,"tag":323,"props":796,"children":797},{"style":578},[798],{"type":48,"value":670},{"type":42,"tag":323,"props":800,"children":802},{"style":801},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[803],{"type":48,"value":804},"Authorization",{"type":42,"tag":323,"props":806,"children":807},{"style":578},[808],{"type":48,"value":680},{"type":42,"tag":323,"props":810,"children":811},{"style":578},[812],{"type":48,"value":749},{"type":42,"tag":323,"props":814,"children":815},{"style":572},[816],{"type":48,"value":817}," authHeader",{"type":42,"tag":323,"props":819,"children":820},{"style":578},[821],{"type":48,"value":822},",",{"type":42,"tag":323,"props":824,"children":825},{"style":578},[826],{"type":48,"value":670},{"type":42,"tag":323,"props":828,"children":829},{"style":801},[830],{"type":48,"value":831},"Content-Type",{"type":42,"tag":323,"props":833,"children":834},{"style":578},[835],{"type":48,"value":680},{"type":42,"tag":323,"props":837,"children":838},{"style":578},[839],{"type":48,"value":749},{"type":42,"tag":323,"props":841,"children":842},{"style":578},[843],{"type":48,"value":670},{"type":42,"tag":323,"props":845,"children":846},{"style":673},[847],{"type":48,"value":848},"application\u002Fjson",{"type":42,"tag":323,"props":850,"children":851},{"style":578},[852],{"type":48,"value":680},{"type":42,"tag":323,"props":854,"children":855},{"style":578},[856],{"type":48,"value":857}," };\n",{"type":42,"tag":323,"props":859,"children":860},{"class":325,"line":372},[861],{"type":42,"tag":323,"props":862,"children":863},{"emptyLinePlaceholder":339},[864],{"type":48,"value":342},{"type":42,"tag":323,"props":866,"children":867},{"class":325,"line":30},[868,872,877,881,887,892,896,900,905,909,914,919,923],{"type":42,"tag":323,"props":869,"children":870},{"style":566},[871],{"type":48,"value":569},{"type":42,"tag":323,"props":873,"children":874},{"style":572},[875],{"type":48,"value":876}," res ",{"type":42,"tag":323,"props":878,"children":879},{"style":578},[880],{"type":48,"value":581},{"type":42,"tag":323,"props":882,"children":884},{"style":883},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[885],{"type":48,"value":886}," await",{"type":42,"tag":323,"props":888,"children":889},{"style":721},[890],{"type":48,"value":891}," fetch",{"type":42,"tag":323,"props":893,"children":894},{"style":572},[895],{"type":48,"value":729},{"type":42,"tag":323,"props":897,"children":898},{"style":578},[899],{"type":48,"value":734},{"type":42,"tag":323,"props":901,"children":902},{"style":572},[903],{"type":48,"value":904},"baseUrl",{"type":42,"tag":323,"props":906,"children":907},{"style":578},[908],{"type":48,"value":744},{"type":42,"tag":323,"props":910,"children":911},{"style":673},[912],{"type":48,"value":913},"\u002Fv2\u002FControlPlane\u002FKnowledgeBases",{"type":42,"tag":323,"props":915,"children":916},{"style":578},[917],{"type":48,"value":918},"`",{"type":42,"tag":323,"props":920,"children":921},{"style":578},[922],{"type":48,"value":822},{"type":42,"tag":323,"props":924,"children":925},{"style":578},[926],{"type":48,"value":927}," {\n",{"type":42,"tag":323,"props":929,"children":930},{"class":325,"line":388},[931,936,940,944,949,953],{"type":42,"tag":323,"props":932,"children":933},{"style":801},[934],{"type":48,"value":935},"    method",{"type":42,"tag":323,"props":937,"children":938},{"style":578},[939],{"type":48,"value":749},{"type":42,"tag":323,"props":941,"children":942},{"style":578},[943],{"type":48,"value":670},{"type":42,"tag":323,"props":945,"children":946},{"style":673},[947],{"type":48,"value":948},"POST",{"type":42,"tag":323,"props":950,"children":951},{"style":578},[952],{"type":48,"value":680},{"type":42,"tag":323,"props":954,"children":955},{"style":578},[956],{"type":48,"value":957},",\n",{"type":42,"tag":323,"props":959,"children":960},{"class":325,"line":397},[961,966],{"type":42,"tag":323,"props":962,"children":963},{"style":572},[964],{"type":48,"value":965},"    headers",{"type":42,"tag":323,"props":967,"children":968},{"style":578},[969],{"type":48,"value":957},{"type":42,"tag":323,"props":971,"children":972},{"class":325,"line":406},[973,978,982,987,991,996,1000,1005,1010,1014,1018,1023,1027,1031,1036,1040,1044,1049,1053,1058,1062],{"type":42,"tag":323,"props":974,"children":975},{"style":801},[976],{"type":48,"value":977},"    body",{"type":42,"tag":323,"props":979,"children":980},{"style":578},[981],{"type":48,"value":749},{"type":42,"tag":323,"props":983,"children":984},{"style":572},[985],{"type":48,"value":986}," JSON",{"type":42,"tag":323,"props":988,"children":989},{"style":578},[990],{"type":48,"value":591},{"type":42,"tag":323,"props":992,"children":993},{"style":721},[994],{"type":48,"value":995},"stringify",{"type":42,"tag":323,"props":997,"children":998},{"style":572},[999],{"type":48,"value":729},{"type":42,"tag":323,"props":1001,"children":1002},{"style":578},[1003],{"type":48,"value":1004},"{",{"type":42,"tag":323,"props":1006,"children":1007},{"style":801},[1008],{"type":48,"value":1009}," displayName",{"type":42,"tag":323,"props":1011,"children":1012},{"style":578},[1013],{"type":48,"value":749},{"type":42,"tag":323,"props":1015,"children":1016},{"style":578},[1017],{"type":48,"value":670},{"type":42,"tag":323,"props":1019,"children":1020},{"style":673},[1021],{"type":48,"value":1022},"product-docs",{"type":42,"tag":323,"props":1024,"children":1025},{"style":578},[1026],{"type":48,"value":680},{"type":42,"tag":323,"props":1028,"children":1029},{"style":578},[1030],{"type":48,"value":822},{"type":42,"tag":323,"props":1032,"children":1033},{"style":801},[1034],{"type":48,"value":1035}," description",{"type":42,"tag":323,"props":1037,"children":1038},{"style":578},[1039],{"type":48,"value":749},{"type":42,"tag":323,"props":1041,"children":1042},{"style":578},[1043],{"type":48,"value":670},{"type":42,"tag":323,"props":1045,"children":1046},{"style":673},[1047],{"type":48,"value":1048},"Support agent knowledge",{"type":42,"tag":323,"props":1050,"children":1051},{"style":578},[1052],{"type":48,"value":680},{"type":42,"tag":323,"props":1054,"children":1055},{"style":578},[1056],{"type":48,"value":1057}," }",{"type":42,"tag":323,"props":1059,"children":1060},{"style":572},[1061],{"type":48,"value":769},{"type":42,"tag":323,"props":1063,"children":1064},{"style":578},[1065],{"type":48,"value":957},{"type":42,"tag":323,"props":1067,"children":1068},{"class":325,"line":415},[1069,1073,1077],{"type":42,"tag":323,"props":1070,"children":1071},{"style":578},[1072],{"type":48,"value":744},{"type":42,"tag":323,"props":1074,"children":1075},{"style":572},[1076],{"type":48,"value":769},{"type":42,"tag":323,"props":1078,"children":1079},{"style":578},[1080],{"type":48,"value":609},{"type":42,"tag":323,"props":1082,"children":1083},{"class":325,"line":424},[1084],{"type":42,"tag":323,"props":1085,"children":1086},{"emptyLinePlaceholder":339},[1087],{"type":48,"value":342},{"type":42,"tag":323,"props":1089,"children":1090},{"class":325,"line":433},[1091,1095,1099,1104,1108,1113,1117,1122,1126,1131,1136],{"type":42,"tag":323,"props":1092,"children":1093},{"style":566},[1094],{"type":48,"value":569},{"type":42,"tag":323,"props":1096,"children":1097},{"style":578},[1098],{"type":48,"value":794},{"type":42,"tag":323,"props":1100,"children":1101},{"style":572},[1102],{"type":48,"value":1103}," statusUrl ",{"type":42,"tag":323,"props":1105,"children":1106},{"style":578},[1107],{"type":48,"value":744},{"type":42,"tag":323,"props":1109,"children":1110},{"style":578},[1111],{"type":48,"value":1112}," =",{"type":42,"tag":323,"props":1114,"children":1115},{"style":883},[1116],{"type":48,"value":886},{"type":42,"tag":323,"props":1118,"children":1119},{"style":572},[1120],{"type":48,"value":1121}," res",{"type":42,"tag":323,"props":1123,"children":1124},{"style":578},[1125],{"type":48,"value":591},{"type":42,"tag":323,"props":1127,"children":1128},{"style":721},[1129],{"type":48,"value":1130},"json",{"type":42,"tag":323,"props":1132,"children":1133},{"style":572},[1134],{"type":48,"value":1135},"()",{"type":42,"tag":323,"props":1137,"children":1138},{"style":578},[1139],{"type":48,"value":609},{"type":42,"tag":323,"props":1141,"children":1142},{"class":325,"line":441},[1143],{"type":42,"tag":323,"props":1144,"children":1145},{"emptyLinePlaceholder":339},[1146],{"type":48,"value":342},{"type":42,"tag":323,"props":1148,"children":1149},{"class":325,"line":450},[1150,1155,1160],{"type":42,"tag":323,"props":1151,"children":1152},{"style":566},[1153],{"type":48,"value":1154},"let",{"type":42,"tag":323,"props":1156,"children":1157},{"style":572},[1158],{"type":48,"value":1159}," kbId",{"type":42,"tag":323,"props":1161,"children":1162},{"style":578},[1163],{"type":48,"value":609},{"type":42,"tag":323,"props":1165,"children":1166},{"class":325,"line":458},[1167,1172,1177,1183,1188],{"type":42,"tag":323,"props":1168,"children":1169},{"style":883},[1170],{"type":48,"value":1171},"while",{"type":42,"tag":323,"props":1173,"children":1174},{"style":572},[1175],{"type":48,"value":1176}," (",{"type":42,"tag":323,"props":1178,"children":1180},{"style":1179},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1181],{"type":48,"value":1182},"true",{"type":42,"tag":323,"props":1184,"children":1185},{"style":572},[1186],{"type":48,"value":1187},") ",{"type":42,"tag":323,"props":1189,"children":1190},{"style":578},[1191],{"type":48,"value":1192},"{\n",{"type":42,"tag":323,"props":1194,"children":1195},{"class":325,"line":467},[1196,1201,1206,1210,1214,1218,1222,1226,1230,1234,1239,1243,1247,1251,1255,1259,1263,1267,1271,1275,1279,1283,1288,1292,1298,1303,1308,1312,1316,1321],{"type":42,"tag":323,"props":1197,"children":1198},{"style":566},[1199],{"type":48,"value":1200},"    const",{"type":42,"tag":323,"props":1202,"children":1203},{"style":572},[1204],{"type":48,"value":1205}," op",{"type":42,"tag":323,"props":1207,"children":1208},{"style":578},[1209],{"type":48,"value":1112},{"type":42,"tag":323,"props":1211,"children":1212},{"style":883},[1213],{"type":48,"value":886},{"type":42,"tag":323,"props":1215,"children":1216},{"style":721},[1217],{"type":48,"value":891},{"type":42,"tag":323,"props":1219,"children":1220},{"style":801},[1221],{"type":48,"value":729},{"type":42,"tag":323,"props":1223,"children":1224},{"style":572},[1225],{"type":48,"value":138},{"type":42,"tag":323,"props":1227,"children":1228},{"style":578},[1229],{"type":48,"value":822},{"type":42,"tag":323,"props":1231,"children":1232},{"style":578},[1233],{"type":48,"value":794},{"type":42,"tag":323,"props":1235,"children":1236},{"style":801},[1237],{"type":48,"value":1238}," headers",{"type":42,"tag":323,"props":1240,"children":1241},{"style":578},[1242],{"type":48,"value":749},{"type":42,"tag":323,"props":1244,"children":1245},{"style":578},[1246],{"type":48,"value":794},{"type":42,"tag":323,"props":1248,"children":1249},{"style":578},[1250],{"type":48,"value":670},{"type":42,"tag":323,"props":1252,"children":1253},{"style":801},[1254],{"type":48,"value":804},{"type":42,"tag":323,"props":1256,"children":1257},{"style":578},[1258],{"type":48,"value":680},{"type":42,"tag":323,"props":1260,"children":1261},{"style":578},[1262],{"type":48,"value":749},{"type":42,"tag":323,"props":1264,"children":1265},{"style":572},[1266],{"type":48,"value":817},{"type":42,"tag":323,"props":1268,"children":1269},{"style":578},[1270],{"type":48,"value":1057},{"type":42,"tag":323,"props":1272,"children":1273},{"style":578},[1274],{"type":48,"value":1057},{"type":42,"tag":323,"props":1276,"children":1277},{"style":801},[1278],{"type":48,"value":769},{"type":42,"tag":323,"props":1280,"children":1281},{"style":578},[1282],{"type":48,"value":591},{"type":42,"tag":323,"props":1284,"children":1285},{"style":721},[1286],{"type":48,"value":1287},"then",{"type":42,"tag":323,"props":1289,"children":1290},{"style":801},[1291],{"type":48,"value":729},{"type":42,"tag":323,"props":1293,"children":1295},{"style":1294},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1296],{"type":48,"value":1297},"r",{"type":42,"tag":323,"props":1299,"children":1300},{"style":566},[1301],{"type":48,"value":1302}," =>",{"type":42,"tag":323,"props":1304,"children":1305},{"style":572},[1306],{"type":48,"value":1307}," r",{"type":42,"tag":323,"props":1309,"children":1310},{"style":578},[1311],{"type":48,"value":591},{"type":42,"tag":323,"props":1313,"children":1314},{"style":721},[1315],{"type":48,"value":1130},{"type":42,"tag":323,"props":1317,"children":1318},{"style":801},[1319],{"type":48,"value":1320},"())",{"type":42,"tag":323,"props":1322,"children":1323},{"style":578},[1324],{"type":48,"value":609},{"type":42,"tag":323,"props":1326,"children":1327},{"class":325,"line":476},[1328,1333,1337,1342,1346,1351,1356,1360,1364,1368,1372,1376,1380,1384,1388,1392,1397,1401,1406,1411,1416,1420],{"type":42,"tag":323,"props":1329,"children":1330},{"style":883},[1331],{"type":48,"value":1332},"    if",{"type":42,"tag":323,"props":1334,"children":1335},{"style":801},[1336],{"type":48,"value":1176},{"type":42,"tag":323,"props":1338,"children":1339},{"style":572},[1340],{"type":48,"value":1341},"op",{"type":42,"tag":323,"props":1343,"children":1344},{"style":578},[1345],{"type":48,"value":591},{"type":42,"tag":323,"props":1347,"children":1348},{"style":572},[1349],{"type":48,"value":1350},"status",{"type":42,"tag":323,"props":1352,"children":1353},{"style":578},[1354],{"type":48,"value":1355}," ===",{"type":42,"tag":323,"props":1357,"children":1358},{"style":578},[1359],{"type":48,"value":670},{"type":42,"tag":323,"props":1361,"children":1362},{"style":673},[1363],{"type":48,"value":151},{"type":42,"tag":323,"props":1365,"children":1366},{"style":578},[1367],{"type":48,"value":680},{"type":42,"tag":323,"props":1369,"children":1370},{"style":801},[1371],{"type":48,"value":1187},{"type":42,"tag":323,"props":1373,"children":1374},{"style":578},[1375],{"type":48,"value":1004},{"type":42,"tag":323,"props":1377,"children":1378},{"style":572},[1379],{"type":48,"value":1159},{"type":42,"tag":323,"props":1381,"children":1382},{"style":578},[1383],{"type":48,"value":1112},{"type":42,"tag":323,"props":1385,"children":1386},{"style":572},[1387],{"type":48,"value":1205},{"type":42,"tag":323,"props":1389,"children":1390},{"style":578},[1391],{"type":48,"value":591},{"type":42,"tag":323,"props":1393,"children":1394},{"style":572},[1395],{"type":48,"value":1396},"result",{"type":42,"tag":323,"props":1398,"children":1399},{"style":578},[1400],{"type":48,"value":591},{"type":42,"tag":323,"props":1402,"children":1403},{"style":572},[1404],{"type":48,"value":1405},"id",{"type":42,"tag":323,"props":1407,"children":1408},{"style":578},[1409],{"type":48,"value":1410},";",{"type":42,"tag":323,"props":1412,"children":1413},{"style":883},[1414],{"type":48,"value":1415}," break",{"type":42,"tag":323,"props":1417,"children":1418},{"style":578},[1419],{"type":48,"value":1410},{"type":42,"tag":323,"props":1421,"children":1422},{"style":578},[1423],{"type":48,"value":1424}," }\n",{"type":42,"tag":323,"props":1426,"children":1427},{"class":325,"line":485},[1428,1432,1436,1440,1444,1448,1452,1456,1461,1465,1469,1474,1479,1484,1488,1492,1496,1501,1505,1510,1514],{"type":42,"tag":323,"props":1429,"children":1430},{"style":883},[1431],{"type":48,"value":1332},{"type":42,"tag":323,"props":1433,"children":1434},{"style":801},[1435],{"type":48,"value":1176},{"type":42,"tag":323,"props":1437,"children":1438},{"style":572},[1439],{"type":48,"value":1341},{"type":42,"tag":323,"props":1441,"children":1442},{"style":578},[1443],{"type":48,"value":591},{"type":42,"tag":323,"props":1445,"children":1446},{"style":572},[1447],{"type":48,"value":1350},{"type":42,"tag":323,"props":1449,"children":1450},{"style":578},[1451],{"type":48,"value":1355},{"type":42,"tag":323,"props":1453,"children":1454},{"style":578},[1455],{"type":48,"value":670},{"type":42,"tag":323,"props":1457,"children":1458},{"style":673},[1459],{"type":48,"value":1460},"FAILED",{"type":42,"tag":323,"props":1462,"children":1463},{"style":578},[1464],{"type":48,"value":680},{"type":42,"tag":323,"props":1466,"children":1467},{"style":801},[1468],{"type":48,"value":1187},{"type":42,"tag":323,"props":1470,"children":1471},{"style":883},[1472],{"type":48,"value":1473},"throw",{"type":42,"tag":323,"props":1475,"children":1476},{"style":578},[1477],{"type":48,"value":1478}," new",{"type":42,"tag":323,"props":1480,"children":1481},{"style":721},[1482],{"type":48,"value":1483}," Error",{"type":42,"tag":323,"props":1485,"children":1486},{"style":801},[1487],{"type":48,"value":729},{"type":42,"tag":323,"props":1489,"children":1490},{"style":572},[1491],{"type":48,"value":1341},{"type":42,"tag":323,"props":1493,"children":1494},{"style":578},[1495],{"type":48,"value":591},{"type":42,"tag":323,"props":1497,"children":1498},{"style":572},[1499],{"type":48,"value":1500},"error",{"type":42,"tag":323,"props":1502,"children":1503},{"style":578},[1504],{"type":48,"value":591},{"type":42,"tag":323,"props":1506,"children":1507},{"style":572},[1508],{"type":48,"value":1509},"detail",{"type":42,"tag":323,"props":1511,"children":1512},{"style":801},[1513],{"type":48,"value":769},{"type":42,"tag":323,"props":1515,"children":1516},{"style":578},[1517],{"type":48,"value":609},{"type":42,"tag":323,"props":1519,"children":1520},{"class":325,"line":494},[1521,1526,1530,1536,1540,1544,1548,1553,1557,1561,1565,1571,1576],{"type":42,"tag":323,"props":1522,"children":1523},{"style":883},[1524],{"type":48,"value":1525},"    await",{"type":42,"tag":323,"props":1527,"children":1528},{"style":578},[1529],{"type":48,"value":1478},{"type":42,"tag":323,"props":1531,"children":1533},{"style":1532},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1534],{"type":48,"value":1535}," Promise",{"type":42,"tag":323,"props":1537,"children":1538},{"style":801},[1539],{"type":48,"value":729},{"type":42,"tag":323,"props":1541,"children":1542},{"style":1294},[1543],{"type":48,"value":1297},{"type":42,"tag":323,"props":1545,"children":1546},{"style":566},[1547],{"type":48,"value":1302},{"type":42,"tag":323,"props":1549,"children":1550},{"style":721},[1551],{"type":48,"value":1552}," setTimeout",{"type":42,"tag":323,"props":1554,"children":1555},{"style":801},[1556],{"type":48,"value":729},{"type":42,"tag":323,"props":1558,"children":1559},{"style":572},[1560],{"type":48,"value":1297},{"type":42,"tag":323,"props":1562,"children":1563},{"style":578},[1564],{"type":48,"value":822},{"type":42,"tag":323,"props":1566,"children":1568},{"style":1567},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1569],{"type":48,"value":1570}," 2000",{"type":42,"tag":323,"props":1572,"children":1573},{"style":801},[1574],{"type":48,"value":1575},"))",{"type":42,"tag":323,"props":1577,"children":1578},{"style":578},[1579],{"type":48,"value":609},{"type":42,"tag":323,"props":1581,"children":1582},{"class":325,"line":503},[1583],{"type":42,"tag":323,"props":1584,"children":1585},{"style":578},[1586],{"type":48,"value":1587},"}\n",{"type":42,"tag":51,"props":1589,"children":1590},{},[1591],{"type":42,"tag":86,"props":1592,"children":1593},{},[1594],{"type":48,"value":1595},"Step 2 — Add a Knowledge Source",{"type":42,"tag":51,"props":1597,"children":1598},{},[1599,1601,1606,1608,1613,1615,1620],{"type":48,"value":1600},"Three source types: ",{"type":42,"tag":86,"props":1602,"children":1603},{},[1604],{"type":48,"value":1605},"Web",{"type":48,"value":1607}," (crawl a URL), ",{"type":42,"tag":86,"props":1609,"children":1610},{},[1611],{"type":48,"value":1612},"File",{"type":48,"value":1614}," (upload PDF\u002FCSV\u002FMarkdown\u002Ftext, max 16MB), ",{"type":42,"tag":86,"props":1616,"children":1617},{},[1618],{"type":48,"value":1619},"Text",{"type":48,"value":1621}," (inline, max 1,048,576 chars).",{"type":42,"tag":51,"props":1623,"children":1624},{},[1625],{"type":42,"tag":86,"props":1626,"children":1627},{},[1628],{"type":48,"value":312},{"type":42,"tag":57,"props":1630,"children":1632},{"className":315,"code":1631,"language":317,"meta":66,"style":66},"knowledge = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=auth,\n    json={\n        \"name\": \"Product Documentation\",\n        \"description\": \"Public product docs\",\n        \"source\": {\"type\": \"Web\", \"url\": \"https:\u002F\u002Fdocs.example.com\", \"crawlDepth\": 3}\n    }\n).json()\n\nknowledge_id = knowledge[\"id\"]\n",[1633],{"type":42,"tag":64,"props":1634,"children":1635},{"__ignoreMap":66},[1636,1644,1652,1659,1667,1675,1683,1691,1699,1707,1714],{"type":42,"tag":323,"props":1637,"children":1638},{"class":325,"line":326},[1639],{"type":42,"tag":323,"props":1640,"children":1641},{},[1642],{"type":48,"value":1643},"knowledge = requests.post(\n",{"type":42,"tag":323,"props":1645,"children":1646},{"class":325,"line":335},[1647],{"type":42,"tag":323,"props":1648,"children":1649},{},[1650],{"type":48,"value":1651},"    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n",{"type":42,"tag":323,"props":1653,"children":1654},{"class":325,"line":345},[1655],{"type":42,"tag":323,"props":1656,"children":1657},{},[1658],{"type":48,"value":412},{"type":42,"tag":323,"props":1660,"children":1661},{"class":325,"line":354},[1662],{"type":42,"tag":323,"props":1663,"children":1664},{},[1665],{"type":48,"value":1666},"    json={\n",{"type":42,"tag":323,"props":1668,"children":1669},{"class":325,"line":363},[1670],{"type":42,"tag":323,"props":1671,"children":1672},{},[1673],{"type":48,"value":1674},"        \"name\": \"Product Documentation\",\n",{"type":42,"tag":323,"props":1676,"children":1677},{"class":325,"line":372},[1678],{"type":42,"tag":323,"props":1679,"children":1680},{},[1681],{"type":48,"value":1682},"        \"description\": \"Public product docs\",\n",{"type":42,"tag":323,"props":1684,"children":1685},{"class":325,"line":30},[1686],{"type":42,"tag":323,"props":1687,"children":1688},{},[1689],{"type":48,"value":1690},"        \"source\": {\"type\": \"Web\", \"url\": \"https:\u002F\u002Fdocs.example.com\", \"crawlDepth\": 3}\n",{"type":42,"tag":323,"props":1692,"children":1693},{"class":325,"line":388},[1694],{"type":42,"tag":323,"props":1695,"children":1696},{},[1697],{"type":48,"value":1698},"    }\n",{"type":42,"tag":323,"props":1700,"children":1701},{"class":325,"line":397},[1702],{"type":42,"tag":323,"props":1703,"children":1704},{},[1705],{"type":48,"value":1706},").json()\n",{"type":42,"tag":323,"props":1708,"children":1709},{"class":325,"line":406},[1710],{"type":42,"tag":323,"props":1711,"children":1712},{"emptyLinePlaceholder":339},[1713],{"type":48,"value":342},{"type":42,"tag":323,"props":1715,"children":1716},{"class":325,"line":415},[1717],{"type":42,"tag":323,"props":1718,"children":1719},{},[1720],{"type":48,"value":1721},"knowledge_id = knowledge[\"id\"]\n",{"type":42,"tag":51,"props":1723,"children":1724},{},[1725],{"type":42,"tag":86,"props":1726,"children":1727},{},[1728],{"type":48,"value":551},{"type":42,"tag":57,"props":1730,"children":1732},{"className":554,"code":1731,"language":556,"meta":66,"style":66},"const knowledge = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({\n        name: \"Product Documentation\",\n        description: \"Public product docs\",\n        source: { type: \"Web\", url: \"https:\u002F\u002Fdocs.example.com\", crawlDepth: 3 },\n    }),\n}).then(r => r.json());\n\nconst knowledgeId = knowledge.id;\n",[1733],{"type":42,"tag":64,"props":1734,"children":1735},{"__ignoreMap":66},[1736,1811,1838,1849,1880,1909,1938,2024,2040,2091,2098],{"type":42,"tag":323,"props":1737,"children":1738},{"class":325,"line":326},[1739,1743,1748,1752,1756,1760,1764,1768,1772,1776,1781,1785,1790,1794,1799,1803,1807],{"type":42,"tag":323,"props":1740,"children":1741},{"style":566},[1742],{"type":48,"value":569},{"type":42,"tag":323,"props":1744,"children":1745},{"style":572},[1746],{"type":48,"value":1747}," knowledge ",{"type":42,"tag":323,"props":1749,"children":1750},{"style":578},[1751],{"type":48,"value":581},{"type":42,"tag":323,"props":1753,"children":1754},{"style":883},[1755],{"type":48,"value":886},{"type":42,"tag":323,"props":1757,"children":1758},{"style":721},[1759],{"type":48,"value":891},{"type":42,"tag":323,"props":1761,"children":1762},{"style":572},[1763],{"type":48,"value":729},{"type":42,"tag":323,"props":1765,"children":1766},{"style":578},[1767],{"type":48,"value":734},{"type":42,"tag":323,"props":1769,"children":1770},{"style":572},[1771],{"type":48,"value":904},{"type":42,"tag":323,"props":1773,"children":1774},{"style":578},[1775],{"type":48,"value":744},{"type":42,"tag":323,"props":1777,"children":1778},{"style":673},[1779],{"type":48,"value":1780},"\u002Fv2\u002FKnowledgeBases\u002F",{"type":42,"tag":323,"props":1782,"children":1783},{"style":578},[1784],{"type":48,"value":754},{"type":42,"tag":323,"props":1786,"children":1787},{"style":572},[1788],{"type":48,"value":1789},"kbId",{"type":42,"tag":323,"props":1791,"children":1792},{"style":578},[1793],{"type":48,"value":744},{"type":42,"tag":323,"props":1795,"children":1796},{"style":673},[1797],{"type":48,"value":1798},"\u002FKnowledge",{"type":42,"tag":323,"props":1800,"children":1801},{"style":578},[1802],{"type":48,"value":918},{"type":42,"tag":323,"props":1804,"children":1805},{"style":578},[1806],{"type":48,"value":822},{"type":42,"tag":323,"props":1808,"children":1809},{"style":578},[1810],{"type":48,"value":927},{"type":42,"tag":323,"props":1812,"children":1813},{"class":325,"line":335},[1814,1818,1822,1826,1830,1834],{"type":42,"tag":323,"props":1815,"children":1816},{"style":801},[1817],{"type":48,"value":935},{"type":42,"tag":323,"props":1819,"children":1820},{"style":578},[1821],{"type":48,"value":749},{"type":42,"tag":323,"props":1823,"children":1824},{"style":578},[1825],{"type":48,"value":670},{"type":42,"tag":323,"props":1827,"children":1828},{"style":673},[1829],{"type":48,"value":948},{"type":42,"tag":323,"props":1831,"children":1832},{"style":578},[1833],{"type":48,"value":680},{"type":42,"tag":323,"props":1835,"children":1836},{"style":578},[1837],{"type":48,"value":957},{"type":42,"tag":323,"props":1839,"children":1840},{"class":325,"line":345},[1841,1845],{"type":42,"tag":323,"props":1842,"children":1843},{"style":572},[1844],{"type":48,"value":965},{"type":42,"tag":323,"props":1846,"children":1847},{"style":578},[1848],{"type":48,"value":957},{"type":42,"tag":323,"props":1850,"children":1851},{"class":325,"line":354},[1852,1856,1860,1864,1868,1872,1876],{"type":42,"tag":323,"props":1853,"children":1854},{"style":801},[1855],{"type":48,"value":977},{"type":42,"tag":323,"props":1857,"children":1858},{"style":578},[1859],{"type":48,"value":749},{"type":42,"tag":323,"props":1861,"children":1862},{"style":572},[1863],{"type":48,"value":986},{"type":42,"tag":323,"props":1865,"children":1866},{"style":578},[1867],{"type":48,"value":591},{"type":42,"tag":323,"props":1869,"children":1870},{"style":721},[1871],{"type":48,"value":995},{"type":42,"tag":323,"props":1873,"children":1874},{"style":572},[1875],{"type":48,"value":729},{"type":42,"tag":323,"props":1877,"children":1878},{"style":578},[1879],{"type":48,"value":1192},{"type":42,"tag":323,"props":1881,"children":1882},{"class":325,"line":363},[1883,1888,1892,1896,1901,1905],{"type":42,"tag":323,"props":1884,"children":1885},{"style":801},[1886],{"type":48,"value":1887},"        name",{"type":42,"tag":323,"props":1889,"children":1890},{"style":578},[1891],{"type":48,"value":749},{"type":42,"tag":323,"props":1893,"children":1894},{"style":578},[1895],{"type":48,"value":670},{"type":42,"tag":323,"props":1897,"children":1898},{"style":673},[1899],{"type":48,"value":1900},"Product Documentation",{"type":42,"tag":323,"props":1902,"children":1903},{"style":578},[1904],{"type":48,"value":680},{"type":42,"tag":323,"props":1906,"children":1907},{"style":578},[1908],{"type":48,"value":957},{"type":42,"tag":323,"props":1910,"children":1911},{"class":325,"line":372},[1912,1917,1921,1925,1930,1934],{"type":42,"tag":323,"props":1913,"children":1914},{"style":801},[1915],{"type":48,"value":1916},"        description",{"type":42,"tag":323,"props":1918,"children":1919},{"style":578},[1920],{"type":48,"value":749},{"type":42,"tag":323,"props":1922,"children":1923},{"style":578},[1924],{"type":48,"value":670},{"type":42,"tag":323,"props":1926,"children":1927},{"style":673},[1928],{"type":48,"value":1929},"Public product docs",{"type":42,"tag":323,"props":1931,"children":1932},{"style":578},[1933],{"type":48,"value":680},{"type":42,"tag":323,"props":1935,"children":1936},{"style":578},[1937],{"type":48,"value":957},{"type":42,"tag":323,"props":1939,"children":1940},{"class":325,"line":30},[1941,1946,1950,1954,1959,1963,1967,1971,1975,1979,1984,1988,1992,1997,2001,2005,2010,2014,2019],{"type":42,"tag":323,"props":1942,"children":1943},{"style":801},[1944],{"type":48,"value":1945},"        source",{"type":42,"tag":323,"props":1947,"children":1948},{"style":578},[1949],{"type":48,"value":749},{"type":42,"tag":323,"props":1951,"children":1952},{"style":578},[1953],{"type":48,"value":794},{"type":42,"tag":323,"props":1955,"children":1956},{"style":801},[1957],{"type":48,"value":1958}," type",{"type":42,"tag":323,"props":1960,"children":1961},{"style":578},[1962],{"type":48,"value":749},{"type":42,"tag":323,"props":1964,"children":1965},{"style":578},[1966],{"type":48,"value":670},{"type":42,"tag":323,"props":1968,"children":1969},{"style":673},[1970],{"type":48,"value":1605},{"type":42,"tag":323,"props":1972,"children":1973},{"style":578},[1974],{"type":48,"value":680},{"type":42,"tag":323,"props":1976,"children":1977},{"style":578},[1978],{"type":48,"value":822},{"type":42,"tag":323,"props":1980,"children":1981},{"style":801},[1982],{"type":48,"value":1983}," url",{"type":42,"tag":323,"props":1985,"children":1986},{"style":578},[1987],{"type":48,"value":749},{"type":42,"tag":323,"props":1989,"children":1990},{"style":578},[1991],{"type":48,"value":670},{"type":42,"tag":323,"props":1993,"children":1994},{"style":673},[1995],{"type":48,"value":1996},"https:\u002F\u002Fdocs.example.com",{"type":42,"tag":323,"props":1998,"children":1999},{"style":578},[2000],{"type":48,"value":680},{"type":42,"tag":323,"props":2002,"children":2003},{"style":578},[2004],{"type":48,"value":822},{"type":42,"tag":323,"props":2006,"children":2007},{"style":801},[2008],{"type":48,"value":2009}," crawlDepth",{"type":42,"tag":323,"props":2011,"children":2012},{"style":578},[2013],{"type":48,"value":749},{"type":42,"tag":323,"props":2015,"children":2016},{"style":1567},[2017],{"type":48,"value":2018}," 3",{"type":42,"tag":323,"props":2020,"children":2021},{"style":578},[2022],{"type":48,"value":2023}," },\n",{"type":42,"tag":323,"props":2025,"children":2026},{"class":325,"line":388},[2027,2032,2036],{"type":42,"tag":323,"props":2028,"children":2029},{"style":578},[2030],{"type":48,"value":2031},"    }",{"type":42,"tag":323,"props":2033,"children":2034},{"style":572},[2035],{"type":48,"value":769},{"type":42,"tag":323,"props":2037,"children":2038},{"style":578},[2039],{"type":48,"value":957},{"type":42,"tag":323,"props":2041,"children":2042},{"class":325,"line":397},[2043,2047,2051,2055,2059,2063,2067,2071,2075,2079,2083,2087],{"type":42,"tag":323,"props":2044,"children":2045},{"style":578},[2046],{"type":48,"value":744},{"type":42,"tag":323,"props":2048,"children":2049},{"style":572},[2050],{"type":48,"value":769},{"type":42,"tag":323,"props":2052,"children":2053},{"style":578},[2054],{"type":48,"value":591},{"type":42,"tag":323,"props":2056,"children":2057},{"style":721},[2058],{"type":48,"value":1287},{"type":42,"tag":323,"props":2060,"children":2061},{"style":572},[2062],{"type":48,"value":729},{"type":42,"tag":323,"props":2064,"children":2065},{"style":1294},[2066],{"type":48,"value":1297},{"type":42,"tag":323,"props":2068,"children":2069},{"style":566},[2070],{"type":48,"value":1302},{"type":42,"tag":323,"props":2072,"children":2073},{"style":572},[2074],{"type":48,"value":1307},{"type":42,"tag":323,"props":2076,"children":2077},{"style":578},[2078],{"type":48,"value":591},{"type":42,"tag":323,"props":2080,"children":2081},{"style":721},[2082],{"type":48,"value":1130},{"type":42,"tag":323,"props":2084,"children":2085},{"style":572},[2086],{"type":48,"value":1320},{"type":42,"tag":323,"props":2088,"children":2089},{"style":578},[2090],{"type":48,"value":609},{"type":42,"tag":323,"props":2092,"children":2093},{"class":325,"line":406},[2094],{"type":42,"tag":323,"props":2095,"children":2096},{"emptyLinePlaceholder":339},[2097],{"type":48,"value":342},{"type":42,"tag":323,"props":2099,"children":2100},{"class":325,"line":415},[2101,2105,2110,2114,2119,2123,2127],{"type":42,"tag":323,"props":2102,"children":2103},{"style":566},[2104],{"type":48,"value":569},{"type":42,"tag":323,"props":2106,"children":2107},{"style":572},[2108],{"type":48,"value":2109}," knowledgeId ",{"type":42,"tag":323,"props":2111,"children":2112},{"style":578},[2113],{"type":48,"value":581},{"type":42,"tag":323,"props":2115,"children":2116},{"style":572},[2117],{"type":48,"value":2118}," knowledge",{"type":42,"tag":323,"props":2120,"children":2121},{"style":578},[2122],{"type":48,"value":591},{"type":42,"tag":323,"props":2124,"children":2125},{"style":572},[2126],{"type":48,"value":1405},{"type":42,"tag":323,"props":2128,"children":2129},{"style":578},[2130],{"type":48,"value":609},{"type":42,"tag":51,"props":2132,"children":2133},{},[2134],{"type":42,"tag":86,"props":2135,"children":2136},{},[2137],{"type":48,"value":2138},"Step 3 — Wait for processing",{"type":42,"tag":51,"props":2140,"children":2141},{},[2142,2144,2149,2151,2156],{"type":48,"value":2143},"Sources are processed asynchronously. Poll until ",{"type":42,"tag":64,"props":2145,"children":2147},{"className":2146},[],[2148],{"type":48,"value":1350},{"type":48,"value":2150}," is ",{"type":42,"tag":64,"props":2152,"children":2154},{"className":2153},[],[2155],{"type":48,"value":151},{"type":48,"value":591},{"type":42,"tag":51,"props":2158,"children":2159},{},[2160],{"type":42,"tag":86,"props":2161,"children":2162},{},[2163],{"type":48,"value":312},{"type":42,"tag":57,"props":2165,"children":2167},{"className":315,"code":2166,"language":317,"meta":66,"style":66},"while True:\n    k = requests.get(\n        f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\", auth=auth\n    ).json()\n    if k[\"status\"] == \"COMPLETED\":\n        break\n    if k[\"status\"] == \"FAILED\":\n        raise Exception(f\"Processing failed: {k}\")\n    time.sleep(3)\n",[2168],{"type":42,"tag":64,"props":2169,"children":2170},{"__ignoreMap":66},[2171,2178,2186,2194,2202,2210,2217,2225,2233],{"type":42,"tag":323,"props":2172,"children":2173},{"class":325,"line":326},[2174],{"type":42,"tag":323,"props":2175,"children":2176},{},[2177],{"type":48,"value":464},{"type":42,"tag":323,"props":2179,"children":2180},{"class":325,"line":335},[2181],{"type":42,"tag":323,"props":2182,"children":2183},{},[2184],{"type":48,"value":2185},"    k = requests.get(\n",{"type":42,"tag":323,"props":2187,"children":2188},{"class":325,"line":345},[2189],{"type":42,"tag":323,"props":2190,"children":2191},{},[2192],{"type":48,"value":2193},"        f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\", auth=auth\n",{"type":42,"tag":323,"props":2195,"children":2196},{"class":325,"line":354},[2197],{"type":42,"tag":323,"props":2198,"children":2199},{},[2200],{"type":48,"value":2201},"    ).json()\n",{"type":42,"tag":323,"props":2203,"children":2204},{"class":325,"line":363},[2205],{"type":42,"tag":323,"props":2206,"children":2207},{},[2208],{"type":48,"value":2209},"    if k[\"status\"] == \"COMPLETED\":\n",{"type":42,"tag":323,"props":2211,"children":2212},{"class":325,"line":372},[2213],{"type":42,"tag":323,"props":2214,"children":2215},{},[2216],{"type":48,"value":500},{"type":42,"tag":323,"props":2218,"children":2219},{"class":325,"line":30},[2220],{"type":42,"tag":323,"props":2221,"children":2222},{},[2223],{"type":48,"value":2224},"    if k[\"status\"] == \"FAILED\":\n",{"type":42,"tag":323,"props":2226,"children":2227},{"class":325,"line":388},[2228],{"type":42,"tag":323,"props":2229,"children":2230},{},[2231],{"type":48,"value":2232},"        raise Exception(f\"Processing failed: {k}\")\n",{"type":42,"tag":323,"props":2234,"children":2235},{"class":325,"line":397},[2236],{"type":42,"tag":323,"props":2237,"children":2238},{},[2239],{"type":48,"value":2240},"    time.sleep(3)\n",{"type":42,"tag":51,"props":2242,"children":2243},{},[2244],{"type":42,"tag":86,"props":2245,"children":2246},{},[2247],{"type":48,"value":551},{"type":42,"tag":57,"props":2249,"children":2251},{"className":554,"code":2250,"language":556,"meta":66,"style":66},"while (true) {\n    const k = await fetch(\n        `${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}`,\n        { headers: { \"Authorization\": authHeader } }\n    ).then(r => r.json());\n    if (k.status === \"COMPLETED\") break;\n    if (k.status === \"FAILED\") throw new Error(JSON.stringify(k));\n    await new Promise(r => setTimeout(r, 3000));\n}\n",[2252],{"type":42,"tag":64,"props":2253,"children":2254},{"__ignoreMap":66},[2255,2278,2307,2361,2409,2457,2510,2598,2654],{"type":42,"tag":323,"props":2256,"children":2257},{"class":325,"line":326},[2258,2262,2266,2270,2274],{"type":42,"tag":323,"props":2259,"children":2260},{"style":883},[2261],{"type":48,"value":1171},{"type":42,"tag":323,"props":2263,"children":2264},{"style":572},[2265],{"type":48,"value":1176},{"type":42,"tag":323,"props":2267,"children":2268},{"style":1179},[2269],{"type":48,"value":1182},{"type":42,"tag":323,"props":2271,"children":2272},{"style":572},[2273],{"type":48,"value":1187},{"type":42,"tag":323,"props":2275,"children":2276},{"style":578},[2277],{"type":48,"value":1192},{"type":42,"tag":323,"props":2279,"children":2280},{"class":325,"line":335},[2281,2285,2290,2294,2298,2302],{"type":42,"tag":323,"props":2282,"children":2283},{"style":566},[2284],{"type":48,"value":1200},{"type":42,"tag":323,"props":2286,"children":2287},{"style":572},[2288],{"type":48,"value":2289}," k",{"type":42,"tag":323,"props":2291,"children":2292},{"style":578},[2293],{"type":48,"value":1112},{"type":42,"tag":323,"props":2295,"children":2296},{"style":883},[2297],{"type":48,"value":886},{"type":42,"tag":323,"props":2299,"children":2300},{"style":721},[2301],{"type":48,"value":891},{"type":42,"tag":323,"props":2303,"children":2304},{"style":801},[2305],{"type":48,"value":2306},"(\n",{"type":42,"tag":323,"props":2308,"children":2309},{"class":325,"line":345},[2310,2315,2319,2323,2327,2331,2335,2339,2344,2348,2353,2357],{"type":42,"tag":323,"props":2311,"children":2312},{"style":578},[2313],{"type":48,"value":2314},"        `${",{"type":42,"tag":323,"props":2316,"children":2317},{"style":572},[2318],{"type":48,"value":904},{"type":42,"tag":323,"props":2320,"children":2321},{"style":578},[2322],{"type":48,"value":744},{"type":42,"tag":323,"props":2324,"children":2325},{"style":673},[2326],{"type":48,"value":1780},{"type":42,"tag":323,"props":2328,"children":2329},{"style":578},[2330],{"type":48,"value":754},{"type":42,"tag":323,"props":2332,"children":2333},{"style":572},[2334],{"type":48,"value":1789},{"type":42,"tag":323,"props":2336,"children":2337},{"style":578},[2338],{"type":48,"value":744},{"type":42,"tag":323,"props":2340,"children":2341},{"style":673},[2342],{"type":48,"value":2343},"\u002FKnowledge\u002F",{"type":42,"tag":323,"props":2345,"children":2346},{"style":578},[2347],{"type":48,"value":754},{"type":42,"tag":323,"props":2349,"children":2350},{"style":572},[2351],{"type":48,"value":2352},"knowledgeId",{"type":42,"tag":323,"props":2354,"children":2355},{"style":578},[2356],{"type":48,"value":764},{"type":42,"tag":323,"props":2358,"children":2359},{"style":578},[2360],{"type":48,"value":957},{"type":42,"tag":323,"props":2362,"children":2363},{"class":325,"line":354},[2364,2369,2373,2377,2381,2385,2389,2393,2397,2401,2405],{"type":42,"tag":323,"props":2365,"children":2366},{"style":578},[2367],{"type":48,"value":2368},"        {",{"type":42,"tag":323,"props":2370,"children":2371},{"style":801},[2372],{"type":48,"value":1238},{"type":42,"tag":323,"props":2374,"children":2375},{"style":578},[2376],{"type":48,"value":749},{"type":42,"tag":323,"props":2378,"children":2379},{"style":578},[2380],{"type":48,"value":794},{"type":42,"tag":323,"props":2382,"children":2383},{"style":578},[2384],{"type":48,"value":670},{"type":42,"tag":323,"props":2386,"children":2387},{"style":801},[2388],{"type":48,"value":804},{"type":42,"tag":323,"props":2390,"children":2391},{"style":578},[2392],{"type":48,"value":680},{"type":42,"tag":323,"props":2394,"children":2395},{"style":578},[2396],{"type":48,"value":749},{"type":42,"tag":323,"props":2398,"children":2399},{"style":572},[2400],{"type":48,"value":817},{"type":42,"tag":323,"props":2402,"children":2403},{"style":578},[2404],{"type":48,"value":1057},{"type":42,"tag":323,"props":2406,"children":2407},{"style":578},[2408],{"type":48,"value":1424},{"type":42,"tag":323,"props":2410,"children":2411},{"class":325,"line":363},[2412,2417,2421,2425,2429,2433,2437,2441,2445,2449,2453],{"type":42,"tag":323,"props":2413,"children":2414},{"style":801},[2415],{"type":48,"value":2416},"    )",{"type":42,"tag":323,"props":2418,"children":2419},{"style":578},[2420],{"type":48,"value":591},{"type":42,"tag":323,"props":2422,"children":2423},{"style":721},[2424],{"type":48,"value":1287},{"type":42,"tag":323,"props":2426,"children":2427},{"style":801},[2428],{"type":48,"value":729},{"type":42,"tag":323,"props":2430,"children":2431},{"style":1294},[2432],{"type":48,"value":1297},{"type":42,"tag":323,"props":2434,"children":2435},{"style":566},[2436],{"type":48,"value":1302},{"type":42,"tag":323,"props":2438,"children":2439},{"style":572},[2440],{"type":48,"value":1307},{"type":42,"tag":323,"props":2442,"children":2443},{"style":578},[2444],{"type":48,"value":591},{"type":42,"tag":323,"props":2446,"children":2447},{"style":721},[2448],{"type":48,"value":1130},{"type":42,"tag":323,"props":2450,"children":2451},{"style":801},[2452],{"type":48,"value":1320},{"type":42,"tag":323,"props":2454,"children":2455},{"style":578},[2456],{"type":48,"value":609},{"type":42,"tag":323,"props":2458,"children":2459},{"class":325,"line":372},[2460,2464,2468,2473,2477,2481,2485,2489,2493,2497,2501,2506],{"type":42,"tag":323,"props":2461,"children":2462},{"style":883},[2463],{"type":48,"value":1332},{"type":42,"tag":323,"props":2465,"children":2466},{"style":801},[2467],{"type":48,"value":1176},{"type":42,"tag":323,"props":2469,"children":2470},{"style":572},[2471],{"type":48,"value":2472},"k",{"type":42,"tag":323,"props":2474,"children":2475},{"style":578},[2476],{"type":48,"value":591},{"type":42,"tag":323,"props":2478,"children":2479},{"style":572},[2480],{"type":48,"value":1350},{"type":42,"tag":323,"props":2482,"children":2483},{"style":578},[2484],{"type":48,"value":1355},{"type":42,"tag":323,"props":2486,"children":2487},{"style":578},[2488],{"type":48,"value":670},{"type":42,"tag":323,"props":2490,"children":2491},{"style":673},[2492],{"type":48,"value":151},{"type":42,"tag":323,"props":2494,"children":2495},{"style":578},[2496],{"type":48,"value":680},{"type":42,"tag":323,"props":2498,"children":2499},{"style":801},[2500],{"type":48,"value":1187},{"type":42,"tag":323,"props":2502,"children":2503},{"style":883},[2504],{"type":48,"value":2505},"break",{"type":42,"tag":323,"props":2507,"children":2508},{"style":578},[2509],{"type":48,"value":609},{"type":42,"tag":323,"props":2511,"children":2512},{"class":325,"line":30},[2513,2517,2521,2525,2529,2533,2537,2541,2545,2549,2553,2557,2561,2565,2569,2574,2578,2582,2586,2590,2594],{"type":42,"tag":323,"props":2514,"children":2515},{"style":883},[2516],{"type":48,"value":1332},{"type":42,"tag":323,"props":2518,"children":2519},{"style":801},[2520],{"type":48,"value":1176},{"type":42,"tag":323,"props":2522,"children":2523},{"style":572},[2524],{"type":48,"value":2472},{"type":42,"tag":323,"props":2526,"children":2527},{"style":578},[2528],{"type":48,"value":591},{"type":42,"tag":323,"props":2530,"children":2531},{"style":572},[2532],{"type":48,"value":1350},{"type":42,"tag":323,"props":2534,"children":2535},{"style":578},[2536],{"type":48,"value":1355},{"type":42,"tag":323,"props":2538,"children":2539},{"style":578},[2540],{"type":48,"value":670},{"type":42,"tag":323,"props":2542,"children":2543},{"style":673},[2544],{"type":48,"value":1460},{"type":42,"tag":323,"props":2546,"children":2547},{"style":578},[2548],{"type":48,"value":680},{"type":42,"tag":323,"props":2550,"children":2551},{"style":801},[2552],{"type":48,"value":1187},{"type":42,"tag":323,"props":2554,"children":2555},{"style":883},[2556],{"type":48,"value":1473},{"type":42,"tag":323,"props":2558,"children":2559},{"style":578},[2560],{"type":48,"value":1478},{"type":42,"tag":323,"props":2562,"children":2563},{"style":721},[2564],{"type":48,"value":1483},{"type":42,"tag":323,"props":2566,"children":2567},{"style":801},[2568],{"type":48,"value":729},{"type":42,"tag":323,"props":2570,"children":2571},{"style":572},[2572],{"type":48,"value":2573},"JSON",{"type":42,"tag":323,"props":2575,"children":2576},{"style":578},[2577],{"type":48,"value":591},{"type":42,"tag":323,"props":2579,"children":2580},{"style":721},[2581],{"type":48,"value":995},{"type":42,"tag":323,"props":2583,"children":2584},{"style":801},[2585],{"type":48,"value":729},{"type":42,"tag":323,"props":2587,"children":2588},{"style":572},[2589],{"type":48,"value":2472},{"type":42,"tag":323,"props":2591,"children":2592},{"style":801},[2593],{"type":48,"value":1575},{"type":42,"tag":323,"props":2595,"children":2596},{"style":578},[2597],{"type":48,"value":609},{"type":42,"tag":323,"props":2599,"children":2600},{"class":325,"line":388},[2601,2605,2609,2613,2617,2621,2625,2629,2633,2637,2641,2646,2650],{"type":42,"tag":323,"props":2602,"children":2603},{"style":883},[2604],{"type":48,"value":1525},{"type":42,"tag":323,"props":2606,"children":2607},{"style":578},[2608],{"type":48,"value":1478},{"type":42,"tag":323,"props":2610,"children":2611},{"style":1532},[2612],{"type":48,"value":1535},{"type":42,"tag":323,"props":2614,"children":2615},{"style":801},[2616],{"type":48,"value":729},{"type":42,"tag":323,"props":2618,"children":2619},{"style":1294},[2620],{"type":48,"value":1297},{"type":42,"tag":323,"props":2622,"children":2623},{"style":566},[2624],{"type":48,"value":1302},{"type":42,"tag":323,"props":2626,"children":2627},{"style":721},[2628],{"type":48,"value":1552},{"type":42,"tag":323,"props":2630,"children":2631},{"style":801},[2632],{"type":48,"value":729},{"type":42,"tag":323,"props":2634,"children":2635},{"style":572},[2636],{"type":48,"value":1297},{"type":42,"tag":323,"props":2638,"children":2639},{"style":578},[2640],{"type":48,"value":822},{"type":42,"tag":323,"props":2642,"children":2643},{"style":1567},[2644],{"type":48,"value":2645}," 3000",{"type":42,"tag":323,"props":2647,"children":2648},{"style":801},[2649],{"type":48,"value":1575},{"type":42,"tag":323,"props":2651,"children":2652},{"style":578},[2653],{"type":48,"value":609},{"type":42,"tag":323,"props":2655,"children":2656},{"class":325,"line":397},[2657],{"type":42,"tag":323,"props":2658,"children":2659},{"style":578},[2660],{"type":48,"value":1587},{"type":42,"tag":51,"props":2662,"children":2663},{},[2664,2666,2672,2674,2680,2681,2687,2688,2693,2694],{"type":48,"value":2665},"Statuses: ",{"type":42,"tag":64,"props":2667,"children":2669},{"className":2668},[],[2670],{"type":48,"value":2671},"SCHEDULED",{"type":48,"value":2673}," → ",{"type":42,"tag":64,"props":2675,"children":2677},{"className":2676},[],[2678],{"type":48,"value":2679},"QUEUED",{"type":48,"value":2673},{"type":42,"tag":64,"props":2682,"children":2684},{"className":2683},[],[2685],{"type":48,"value":2686},"PROCESSING",{"type":48,"value":2673},{"type":42,"tag":64,"props":2689,"children":2691},{"className":2690},[],[2692],{"type":48,"value":151},{"type":48,"value":281},{"type":42,"tag":64,"props":2695,"children":2697},{"className":2696},[],[2698],{"type":48,"value":1460},{"type":42,"tag":51,"props":2700,"children":2701},{},[2702],{"type":42,"tag":86,"props":2703,"children":2704},{},[2705],{"type":48,"value":2706},"Step 4 — Search and inject into LLM prompt",{"type":42,"tag":51,"props":2708,"children":2709},{},[2710],{"type":42,"tag":86,"props":2711,"children":2712},{},[2713],{"type":48,"value":312},{"type":42,"tag":57,"props":2715,"children":2717},{"className":315,"code":2716,"language":317,"meta":66,"style":66},"results = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": \"How do I reset my password?\", \"top\": 5}\n).json()\n\nchunks = \"\\n\\n\".join(c[\"content\"] for c in results[\"chunks\"])\n\nsystem_prompt = f\"\"\"You are a helpful support agent.\n\nRelevant knowledge:\n{chunks}\n\nAnswer using only the above content.\"\"\"\n",[2718],{"type":42,"tag":64,"props":2719,"children":2720},{"__ignoreMap":66},[2721,2729,2737,2744,2752,2759,2766,2774,2781,2789,2796,2804,2812,2819],{"type":42,"tag":323,"props":2722,"children":2723},{"class":325,"line":326},[2724],{"type":42,"tag":323,"props":2725,"children":2726},{},[2727],{"type":48,"value":2728},"results = requests.post(\n",{"type":42,"tag":323,"props":2730,"children":2731},{"class":325,"line":335},[2732],{"type":42,"tag":323,"props":2733,"children":2734},{},[2735],{"type":48,"value":2736},"    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n",{"type":42,"tag":323,"props":2738,"children":2739},{"class":325,"line":345},[2740],{"type":42,"tag":323,"props":2741,"children":2742},{},[2743],{"type":48,"value":412},{"type":42,"tag":323,"props":2745,"children":2746},{"class":325,"line":354},[2747],{"type":42,"tag":323,"props":2748,"children":2749},{},[2750],{"type":48,"value":2751},"    json={\"query\": \"How do I reset my password?\", \"top\": 5}\n",{"type":42,"tag":323,"props":2753,"children":2754},{"class":325,"line":363},[2755],{"type":42,"tag":323,"props":2756,"children":2757},{},[2758],{"type":48,"value":1706},{"type":42,"tag":323,"props":2760,"children":2761},{"class":325,"line":372},[2762],{"type":42,"tag":323,"props":2763,"children":2764},{"emptyLinePlaceholder":339},[2765],{"type":48,"value":342},{"type":42,"tag":323,"props":2767,"children":2768},{"class":325,"line":30},[2769],{"type":42,"tag":323,"props":2770,"children":2771},{},[2772],{"type":48,"value":2773},"chunks = \"\\n\\n\".join(c[\"content\"] for c in results[\"chunks\"])\n",{"type":42,"tag":323,"props":2775,"children":2776},{"class":325,"line":388},[2777],{"type":42,"tag":323,"props":2778,"children":2779},{"emptyLinePlaceholder":339},[2780],{"type":48,"value":342},{"type":42,"tag":323,"props":2782,"children":2783},{"class":325,"line":397},[2784],{"type":42,"tag":323,"props":2785,"children":2786},{},[2787],{"type":48,"value":2788},"system_prompt = f\"\"\"You are a helpful support agent.\n",{"type":42,"tag":323,"props":2790,"children":2791},{"class":325,"line":406},[2792],{"type":42,"tag":323,"props":2793,"children":2794},{"emptyLinePlaceholder":339},[2795],{"type":48,"value":342},{"type":42,"tag":323,"props":2797,"children":2798},{"class":325,"line":415},[2799],{"type":42,"tag":323,"props":2800,"children":2801},{},[2802],{"type":48,"value":2803},"Relevant knowledge:\n",{"type":42,"tag":323,"props":2805,"children":2806},{"class":325,"line":424},[2807],{"type":42,"tag":323,"props":2808,"children":2809},{},[2810],{"type":48,"value":2811},"{chunks}\n",{"type":42,"tag":323,"props":2813,"children":2814},{"class":325,"line":433},[2815],{"type":42,"tag":323,"props":2816,"children":2817},{"emptyLinePlaceholder":339},[2818],{"type":48,"value":342},{"type":42,"tag":323,"props":2820,"children":2821},{"class":325,"line":441},[2822],{"type":42,"tag":323,"props":2823,"children":2824},{},[2825],{"type":48,"value":2826},"Answer using only the above content.\"\"\"\n",{"type":42,"tag":51,"props":2828,"children":2829},{},[2830],{"type":42,"tag":86,"props":2831,"children":2832},{},[2833],{"type":48,"value":551},{"type":42,"tag":57,"props":2835,"children":2837},{"className":554,"code":2836,"language":556,"meta":66,"style":66},"const results = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ query: \"How do I reset my password?\", top: 5 }),\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",[2838],{"type":42,"tag":64,"props":2839,"children":2840},{"__ignoreMap":66},[2841,2914,2941,2952,3035,3086,3093,3193],{"type":42,"tag":323,"props":2842,"children":2843},{"class":325,"line":326},[2844,2848,2853,2857,2861,2865,2869,2873,2877,2881,2885,2889,2893,2897,2902,2906,2910],{"type":42,"tag":323,"props":2845,"children":2846},{"style":566},[2847],{"type":48,"value":569},{"type":42,"tag":323,"props":2849,"children":2850},{"style":572},[2851],{"type":48,"value":2852}," results ",{"type":42,"tag":323,"props":2854,"children":2855},{"style":578},[2856],{"type":48,"value":581},{"type":42,"tag":323,"props":2858,"children":2859},{"style":883},[2860],{"type":48,"value":886},{"type":42,"tag":323,"props":2862,"children":2863},{"style":721},[2864],{"type":48,"value":891},{"type":42,"tag":323,"props":2866,"children":2867},{"style":572},[2868],{"type":48,"value":729},{"type":42,"tag":323,"props":2870,"children":2871},{"style":578},[2872],{"type":48,"value":734},{"type":42,"tag":323,"props":2874,"children":2875},{"style":572},[2876],{"type":48,"value":904},{"type":42,"tag":323,"props":2878,"children":2879},{"style":578},[2880],{"type":48,"value":744},{"type":42,"tag":323,"props":2882,"children":2883},{"style":673},[2884],{"type":48,"value":1780},{"type":42,"tag":323,"props":2886,"children":2887},{"style":578},[2888],{"type":48,"value":754},{"type":42,"tag":323,"props":2890,"children":2891},{"style":572},[2892],{"type":48,"value":1789},{"type":42,"tag":323,"props":2894,"children":2895},{"style":578},[2896],{"type":48,"value":744},{"type":42,"tag":323,"props":2898,"children":2899},{"style":673},[2900],{"type":48,"value":2901},"\u002FSearch",{"type":42,"tag":323,"props":2903,"children":2904},{"style":578},[2905],{"type":48,"value":918},{"type":42,"tag":323,"props":2907,"children":2908},{"style":578},[2909],{"type":48,"value":822},{"type":42,"tag":323,"props":2911,"children":2912},{"style":578},[2913],{"type":48,"value":927},{"type":42,"tag":323,"props":2915,"children":2916},{"class":325,"line":335},[2917,2921,2925,2929,2933,2937],{"type":42,"tag":323,"props":2918,"children":2919},{"style":801},[2920],{"type":48,"value":935},{"type":42,"tag":323,"props":2922,"children":2923},{"style":578},[2924],{"type":48,"value":749},{"type":42,"tag":323,"props":2926,"children":2927},{"style":578},[2928],{"type":48,"value":670},{"type":42,"tag":323,"props":2930,"children":2931},{"style":673},[2932],{"type":48,"value":948},{"type":42,"tag":323,"props":2934,"children":2935},{"style":578},[2936],{"type":48,"value":680},{"type":42,"tag":323,"props":2938,"children":2939},{"style":578},[2940],{"type":48,"value":957},{"type":42,"tag":323,"props":2942,"children":2943},{"class":325,"line":345},[2944,2948],{"type":42,"tag":323,"props":2945,"children":2946},{"style":572},[2947],{"type":48,"value":965},{"type":42,"tag":323,"props":2949,"children":2950},{"style":578},[2951],{"type":48,"value":957},{"type":42,"tag":323,"props":2953,"children":2954},{"class":325,"line":354},[2955,2959,2963,2967,2971,2975,2979,2983,2988,2992,2996,3001,3005,3009,3014,3018,3023,3027,3031],{"type":42,"tag":323,"props":2956,"children":2957},{"style":801},[2958],{"type":48,"value":977},{"type":42,"tag":323,"props":2960,"children":2961},{"style":578},[2962],{"type":48,"value":749},{"type":42,"tag":323,"props":2964,"children":2965},{"style":572},[2966],{"type":48,"value":986},{"type":42,"tag":323,"props":2968,"children":2969},{"style":578},[2970],{"type":48,"value":591},{"type":42,"tag":323,"props":2972,"children":2973},{"style":721},[2974],{"type":48,"value":995},{"type":42,"tag":323,"props":2976,"children":2977},{"style":572},[2978],{"type":48,"value":729},{"type":42,"tag":323,"props":2980,"children":2981},{"style":578},[2982],{"type":48,"value":1004},{"type":42,"tag":323,"props":2984,"children":2985},{"style":801},[2986],{"type":48,"value":2987}," query",{"type":42,"tag":323,"props":2989,"children":2990},{"style":578},[2991],{"type":48,"value":749},{"type":42,"tag":323,"props":2993,"children":2994},{"style":578},[2995],{"type":48,"value":670},{"type":42,"tag":323,"props":2997,"children":2998},{"style":673},[2999],{"type":48,"value":3000},"How do I reset my password?",{"type":42,"tag":323,"props":3002,"children":3003},{"style":578},[3004],{"type":48,"value":680},{"type":42,"tag":323,"props":3006,"children":3007},{"style":578},[3008],{"type":48,"value":822},{"type":42,"tag":323,"props":3010,"children":3011},{"style":801},[3012],{"type":48,"value":3013}," top",{"type":42,"tag":323,"props":3015,"children":3016},{"style":578},[3017],{"type":48,"value":749},{"type":42,"tag":323,"props":3019,"children":3020},{"style":1567},[3021],{"type":48,"value":3022}," 5",{"type":42,"tag":323,"props":3024,"children":3025},{"style":578},[3026],{"type":48,"value":1057},{"type":42,"tag":323,"props":3028,"children":3029},{"style":572},[3030],{"type":48,"value":769},{"type":42,"tag":323,"props":3032,"children":3033},{"style":578},[3034],{"type":48,"value":957},{"type":42,"tag":323,"props":3036,"children":3037},{"class":325,"line":363},[3038,3042,3046,3050,3054,3058,3062,3066,3070,3074,3078,3082],{"type":42,"tag":323,"props":3039,"children":3040},{"style":578},[3041],{"type":48,"value":744},{"type":42,"tag":323,"props":3043,"children":3044},{"style":572},[3045],{"type":48,"value":769},{"type":42,"tag":323,"props":3047,"children":3048},{"style":578},[3049],{"type":48,"value":591},{"type":42,"tag":323,"props":3051,"children":3052},{"style":721},[3053],{"type":48,"value":1287},{"type":42,"tag":323,"props":3055,"children":3056},{"style":572},[3057],{"type":48,"value":729},{"type":42,"tag":323,"props":3059,"children":3060},{"style":1294},[3061],{"type":48,"value":1297},{"type":42,"tag":323,"props":3063,"children":3064},{"style":566},[3065],{"type":48,"value":1302},{"type":42,"tag":323,"props":3067,"children":3068},{"style":572},[3069],{"type":48,"value":1307},{"type":42,"tag":323,"props":3071,"children":3072},{"style":578},[3073],{"type":48,"value":591},{"type":42,"tag":323,"props":3075,"children":3076},{"style":721},[3077],{"type":48,"value":1130},{"type":42,"tag":323,"props":3079,"children":3080},{"style":572},[3081],{"type":48,"value":1320},{"type":42,"tag":323,"props":3083,"children":3084},{"style":578},[3085],{"type":48,"value":609},{"type":42,"tag":323,"props":3087,"children":3088},{"class":325,"line":372},[3089],{"type":42,"tag":323,"props":3090,"children":3091},{"emptyLinePlaceholder":339},[3092],{"type":48,"value":342},{"type":42,"tag":323,"props":3094,"children":3095},{"class":325,"line":30},[3096,3100,3105,3109,3114,3118,3123,3127,3132,3136,3141,3145,3150,3154,3159,3163,3168,3172,3176,3181,3185,3189],{"type":42,"tag":323,"props":3097,"children":3098},{"style":566},[3099],{"type":48,"value":569},{"type":42,"tag":323,"props":3101,"children":3102},{"style":572},[3103],{"type":48,"value":3104}," chunks ",{"type":42,"tag":323,"props":3106,"children":3107},{"style":578},[3108],{"type":48,"value":581},{"type":42,"tag":323,"props":3110,"children":3111},{"style":572},[3112],{"type":48,"value":3113}," results",{"type":42,"tag":323,"props":3115,"children":3116},{"style":578},[3117],{"type":48,"value":591},{"type":42,"tag":323,"props":3119,"children":3120},{"style":572},[3121],{"type":48,"value":3122},"chunks",{"type":42,"tag":323,"props":3124,"children":3125},{"style":578},[3126],{"type":48,"value":591},{"type":42,"tag":323,"props":3128,"children":3129},{"style":721},[3130],{"type":48,"value":3131},"map",{"type":42,"tag":323,"props":3133,"children":3134},{"style":572},[3135],{"type":48,"value":729},{"type":42,"tag":323,"props":3137,"children":3138},{"style":1294},[3139],{"type":48,"value":3140},"c",{"type":42,"tag":323,"props":3142,"children":3143},{"style":566},[3144],{"type":48,"value":1302},{"type":42,"tag":323,"props":3146,"children":3147},{"style":572},[3148],{"type":48,"value":3149}," c",{"type":42,"tag":323,"props":3151,"children":3152},{"style":578},[3153],{"type":48,"value":591},{"type":42,"tag":323,"props":3155,"children":3156},{"style":572},[3157],{"type":48,"value":3158},"content)",{"type":42,"tag":323,"props":3160,"children":3161},{"style":578},[3162],{"type":48,"value":591},{"type":42,"tag":323,"props":3164,"children":3165},{"style":721},[3166],{"type":48,"value":3167},"join",{"type":42,"tag":323,"props":3169,"children":3170},{"style":572},[3171],{"type":48,"value":729},{"type":42,"tag":323,"props":3173,"children":3174},{"style":578},[3175],{"type":48,"value":680},{"type":42,"tag":323,"props":3177,"children":3178},{"style":572},[3179],{"type":48,"value":3180},"\\n\\n",{"type":42,"tag":323,"props":3182,"children":3183},{"style":578},[3184],{"type":48,"value":680},{"type":42,"tag":323,"props":3186,"children":3187},{"style":572},[3188],{"type":48,"value":769},{"type":42,"tag":323,"props":3190,"children":3191},{"style":578},[3192],{"type":48,"value":609},{"type":42,"tag":323,"props":3194,"children":3195},{"class":325,"line":388},[3196,3200,3205,3209,3214,3219,3223,3228,3233,3237,3241,3245],{"type":42,"tag":323,"props":3197,"children":3198},{"style":566},[3199],{"type":48,"value":569},{"type":42,"tag":323,"props":3201,"children":3202},{"style":572},[3203],{"type":48,"value":3204}," systemPrompt ",{"type":42,"tag":323,"props":3206,"children":3207},{"style":578},[3208],{"type":48,"value":581},{"type":42,"tag":323,"props":3210,"children":3211},{"style":578},[3212],{"type":48,"value":3213}," `",{"type":42,"tag":323,"props":3215,"children":3216},{"style":673},[3217],{"type":48,"value":3218},"You are a helpful support agent.",{"type":42,"tag":323,"props":3220,"children":3221},{"style":572},[3222],{"type":48,"value":3180},{"type":42,"tag":323,"props":3224,"children":3225},{"style":673},[3226],{"type":48,"value":3227},"Relevant knowledge:",{"type":42,"tag":323,"props":3229,"children":3230},{"style":572},[3231],{"type":48,"value":3232},"\\n",{"type":42,"tag":323,"props":3234,"children":3235},{"style":578},[3236],{"type":48,"value":754},{"type":42,"tag":323,"props":3238,"children":3239},{"style":572},[3240],{"type":48,"value":3122},{"type":42,"tag":323,"props":3242,"children":3243},{"style":578},[3244],{"type":48,"value":764},{"type":42,"tag":323,"props":3246,"children":3247},{"style":578},[3248],{"type":48,"value":609},{"type":42,"tag":210,"props":3250,"children":3251},{},[],{"type":42,"tag":43,"props":3253,"children":3255},{"id":3254},"key-patterns",[3256],{"type":48,"value":3257},"Key Patterns",{"type":42,"tag":3259,"props":3260,"children":3262},"h3",{"id":3261},"combine-with-conversation-memory",[3263],{"type":48,"value":3264},"Combine with Conversation Memory",{"type":42,"tag":51,"props":3266,"children":3267},{},[3268],{"type":48,"value":3269},"For the best agent responses, combine Enterprise Knowledge (company content) with Conversation Memory Recall (individual customer history).",{"type":42,"tag":51,"props":3271,"children":3272},{},[3273],{"type":42,"tag":86,"props":3274,"children":3275},{},[3276],{"type":48,"value":312},{"type":42,"tag":57,"props":3278,"children":3280},{"className":315,"code":3279,"language":317,"meta":66,"style":66},"recall_res = requests.post(\n    f\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F{store_id}\u002FProfiles\u002F{profile_id}\u002FRecall\",\n    auth=auth,\n    json={\"query\": user_query, \"observationsLimit\": 5}\n).json()\n\nsearch_res = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": user_query, \"top\": 3}\n).json()\n\ncustomer_context = \"\\n\".join(o[\"content\"] for o in recall_res.get(\"observations\", []))\nknowledge = \"\\n\\n\".join(c[\"content\"] for c in search_res.get(\"chunks\", []))\n\nsystem_prompt = f\"\"\"Customer history:\\n{customer_context}\\n\\nDocumentation:\\n{knowledge}\"\"\"\n",[3281],{"type":42,"tag":64,"props":3282,"children":3283},{"__ignoreMap":66},[3284,3292,3300,3307,3315,3322,3329,3337,3344,3351,3359,3366,3373,3381,3389,3396],{"type":42,"tag":323,"props":3285,"children":3286},{"class":325,"line":326},[3287],{"type":42,"tag":323,"props":3288,"children":3289},{},[3290],{"type":48,"value":3291},"recall_res = requests.post(\n",{"type":42,"tag":323,"props":3293,"children":3294},{"class":325,"line":335},[3295],{"type":42,"tag":323,"props":3296,"children":3297},{},[3298],{"type":48,"value":3299},"    f\"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F{store_id}\u002FProfiles\u002F{profile_id}\u002FRecall\",\n",{"type":42,"tag":323,"props":3301,"children":3302},{"class":325,"line":345},[3303],{"type":42,"tag":323,"props":3304,"children":3305},{},[3306],{"type":48,"value":412},{"type":42,"tag":323,"props":3308,"children":3309},{"class":325,"line":354},[3310],{"type":42,"tag":323,"props":3311,"children":3312},{},[3313],{"type":48,"value":3314},"    json={\"query\": user_query, \"observationsLimit\": 5}\n",{"type":42,"tag":323,"props":3316,"children":3317},{"class":325,"line":363},[3318],{"type":42,"tag":323,"props":3319,"children":3320},{},[3321],{"type":48,"value":1706},{"type":42,"tag":323,"props":3323,"children":3324},{"class":325,"line":372},[3325],{"type":42,"tag":323,"props":3326,"children":3327},{"emptyLinePlaceholder":339},[3328],{"type":48,"value":342},{"type":42,"tag":323,"props":3330,"children":3331},{"class":325,"line":30},[3332],{"type":42,"tag":323,"props":3333,"children":3334},{},[3335],{"type":48,"value":3336},"search_res = requests.post(\n",{"type":42,"tag":323,"props":3338,"children":3339},{"class":325,"line":388},[3340],{"type":42,"tag":323,"props":3341,"children":3342},{},[3343],{"type":48,"value":2736},{"type":42,"tag":323,"props":3345,"children":3346},{"class":325,"line":397},[3347],{"type":42,"tag":323,"props":3348,"children":3349},{},[3350],{"type":48,"value":412},{"type":42,"tag":323,"props":3352,"children":3353},{"class":325,"line":406},[3354],{"type":42,"tag":323,"props":3355,"children":3356},{},[3357],{"type":48,"value":3358},"    json={\"query\": user_query, \"top\": 3}\n",{"type":42,"tag":323,"props":3360,"children":3361},{"class":325,"line":415},[3362],{"type":42,"tag":323,"props":3363,"children":3364},{},[3365],{"type":48,"value":1706},{"type":42,"tag":323,"props":3367,"children":3368},{"class":325,"line":424},[3369],{"type":42,"tag":323,"props":3370,"children":3371},{"emptyLinePlaceholder":339},[3372],{"type":48,"value":342},{"type":42,"tag":323,"props":3374,"children":3375},{"class":325,"line":433},[3376],{"type":42,"tag":323,"props":3377,"children":3378},{},[3379],{"type":48,"value":3380},"customer_context = \"\\n\".join(o[\"content\"] for o in recall_res.get(\"observations\", []))\n",{"type":42,"tag":323,"props":3382,"children":3383},{"class":325,"line":441},[3384],{"type":42,"tag":323,"props":3385,"children":3386},{},[3387],{"type":48,"value":3388},"knowledge = \"\\n\\n\".join(c[\"content\"] for c in search_res.get(\"chunks\", []))\n",{"type":42,"tag":323,"props":3390,"children":3391},{"class":325,"line":450},[3392],{"type":42,"tag":323,"props":3393,"children":3394},{"emptyLinePlaceholder":339},[3395],{"type":48,"value":342},{"type":42,"tag":323,"props":3397,"children":3398},{"class":325,"line":458},[3399],{"type":42,"tag":323,"props":3400,"children":3401},{},[3402],{"type":48,"value":3403},"system_prompt = f\"\"\"Customer history:\\n{customer_context}\\n\\nDocumentation:\\n{knowledge}\"\"\"\n",{"type":42,"tag":51,"props":3405,"children":3406},{},[3407],{"type":42,"tag":86,"props":3408,"children":3409},{},[3410],{"type":48,"value":551},{"type":42,"tag":57,"props":3412,"children":3414},{"className":554,"code":3413,"language":556,"meta":66,"style":66},"const [recallRes, searchRes] = await Promise.all([\n    fetch(`https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F${storeId}\u002FProfiles\u002F${profileId}\u002FRecall`, {\n        method: \"POST\",\n        headers,\n        body: JSON.stringify({ query: userQuery, observationsLimit: 5 }),\n    }).then(r => r.json()),\n    fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n        method: \"POST\",\n        headers,\n        body: JSON.stringify({ query: userQuery, top: 3 }),\n    }).then(r => r.json()),\n]);\n\nconst customerContext = recallRes.observations.map(o => o.content).join(\"\\n\");\nconst knowledge = searchRes.chunks.map(c => c.content).join(\"\\n\\n\");\n",[3415],{"type":42,"tag":64,"props":3416,"children":3417},{"__ignoreMap":66},[3418,3475,3544,3572,3584,3658,3709,3764,3791,3802,3873,3924,3936,3943,4039],{"type":42,"tag":323,"props":3419,"children":3420},{"class":325,"line":326},[3421,3425,3430,3435,3439,3444,3449,3453,3457,3461,3465,3470],{"type":42,"tag":323,"props":3422,"children":3423},{"style":566},[3424],{"type":48,"value":569},{"type":42,"tag":323,"props":3426,"children":3427},{"style":578},[3428],{"type":48,"value":3429}," [",{"type":42,"tag":323,"props":3431,"children":3432},{"style":572},[3433],{"type":48,"value":3434},"recallRes",{"type":42,"tag":323,"props":3436,"children":3437},{"style":578},[3438],{"type":48,"value":822},{"type":42,"tag":323,"props":3440,"children":3441},{"style":572},[3442],{"type":48,"value":3443}," searchRes",{"type":42,"tag":323,"props":3445,"children":3446},{"style":578},[3447],{"type":48,"value":3448},"]",{"type":42,"tag":323,"props":3450,"children":3451},{"style":578},[3452],{"type":48,"value":1112},{"type":42,"tag":323,"props":3454,"children":3455},{"style":883},[3456],{"type":48,"value":886},{"type":42,"tag":323,"props":3458,"children":3459},{"style":1532},[3460],{"type":48,"value":1535},{"type":42,"tag":323,"props":3462,"children":3463},{"style":578},[3464],{"type":48,"value":591},{"type":42,"tag":323,"props":3466,"children":3467},{"style":721},[3468],{"type":48,"value":3469},"all",{"type":42,"tag":323,"props":3471,"children":3472},{"style":572},[3473],{"type":48,"value":3474},"([\n",{"type":42,"tag":323,"props":3476,"children":3477},{"class":325,"line":335},[3478,3483,3487,3491,3496,3500,3505,3509,3514,3518,3523,3527,3532,3536,3540],{"type":42,"tag":323,"props":3479,"children":3480},{"style":721},[3481],{"type":48,"value":3482},"    fetch",{"type":42,"tag":323,"props":3484,"children":3485},{"style":572},[3486],{"type":48,"value":729},{"type":42,"tag":323,"props":3488,"children":3489},{"style":578},[3490],{"type":48,"value":918},{"type":42,"tag":323,"props":3492,"children":3493},{"style":673},[3494],{"type":48,"value":3495},"https:\u002F\u002Fmemory.twilio.com\u002Fv1\u002FStores\u002F",{"type":42,"tag":323,"props":3497,"children":3498},{"style":578},[3499],{"type":48,"value":754},{"type":42,"tag":323,"props":3501,"children":3502},{"style":572},[3503],{"type":48,"value":3504},"storeId",{"type":42,"tag":323,"props":3506,"children":3507},{"style":578},[3508],{"type":48,"value":744},{"type":42,"tag":323,"props":3510,"children":3511},{"style":673},[3512],{"type":48,"value":3513},"\u002FProfiles\u002F",{"type":42,"tag":323,"props":3515,"children":3516},{"style":578},[3517],{"type":48,"value":754},{"type":42,"tag":323,"props":3519,"children":3520},{"style":572},[3521],{"type":48,"value":3522},"profileId",{"type":42,"tag":323,"props":3524,"children":3525},{"style":578},[3526],{"type":48,"value":744},{"type":42,"tag":323,"props":3528,"children":3529},{"style":673},[3530],{"type":48,"value":3531},"\u002FRecall",{"type":42,"tag":323,"props":3533,"children":3534},{"style":578},[3535],{"type":48,"value":918},{"type":42,"tag":323,"props":3537,"children":3538},{"style":578},[3539],{"type":48,"value":822},{"type":42,"tag":323,"props":3541,"children":3542},{"style":578},[3543],{"type":48,"value":927},{"type":42,"tag":323,"props":3545,"children":3546},{"class":325,"line":345},[3547,3552,3556,3560,3564,3568],{"type":42,"tag":323,"props":3548,"children":3549},{"style":801},[3550],{"type":48,"value":3551},"        method",{"type":42,"tag":323,"props":3553,"children":3554},{"style":578},[3555],{"type":48,"value":749},{"type":42,"tag":323,"props":3557,"children":3558},{"style":578},[3559],{"type":48,"value":670},{"type":42,"tag":323,"props":3561,"children":3562},{"style":673},[3563],{"type":48,"value":948},{"type":42,"tag":323,"props":3565,"children":3566},{"style":578},[3567],{"type":48,"value":680},{"type":42,"tag":323,"props":3569,"children":3570},{"style":578},[3571],{"type":48,"value":957},{"type":42,"tag":323,"props":3573,"children":3574},{"class":325,"line":354},[3575,3580],{"type":42,"tag":323,"props":3576,"children":3577},{"style":572},[3578],{"type":48,"value":3579},"        headers",{"type":42,"tag":323,"props":3581,"children":3582},{"style":578},[3583],{"type":48,"value":957},{"type":42,"tag":323,"props":3585,"children":3586},{"class":325,"line":363},[3587,3592,3596,3600,3604,3608,3612,3616,3620,3624,3629,3633,3638,3642,3646,3650,3654],{"type":42,"tag":323,"props":3588,"children":3589},{"style":801},[3590],{"type":48,"value":3591},"        body",{"type":42,"tag":323,"props":3593,"children":3594},{"style":578},[3595],{"type":48,"value":749},{"type":42,"tag":323,"props":3597,"children":3598},{"style":572},[3599],{"type":48,"value":986},{"type":42,"tag":323,"props":3601,"children":3602},{"style":578},[3603],{"type":48,"value":591},{"type":42,"tag":323,"props":3605,"children":3606},{"style":721},[3607],{"type":48,"value":995},{"type":42,"tag":323,"props":3609,"children":3610},{"style":572},[3611],{"type":48,"value":729},{"type":42,"tag":323,"props":3613,"children":3614},{"style":578},[3615],{"type":48,"value":1004},{"type":42,"tag":323,"props":3617,"children":3618},{"style":801},[3619],{"type":48,"value":2987},{"type":42,"tag":323,"props":3621,"children":3622},{"style":578},[3623],{"type":48,"value":749},{"type":42,"tag":323,"props":3625,"children":3626},{"style":572},[3627],{"type":48,"value":3628}," userQuery",{"type":42,"tag":323,"props":3630,"children":3631},{"style":578},[3632],{"type":48,"value":822},{"type":42,"tag":323,"props":3634,"children":3635},{"style":801},[3636],{"type":48,"value":3637}," observationsLimit",{"type":42,"tag":323,"props":3639,"children":3640},{"style":578},[3641],{"type":48,"value":749},{"type":42,"tag":323,"props":3643,"children":3644},{"style":1567},[3645],{"type":48,"value":3022},{"type":42,"tag":323,"props":3647,"children":3648},{"style":578},[3649],{"type":48,"value":1057},{"type":42,"tag":323,"props":3651,"children":3652},{"style":572},[3653],{"type":48,"value":769},{"type":42,"tag":323,"props":3655,"children":3656},{"style":578},[3657],{"type":48,"value":957},{"type":42,"tag":323,"props":3659,"children":3660},{"class":325,"line":372},[3661,3665,3669,3673,3677,3681,3685,3689,3693,3697,3701,3705],{"type":42,"tag":323,"props":3662,"children":3663},{"style":578},[3664],{"type":48,"value":2031},{"type":42,"tag":323,"props":3666,"children":3667},{"style":572},[3668],{"type":48,"value":769},{"type":42,"tag":323,"props":3670,"children":3671},{"style":578},[3672],{"type":48,"value":591},{"type":42,"tag":323,"props":3674,"children":3675},{"style":721},[3676],{"type":48,"value":1287},{"type":42,"tag":323,"props":3678,"children":3679},{"style":572},[3680],{"type":48,"value":729},{"type":42,"tag":323,"props":3682,"children":3683},{"style":1294},[3684],{"type":48,"value":1297},{"type":42,"tag":323,"props":3686,"children":3687},{"style":566},[3688],{"type":48,"value":1302},{"type":42,"tag":323,"props":3690,"children":3691},{"style":572},[3692],{"type":48,"value":1307},{"type":42,"tag":323,"props":3694,"children":3695},{"style":578},[3696],{"type":48,"value":591},{"type":42,"tag":323,"props":3698,"children":3699},{"style":721},[3700],{"type":48,"value":1130},{"type":42,"tag":323,"props":3702,"children":3703},{"style":572},[3704],{"type":48,"value":1320},{"type":42,"tag":323,"props":3706,"children":3707},{"style":578},[3708],{"type":48,"value":957},{"type":42,"tag":323,"props":3710,"children":3711},{"class":325,"line":30},[3712,3716,3720,3724,3728,3732,3736,3740,3744,3748,3752,3756,3760],{"type":42,"tag":323,"props":3713,"children":3714},{"style":721},[3715],{"type":48,"value":3482},{"type":42,"tag":323,"props":3717,"children":3718},{"style":572},[3719],{"type":48,"value":729},{"type":42,"tag":323,"props":3721,"children":3722},{"style":578},[3723],{"type":48,"value":734},{"type":42,"tag":323,"props":3725,"children":3726},{"style":572},[3727],{"type":48,"value":904},{"type":42,"tag":323,"props":3729,"children":3730},{"style":578},[3731],{"type":48,"value":744},{"type":42,"tag":323,"props":3733,"children":3734},{"style":673},[3735],{"type":48,"value":1780},{"type":42,"tag":323,"props":3737,"children":3738},{"style":578},[3739],{"type":48,"value":754},{"type":42,"tag":323,"props":3741,"children":3742},{"style":572},[3743],{"type":48,"value":1789},{"type":42,"tag":323,"props":3745,"children":3746},{"style":578},[3747],{"type":48,"value":744},{"type":42,"tag":323,"props":3749,"children":3750},{"style":673},[3751],{"type":48,"value":2901},{"type":42,"tag":323,"props":3753,"children":3754},{"style":578},[3755],{"type":48,"value":918},{"type":42,"tag":323,"props":3757,"children":3758},{"style":578},[3759],{"type":48,"value":822},{"type":42,"tag":323,"props":3761,"children":3762},{"style":578},[3763],{"type":48,"value":927},{"type":42,"tag":323,"props":3765,"children":3766},{"class":325,"line":388},[3767,3771,3775,3779,3783,3787],{"type":42,"tag":323,"props":3768,"children":3769},{"style":801},[3770],{"type":48,"value":3551},{"type":42,"tag":323,"props":3772,"children":3773},{"style":578},[3774],{"type":48,"value":749},{"type":42,"tag":323,"props":3776,"children":3777},{"style":578},[3778],{"type":48,"value":670},{"type":42,"tag":323,"props":3780,"children":3781},{"style":673},[3782],{"type":48,"value":948},{"type":42,"tag":323,"props":3784,"children":3785},{"style":578},[3786],{"type":48,"value":680},{"type":42,"tag":323,"props":3788,"children":3789},{"style":578},[3790],{"type":48,"value":957},{"type":42,"tag":323,"props":3792,"children":3793},{"class":325,"line":397},[3794,3798],{"type":42,"tag":323,"props":3795,"children":3796},{"style":572},[3797],{"type":48,"value":3579},{"type":42,"tag":323,"props":3799,"children":3800},{"style":578},[3801],{"type":48,"value":957},{"type":42,"tag":323,"props":3803,"children":3804},{"class":325,"line":406},[3805,3809,3813,3817,3821,3825,3829,3833,3837,3841,3845,3849,3853,3857,3861,3865,3869],{"type":42,"tag":323,"props":3806,"children":3807},{"style":801},[3808],{"type":48,"value":3591},{"type":42,"tag":323,"props":3810,"children":3811},{"style":578},[3812],{"type":48,"value":749},{"type":42,"tag":323,"props":3814,"children":3815},{"style":572},[3816],{"type":48,"value":986},{"type":42,"tag":323,"props":3818,"children":3819},{"style":578},[3820],{"type":48,"value":591},{"type":42,"tag":323,"props":3822,"children":3823},{"style":721},[3824],{"type":48,"value":995},{"type":42,"tag":323,"props":3826,"children":3827},{"style":572},[3828],{"type":48,"value":729},{"type":42,"tag":323,"props":3830,"children":3831},{"style":578},[3832],{"type":48,"value":1004},{"type":42,"tag":323,"props":3834,"children":3835},{"style":801},[3836],{"type":48,"value":2987},{"type":42,"tag":323,"props":3838,"children":3839},{"style":578},[3840],{"type":48,"value":749},{"type":42,"tag":323,"props":3842,"children":3843},{"style":572},[3844],{"type":48,"value":3628},{"type":42,"tag":323,"props":3846,"children":3847},{"style":578},[3848],{"type":48,"value":822},{"type":42,"tag":323,"props":3850,"children":3851},{"style":801},[3852],{"type":48,"value":3013},{"type":42,"tag":323,"props":3854,"children":3855},{"style":578},[3856],{"type":48,"value":749},{"type":42,"tag":323,"props":3858,"children":3859},{"style":1567},[3860],{"type":48,"value":2018},{"type":42,"tag":323,"props":3862,"children":3863},{"style":578},[3864],{"type":48,"value":1057},{"type":42,"tag":323,"props":3866,"children":3867},{"style":572},[3868],{"type":48,"value":769},{"type":42,"tag":323,"props":3870,"children":3871},{"style":578},[3872],{"type":48,"value":957},{"type":42,"tag":323,"props":3874,"children":3875},{"class":325,"line":415},[3876,3880,3884,3888,3892,3896,3900,3904,3908,3912,3916,3920],{"type":42,"tag":323,"props":3877,"children":3878},{"style":578},[3879],{"type":48,"value":2031},{"type":42,"tag":323,"props":3881,"children":3882},{"style":572},[3883],{"type":48,"value":769},{"type":42,"tag":323,"props":3885,"children":3886},{"style":578},[3887],{"type":48,"value":591},{"type":42,"tag":323,"props":3889,"children":3890},{"style":721},[3891],{"type":48,"value":1287},{"type":42,"tag":323,"props":3893,"children":3894},{"style":572},[3895],{"type":48,"value":729},{"type":42,"tag":323,"props":3897,"children":3898},{"style":1294},[3899],{"type":48,"value":1297},{"type":42,"tag":323,"props":3901,"children":3902},{"style":566},[3903],{"type":48,"value":1302},{"type":42,"tag":323,"props":3905,"children":3906},{"style":572},[3907],{"type":48,"value":1307},{"type":42,"tag":323,"props":3909,"children":3910},{"style":578},[3911],{"type":48,"value":591},{"type":42,"tag":323,"props":3913,"children":3914},{"style":721},[3915],{"type":48,"value":1130},{"type":42,"tag":323,"props":3917,"children":3918},{"style":572},[3919],{"type":48,"value":1320},{"type":42,"tag":323,"props":3921,"children":3922},{"style":578},[3923],{"type":48,"value":957},{"type":42,"tag":323,"props":3925,"children":3926},{"class":325,"line":424},[3927,3932],{"type":42,"tag":323,"props":3928,"children":3929},{"style":572},[3930],{"type":48,"value":3931},"])",{"type":42,"tag":323,"props":3933,"children":3934},{"style":578},[3935],{"type":48,"value":609},{"type":42,"tag":323,"props":3937,"children":3938},{"class":325,"line":433},[3939],{"type":42,"tag":323,"props":3940,"children":3941},{"emptyLinePlaceholder":339},[3942],{"type":48,"value":342},{"type":42,"tag":323,"props":3944,"children":3945},{"class":325,"line":441},[3946,3950,3955,3959,3964,3968,3973,3977,3981,3985,3990,3994,3999,4003,4007,4011,4015,4019,4023,4027,4031,4035],{"type":42,"tag":323,"props":3947,"children":3948},{"style":566},[3949],{"type":48,"value":569},{"type":42,"tag":323,"props":3951,"children":3952},{"style":572},[3953],{"type":48,"value":3954}," customerContext ",{"type":42,"tag":323,"props":3956,"children":3957},{"style":578},[3958],{"type":48,"value":581},{"type":42,"tag":323,"props":3960,"children":3961},{"style":572},[3962],{"type":48,"value":3963}," recallRes",{"type":42,"tag":323,"props":3965,"children":3966},{"style":578},[3967],{"type":48,"value":591},{"type":42,"tag":323,"props":3969,"children":3970},{"style":572},[3971],{"type":48,"value":3972},"observations",{"type":42,"tag":323,"props":3974,"children":3975},{"style":578},[3976],{"type":48,"value":591},{"type":42,"tag":323,"props":3978,"children":3979},{"style":721},[3980],{"type":48,"value":3131},{"type":42,"tag":323,"props":3982,"children":3983},{"style":572},[3984],{"type":48,"value":729},{"type":42,"tag":323,"props":3986,"children":3987},{"style":1294},[3988],{"type":48,"value":3989},"o",{"type":42,"tag":323,"props":3991,"children":3992},{"style":566},[3993],{"type":48,"value":1302},{"type":42,"tag":323,"props":3995,"children":3996},{"style":572},[3997],{"type":48,"value":3998}," o",{"type":42,"tag":323,"props":4000,"children":4001},{"style":578},[4002],{"type":48,"value":591},{"type":42,"tag":323,"props":4004,"children":4005},{"style":572},[4006],{"type":48,"value":3158},{"type":42,"tag":323,"props":4008,"children":4009},{"style":578},[4010],{"type":48,"value":591},{"type":42,"tag":323,"props":4012,"children":4013},{"style":721},[4014],{"type":48,"value":3167},{"type":42,"tag":323,"props":4016,"children":4017},{"style":572},[4018],{"type":48,"value":729},{"type":42,"tag":323,"props":4020,"children":4021},{"style":578},[4022],{"type":48,"value":680},{"type":42,"tag":323,"props":4024,"children":4025},{"style":572},[4026],{"type":48,"value":3232},{"type":42,"tag":323,"props":4028,"children":4029},{"style":578},[4030],{"type":48,"value":680},{"type":42,"tag":323,"props":4032,"children":4033},{"style":572},[4034],{"type":48,"value":769},{"type":42,"tag":323,"props":4036,"children":4037},{"style":578},[4038],{"type":48,"value":609},{"type":42,"tag":323,"props":4040,"children":4041},{"class":325,"line":450},[4042,4046,4050,4054,4058,4062,4066,4070,4074,4078,4082,4086,4090,4094,4098,4102,4106,4110,4114,4118,4122,4126],{"type":42,"tag":323,"props":4043,"children":4044},{"style":566},[4045],{"type":48,"value":569},{"type":42,"tag":323,"props":4047,"children":4048},{"style":572},[4049],{"type":48,"value":1747},{"type":42,"tag":323,"props":4051,"children":4052},{"style":578},[4053],{"type":48,"value":581},{"type":42,"tag":323,"props":4055,"children":4056},{"style":572},[4057],{"type":48,"value":3443},{"type":42,"tag":323,"props":4059,"children":4060},{"style":578},[4061],{"type":48,"value":591},{"type":42,"tag":323,"props":4063,"children":4064},{"style":572},[4065],{"type":48,"value":3122},{"type":42,"tag":323,"props":4067,"children":4068},{"style":578},[4069],{"type":48,"value":591},{"type":42,"tag":323,"props":4071,"children":4072},{"style":721},[4073],{"type":48,"value":3131},{"type":42,"tag":323,"props":4075,"children":4076},{"style":572},[4077],{"type":48,"value":729},{"type":42,"tag":323,"props":4079,"children":4080},{"style":1294},[4081],{"type":48,"value":3140},{"type":42,"tag":323,"props":4083,"children":4084},{"style":566},[4085],{"type":48,"value":1302},{"type":42,"tag":323,"props":4087,"children":4088},{"style":572},[4089],{"type":48,"value":3149},{"type":42,"tag":323,"props":4091,"children":4092},{"style":578},[4093],{"type":48,"value":591},{"type":42,"tag":323,"props":4095,"children":4096},{"style":572},[4097],{"type":48,"value":3158},{"type":42,"tag":323,"props":4099,"children":4100},{"style":578},[4101],{"type":48,"value":591},{"type":42,"tag":323,"props":4103,"children":4104},{"style":721},[4105],{"type":48,"value":3167},{"type":42,"tag":323,"props":4107,"children":4108},{"style":572},[4109],{"type":48,"value":729},{"type":42,"tag":323,"props":4111,"children":4112},{"style":578},[4113],{"type":48,"value":680},{"type":42,"tag":323,"props":4115,"children":4116},{"style":572},[4117],{"type":48,"value":3180},{"type":42,"tag":323,"props":4119,"children":4120},{"style":578},[4121],{"type":48,"value":680},{"type":42,"tag":323,"props":4123,"children":4124},{"style":572},[4125],{"type":48,"value":769},{"type":42,"tag":323,"props":4127,"children":4128},{"style":578},[4129],{"type":48,"value":609},{"type":42,"tag":3259,"props":4131,"children":4133},{"id":4132},"file-upload-pdfcsvmarkdown",[4134],{"type":48,"value":4135},"File Upload (PDF\u002FCSV\u002FMarkdown)",{"type":42,"tag":51,"props":4137,"children":4138},{},[4139],{"type":48,"value":4140},"File sources return a presigned URL. Upload the file there — do not include auth headers.",{"type":42,"tag":51,"props":4142,"children":4143},{},[4144],{"type":42,"tag":86,"props":4145,"children":4146},{},[4147],{"type":48,"value":312},{"type":42,"tag":57,"props":4149,"children":4151},{"className":315,"code":4150,"language":317,"meta":66,"style":66},"knowledge = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\",\n    auth=auth,\n    json={\"name\": \"Handbook\", \"description\": \"Employee handbook\", \"source\": {\"type\": \"File\"}}\n).json()\n\nupload_url = knowledge[\"source\"][\"importUrl\"]\n\nwith open(\"handbook.pdf\", \"rb\") as f:\n    requests.put(upload_url, data=f, headers={\"Content-Type\": \"application\u002Fpdf\"})\n",[4152],{"type":42,"tag":64,"props":4153,"children":4154},{"__ignoreMap":66},[4155,4162,4169,4176,4184,4191,4198,4206,4213,4221],{"type":42,"tag":323,"props":4156,"children":4157},{"class":325,"line":326},[4158],{"type":42,"tag":323,"props":4159,"children":4160},{},[4161],{"type":48,"value":1643},{"type":42,"tag":323,"props":4163,"children":4164},{"class":325,"line":335},[4165],{"type":42,"tag":323,"props":4166,"children":4167},{},[4168],{"type":48,"value":1651},{"type":42,"tag":323,"props":4170,"children":4171},{"class":325,"line":345},[4172],{"type":42,"tag":323,"props":4173,"children":4174},{},[4175],{"type":48,"value":412},{"type":42,"tag":323,"props":4177,"children":4178},{"class":325,"line":354},[4179],{"type":42,"tag":323,"props":4180,"children":4181},{},[4182],{"type":48,"value":4183},"    json={\"name\": \"Handbook\", \"description\": \"Employee handbook\", \"source\": {\"type\": \"File\"}}\n",{"type":42,"tag":323,"props":4185,"children":4186},{"class":325,"line":363},[4187],{"type":42,"tag":323,"props":4188,"children":4189},{},[4190],{"type":48,"value":1706},{"type":42,"tag":323,"props":4192,"children":4193},{"class":325,"line":372},[4194],{"type":42,"tag":323,"props":4195,"children":4196},{"emptyLinePlaceholder":339},[4197],{"type":48,"value":342},{"type":42,"tag":323,"props":4199,"children":4200},{"class":325,"line":30},[4201],{"type":42,"tag":323,"props":4202,"children":4203},{},[4204],{"type":48,"value":4205},"upload_url = knowledge[\"source\"][\"importUrl\"]\n",{"type":42,"tag":323,"props":4207,"children":4208},{"class":325,"line":388},[4209],{"type":42,"tag":323,"props":4210,"children":4211},{"emptyLinePlaceholder":339},[4212],{"type":48,"value":342},{"type":42,"tag":323,"props":4214,"children":4215},{"class":325,"line":397},[4216],{"type":42,"tag":323,"props":4217,"children":4218},{},[4219],{"type":48,"value":4220},"with open(\"handbook.pdf\", \"rb\") as f:\n",{"type":42,"tag":323,"props":4222,"children":4223},{"class":325,"line":406},[4224],{"type":42,"tag":323,"props":4225,"children":4226},{},[4227],{"type":48,"value":4228},"    requests.put(upload_url, data=f, headers={\"Content-Type\": \"application\u002Fpdf\"})\n",{"type":42,"tag":51,"props":4230,"children":4231},{},[4232],{"type":42,"tag":86,"props":4233,"children":4234},{},[4235],{"type":48,"value":551},{"type":42,"tag":57,"props":4237,"children":4239},{"className":554,"code":4238,"language":556,"meta":66,"style":66},"const knowledge = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ name: \"Handbook\", description: \"Employee handbook\", source: { type: \"File\" } }),\n}).then(r => r.json());\n\nconst file = await fs.promises.readFile(\"handbook.pdf\");\nawait fetch(knowledge.source.importUrl, {\n    method: \"PUT\",\n    headers: { \"Content-Type\": \"application\u002Fpdf\" },\n    body: file,\n});\n",[4240],{"type":42,"tag":64,"props":4241,"children":4242},{"__ignoreMap":66},[4243,4314,4341,4352,4483,4534,4541,4609,4652,4680,4728,4748],{"type":42,"tag":323,"props":4244,"children":4245},{"class":325,"line":326},[4246,4250,4254,4258,4262,4266,4270,4274,4278,4282,4286,4290,4294,4298,4302,4306,4310],{"type":42,"tag":323,"props":4247,"children":4248},{"style":566},[4249],{"type":48,"value":569},{"type":42,"tag":323,"props":4251,"children":4252},{"style":572},[4253],{"type":48,"value":1747},{"type":42,"tag":323,"props":4255,"children":4256},{"style":578},[4257],{"type":48,"value":581},{"type":42,"tag":323,"props":4259,"children":4260},{"style":883},[4261],{"type":48,"value":886},{"type":42,"tag":323,"props":4263,"children":4264},{"style":721},[4265],{"type":48,"value":891},{"type":42,"tag":323,"props":4267,"children":4268},{"style":572},[4269],{"type":48,"value":729},{"type":42,"tag":323,"props":4271,"children":4272},{"style":578},[4273],{"type":48,"value":734},{"type":42,"tag":323,"props":4275,"children":4276},{"style":572},[4277],{"type":48,"value":904},{"type":42,"tag":323,"props":4279,"children":4280},{"style":578},[4281],{"type":48,"value":744},{"type":42,"tag":323,"props":4283,"children":4284},{"style":673},[4285],{"type":48,"value":1780},{"type":42,"tag":323,"props":4287,"children":4288},{"style":578},[4289],{"type":48,"value":754},{"type":42,"tag":323,"props":4291,"children":4292},{"style":572},[4293],{"type":48,"value":1789},{"type":42,"tag":323,"props":4295,"children":4296},{"style":578},[4297],{"type":48,"value":744},{"type":42,"tag":323,"props":4299,"children":4300},{"style":673},[4301],{"type":48,"value":1798},{"type":42,"tag":323,"props":4303,"children":4304},{"style":578},[4305],{"type":48,"value":918},{"type":42,"tag":323,"props":4307,"children":4308},{"style":578},[4309],{"type":48,"value":822},{"type":42,"tag":323,"props":4311,"children":4312},{"style":578},[4313],{"type":48,"value":927},{"type":42,"tag":323,"props":4315,"children":4316},{"class":325,"line":335},[4317,4321,4325,4329,4333,4337],{"type":42,"tag":323,"props":4318,"children":4319},{"style":801},[4320],{"type":48,"value":935},{"type":42,"tag":323,"props":4322,"children":4323},{"style":578},[4324],{"type":48,"value":749},{"type":42,"tag":323,"props":4326,"children":4327},{"style":578},[4328],{"type":48,"value":670},{"type":42,"tag":323,"props":4330,"children":4331},{"style":673},[4332],{"type":48,"value":948},{"type":42,"tag":323,"props":4334,"children":4335},{"style":578},[4336],{"type":48,"value":680},{"type":42,"tag":323,"props":4338,"children":4339},{"style":578},[4340],{"type":48,"value":957},{"type":42,"tag":323,"props":4342,"children":4343},{"class":325,"line":345},[4344,4348],{"type":42,"tag":323,"props":4345,"children":4346},{"style":572},[4347],{"type":48,"value":965},{"type":42,"tag":323,"props":4349,"children":4350},{"style":578},[4351],{"type":48,"value":957},{"type":42,"tag":323,"props":4353,"children":4354},{"class":325,"line":354},[4355,4359,4363,4367,4371,4375,4379,4383,4388,4392,4396,4401,4405,4409,4413,4417,4421,4426,4430,4434,4439,4443,4447,4451,4455,4459,4463,4467,4471,4475,4479],{"type":42,"tag":323,"props":4356,"children":4357},{"style":801},[4358],{"type":48,"value":977},{"type":42,"tag":323,"props":4360,"children":4361},{"style":578},[4362],{"type":48,"value":749},{"type":42,"tag":323,"props":4364,"children":4365},{"style":572},[4366],{"type":48,"value":986},{"type":42,"tag":323,"props":4368,"children":4369},{"style":578},[4370],{"type":48,"value":591},{"type":42,"tag":323,"props":4372,"children":4373},{"style":721},[4374],{"type":48,"value":995},{"type":42,"tag":323,"props":4376,"children":4377},{"style":572},[4378],{"type":48,"value":729},{"type":42,"tag":323,"props":4380,"children":4381},{"style":578},[4382],{"type":48,"value":1004},{"type":42,"tag":323,"props":4384,"children":4385},{"style":801},[4386],{"type":48,"value":4387}," name",{"type":42,"tag":323,"props":4389,"children":4390},{"style":578},[4391],{"type":48,"value":749},{"type":42,"tag":323,"props":4393,"children":4394},{"style":578},[4395],{"type":48,"value":670},{"type":42,"tag":323,"props":4397,"children":4398},{"style":673},[4399],{"type":48,"value":4400},"Handbook",{"type":42,"tag":323,"props":4402,"children":4403},{"style":578},[4404],{"type":48,"value":680},{"type":42,"tag":323,"props":4406,"children":4407},{"style":578},[4408],{"type":48,"value":822},{"type":42,"tag":323,"props":4410,"children":4411},{"style":801},[4412],{"type":48,"value":1035},{"type":42,"tag":323,"props":4414,"children":4415},{"style":578},[4416],{"type":48,"value":749},{"type":42,"tag":323,"props":4418,"children":4419},{"style":578},[4420],{"type":48,"value":670},{"type":42,"tag":323,"props":4422,"children":4423},{"style":673},[4424],{"type":48,"value":4425},"Employee handbook",{"type":42,"tag":323,"props":4427,"children":4428},{"style":578},[4429],{"type":48,"value":680},{"type":42,"tag":323,"props":4431,"children":4432},{"style":578},[4433],{"type":48,"value":822},{"type":42,"tag":323,"props":4435,"children":4436},{"style":801},[4437],{"type":48,"value":4438}," source",{"type":42,"tag":323,"props":4440,"children":4441},{"style":578},[4442],{"type":48,"value":749},{"type":42,"tag":323,"props":4444,"children":4445},{"style":578},[4446],{"type":48,"value":794},{"type":42,"tag":323,"props":4448,"children":4449},{"style":801},[4450],{"type":48,"value":1958},{"type":42,"tag":323,"props":4452,"children":4453},{"style":578},[4454],{"type":48,"value":749},{"type":42,"tag":323,"props":4456,"children":4457},{"style":578},[4458],{"type":48,"value":670},{"type":42,"tag":323,"props":4460,"children":4461},{"style":673},[4462],{"type":48,"value":1612},{"type":42,"tag":323,"props":4464,"children":4465},{"style":578},[4466],{"type":48,"value":680},{"type":42,"tag":323,"props":4468,"children":4469},{"style":578},[4470],{"type":48,"value":1057},{"type":42,"tag":323,"props":4472,"children":4473},{"style":578},[4474],{"type":48,"value":1057},{"type":42,"tag":323,"props":4476,"children":4477},{"style":572},[4478],{"type":48,"value":769},{"type":42,"tag":323,"props":4480,"children":4481},{"style":578},[4482],{"type":48,"value":957},{"type":42,"tag":323,"props":4484,"children":4485},{"class":325,"line":363},[4486,4490,4494,4498,4502,4506,4510,4514,4518,4522,4526,4530],{"type":42,"tag":323,"props":4487,"children":4488},{"style":578},[4489],{"type":48,"value":744},{"type":42,"tag":323,"props":4491,"children":4492},{"style":572},[4493],{"type":48,"value":769},{"type":42,"tag":323,"props":4495,"children":4496},{"style":578},[4497],{"type":48,"value":591},{"type":42,"tag":323,"props":4499,"children":4500},{"style":721},[4501],{"type":48,"value":1287},{"type":42,"tag":323,"props":4503,"children":4504},{"style":572},[4505],{"type":48,"value":729},{"type":42,"tag":323,"props":4507,"children":4508},{"style":1294},[4509],{"type":48,"value":1297},{"type":42,"tag":323,"props":4511,"children":4512},{"style":566},[4513],{"type":48,"value":1302},{"type":42,"tag":323,"props":4515,"children":4516},{"style":572},[4517],{"type":48,"value":1307},{"type":42,"tag":323,"props":4519,"children":4520},{"style":578},[4521],{"type":48,"value":591},{"type":42,"tag":323,"props":4523,"children":4524},{"style":721},[4525],{"type":48,"value":1130},{"type":42,"tag":323,"props":4527,"children":4528},{"style":572},[4529],{"type":48,"value":1320},{"type":42,"tag":323,"props":4531,"children":4532},{"style":578},[4533],{"type":48,"value":609},{"type":42,"tag":323,"props":4535,"children":4536},{"class":325,"line":372},[4537],{"type":42,"tag":323,"props":4538,"children":4539},{"emptyLinePlaceholder":339},[4540],{"type":48,"value":342},{"type":42,"tag":323,"props":4542,"children":4543},{"class":325,"line":30},[4544,4548,4553,4557,4561,4566,4570,4575,4579,4584,4588,4592,4597,4601,4605],{"type":42,"tag":323,"props":4545,"children":4546},{"style":566},[4547],{"type":48,"value":569},{"type":42,"tag":323,"props":4549,"children":4550},{"style":572},[4551],{"type":48,"value":4552}," file ",{"type":42,"tag":323,"props":4554,"children":4555},{"style":578},[4556],{"type":48,"value":581},{"type":42,"tag":323,"props":4558,"children":4559},{"style":883},[4560],{"type":48,"value":886},{"type":42,"tag":323,"props":4562,"children":4563},{"style":572},[4564],{"type":48,"value":4565}," fs",{"type":42,"tag":323,"props":4567,"children":4568},{"style":578},[4569],{"type":48,"value":591},{"type":42,"tag":323,"props":4571,"children":4572},{"style":572},[4573],{"type":48,"value":4574},"promises",{"type":42,"tag":323,"props":4576,"children":4577},{"style":578},[4578],{"type":48,"value":591},{"type":42,"tag":323,"props":4580,"children":4581},{"style":721},[4582],{"type":48,"value":4583},"readFile",{"type":42,"tag":323,"props":4585,"children":4586},{"style":572},[4587],{"type":48,"value":729},{"type":42,"tag":323,"props":4589,"children":4590},{"style":578},[4591],{"type":48,"value":680},{"type":42,"tag":323,"props":4593,"children":4594},{"style":673},[4595],{"type":48,"value":4596},"handbook.pdf",{"type":42,"tag":323,"props":4598,"children":4599},{"style":578},[4600],{"type":48,"value":680},{"type":42,"tag":323,"props":4602,"children":4603},{"style":572},[4604],{"type":48,"value":769},{"type":42,"tag":323,"props":4606,"children":4607},{"style":578},[4608],{"type":48,"value":609},{"type":42,"tag":323,"props":4610,"children":4611},{"class":325,"line":388},[4612,4617,4621,4626,4630,4635,4639,4644,4648],{"type":42,"tag":323,"props":4613,"children":4614},{"style":883},[4615],{"type":48,"value":4616},"await",{"type":42,"tag":323,"props":4618,"children":4619},{"style":721},[4620],{"type":48,"value":891},{"type":42,"tag":323,"props":4622,"children":4623},{"style":572},[4624],{"type":48,"value":4625},"(knowledge",{"type":42,"tag":323,"props":4627,"children":4628},{"style":578},[4629],{"type":48,"value":591},{"type":42,"tag":323,"props":4631,"children":4632},{"style":572},[4633],{"type":48,"value":4634},"source",{"type":42,"tag":323,"props":4636,"children":4637},{"style":578},[4638],{"type":48,"value":591},{"type":42,"tag":323,"props":4640,"children":4641},{"style":572},[4642],{"type":48,"value":4643},"importUrl",{"type":42,"tag":323,"props":4645,"children":4646},{"style":578},[4647],{"type":48,"value":822},{"type":42,"tag":323,"props":4649,"children":4650},{"style":578},[4651],{"type":48,"value":927},{"type":42,"tag":323,"props":4653,"children":4654},{"class":325,"line":397},[4655,4659,4663,4667,4672,4676],{"type":42,"tag":323,"props":4656,"children":4657},{"style":801},[4658],{"type":48,"value":935},{"type":42,"tag":323,"props":4660,"children":4661},{"style":578},[4662],{"type":48,"value":749},{"type":42,"tag":323,"props":4664,"children":4665},{"style":578},[4666],{"type":48,"value":670},{"type":42,"tag":323,"props":4668,"children":4669},{"style":673},[4670],{"type":48,"value":4671},"PUT",{"type":42,"tag":323,"props":4673,"children":4674},{"style":578},[4675],{"type":48,"value":680},{"type":42,"tag":323,"props":4677,"children":4678},{"style":578},[4679],{"type":48,"value":957},{"type":42,"tag":323,"props":4681,"children":4682},{"class":325,"line":406},[4683,4687,4691,4695,4699,4703,4707,4711,4715,4720,4724],{"type":42,"tag":323,"props":4684,"children":4685},{"style":801},[4686],{"type":48,"value":965},{"type":42,"tag":323,"props":4688,"children":4689},{"style":578},[4690],{"type":48,"value":749},{"type":42,"tag":323,"props":4692,"children":4693},{"style":578},[4694],{"type":48,"value":794},{"type":42,"tag":323,"props":4696,"children":4697},{"style":578},[4698],{"type":48,"value":670},{"type":42,"tag":323,"props":4700,"children":4701},{"style":801},[4702],{"type":48,"value":831},{"type":42,"tag":323,"props":4704,"children":4705},{"style":578},[4706],{"type":48,"value":680},{"type":42,"tag":323,"props":4708,"children":4709},{"style":578},[4710],{"type":48,"value":749},{"type":42,"tag":323,"props":4712,"children":4713},{"style":578},[4714],{"type":48,"value":670},{"type":42,"tag":323,"props":4716,"children":4717},{"style":673},[4718],{"type":48,"value":4719},"application\u002Fpdf",{"type":42,"tag":323,"props":4721,"children":4722},{"style":578},[4723],{"type":48,"value":680},{"type":42,"tag":323,"props":4725,"children":4726},{"style":578},[4727],{"type":48,"value":2023},{"type":42,"tag":323,"props":4729,"children":4730},{"class":325,"line":415},[4731,4735,4739,4744],{"type":42,"tag":323,"props":4732,"children":4733},{"style":801},[4734],{"type":48,"value":977},{"type":42,"tag":323,"props":4736,"children":4737},{"style":578},[4738],{"type":48,"value":749},{"type":42,"tag":323,"props":4740,"children":4741},{"style":572},[4742],{"type":48,"value":4743}," file",{"type":42,"tag":323,"props":4745,"children":4746},{"style":578},[4747],{"type":48,"value":957},{"type":42,"tag":323,"props":4749,"children":4750},{"class":325,"line":424},[4751,4755,4759],{"type":42,"tag":323,"props":4752,"children":4753},{"style":578},[4754],{"type":48,"value":744},{"type":42,"tag":323,"props":4756,"children":4757},{"style":572},[4758],{"type":48,"value":769},{"type":42,"tag":323,"props":4760,"children":4761},{"style":578},[4762],{"type":48,"value":609},{"type":42,"tag":3259,"props":4764,"children":4766},{"id":4765},"filter-search-to-specific-sources",[4767],{"type":48,"value":4768},"Filter Search to Specific Sources",{"type":42,"tag":51,"props":4770,"children":4771},{},[4772],{"type":48,"value":4773},"When your Knowledge Base has multiple sources, target search to specific ones:",{"type":42,"tag":51,"props":4775,"children":4776},{},[4777],{"type":42,"tag":86,"props":4778,"children":4779},{},[4780],{"type":48,"value":312},{"type":42,"tag":57,"props":4782,"children":4784},{"className":315,"code":4783,"language":317,"meta":66,"style":66},"results = requests.post(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FSearch\",\n    auth=auth,\n    json={\"query\": \"cancellation policy\", \"top\": 5, \"knowledgeIds\": [policy_source_id]}\n).json()\n\nfor chunk in results[\"chunks\"]:\n    print(f\"[{chunk['score']:.3f}] {chunk['content'][:100]}\")\n",[4785],{"type":42,"tag":64,"props":4786,"children":4787},{"__ignoreMap":66},[4788,4795,4802,4809,4817,4824,4831,4839],{"type":42,"tag":323,"props":4789,"children":4790},{"class":325,"line":326},[4791],{"type":42,"tag":323,"props":4792,"children":4793},{},[4794],{"type":48,"value":2728},{"type":42,"tag":323,"props":4796,"children":4797},{"class":325,"line":335},[4798],{"type":42,"tag":323,"props":4799,"children":4800},{},[4801],{"type":48,"value":2736},{"type":42,"tag":323,"props":4803,"children":4804},{"class":325,"line":345},[4805],{"type":42,"tag":323,"props":4806,"children":4807},{},[4808],{"type":48,"value":412},{"type":42,"tag":323,"props":4810,"children":4811},{"class":325,"line":354},[4812],{"type":42,"tag":323,"props":4813,"children":4814},{},[4815],{"type":48,"value":4816},"    json={\"query\": \"cancellation policy\", \"top\": 5, \"knowledgeIds\": [policy_source_id]}\n",{"type":42,"tag":323,"props":4818,"children":4819},{"class":325,"line":363},[4820],{"type":42,"tag":323,"props":4821,"children":4822},{},[4823],{"type":48,"value":1706},{"type":42,"tag":323,"props":4825,"children":4826},{"class":325,"line":372},[4827],{"type":42,"tag":323,"props":4828,"children":4829},{"emptyLinePlaceholder":339},[4830],{"type":48,"value":342},{"type":42,"tag":323,"props":4832,"children":4833},{"class":325,"line":30},[4834],{"type":42,"tag":323,"props":4835,"children":4836},{},[4837],{"type":48,"value":4838},"for chunk in results[\"chunks\"]:\n",{"type":42,"tag":323,"props":4840,"children":4841},{"class":325,"line":388},[4842],{"type":42,"tag":323,"props":4843,"children":4844},{},[4845],{"type":48,"value":4846},"    print(f\"[{chunk['score']:.3f}] {chunk['content'][:100]}\")\n",{"type":42,"tag":51,"props":4848,"children":4849},{},[4850],{"type":42,"tag":86,"props":4851,"children":4852},{},[4853],{"type":48,"value":551},{"type":42,"tag":57,"props":4855,"children":4857},{"className":554,"code":4856,"language":556,"meta":66,"style":66},"const results = await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FSearch`, {\n    method: \"POST\",\n    headers,\n    body: JSON.stringify({ query: \"cancellation policy\", top: 5, knowledgeIds: [policySourceId] }),\n}).then(r => r.json());\n\nfor (const chunk of results.chunks) {\n    console.log(`[${chunk.score.toFixed(3)}] ${chunk.content.slice(0, 100)}`);\n}\n",[4858],{"type":42,"tag":64,"props":4859,"children":4860},{"__ignoreMap":66},[4861,4932,4959,4970,5068,5119,5126,5169,5308],{"type":42,"tag":323,"props":4862,"children":4863},{"class":325,"line":326},[4864,4868,4872,4876,4880,4884,4888,4892,4896,4900,4904,4908,4912,4916,4920,4924,4928],{"type":42,"tag":323,"props":4865,"children":4866},{"style":566},[4867],{"type":48,"value":569},{"type":42,"tag":323,"props":4869,"children":4870},{"style":572},[4871],{"type":48,"value":2852},{"type":42,"tag":323,"props":4873,"children":4874},{"style":578},[4875],{"type":48,"value":581},{"type":42,"tag":323,"props":4877,"children":4878},{"style":883},[4879],{"type":48,"value":886},{"type":42,"tag":323,"props":4881,"children":4882},{"style":721},[4883],{"type":48,"value":891},{"type":42,"tag":323,"props":4885,"children":4886},{"style":572},[4887],{"type":48,"value":729},{"type":42,"tag":323,"props":4889,"children":4890},{"style":578},[4891],{"type":48,"value":734},{"type":42,"tag":323,"props":4893,"children":4894},{"style":572},[4895],{"type":48,"value":904},{"type":42,"tag":323,"props":4897,"children":4898},{"style":578},[4899],{"type":48,"value":744},{"type":42,"tag":323,"props":4901,"children":4902},{"style":673},[4903],{"type":48,"value":1780},{"type":42,"tag":323,"props":4905,"children":4906},{"style":578},[4907],{"type":48,"value":754},{"type":42,"tag":323,"props":4909,"children":4910},{"style":572},[4911],{"type":48,"value":1789},{"type":42,"tag":323,"props":4913,"children":4914},{"style":578},[4915],{"type":48,"value":744},{"type":42,"tag":323,"props":4917,"children":4918},{"style":673},[4919],{"type":48,"value":2901},{"type":42,"tag":323,"props":4921,"children":4922},{"style":578},[4923],{"type":48,"value":918},{"type":42,"tag":323,"props":4925,"children":4926},{"style":578},[4927],{"type":48,"value":822},{"type":42,"tag":323,"props":4929,"children":4930},{"style":578},[4931],{"type":48,"value":927},{"type":42,"tag":323,"props":4933,"children":4934},{"class":325,"line":335},[4935,4939,4943,4947,4951,4955],{"type":42,"tag":323,"props":4936,"children":4937},{"style":801},[4938],{"type":48,"value":935},{"type":42,"tag":323,"props":4940,"children":4941},{"style":578},[4942],{"type":48,"value":749},{"type":42,"tag":323,"props":4944,"children":4945},{"style":578},[4946],{"type":48,"value":670},{"type":42,"tag":323,"props":4948,"children":4949},{"style":673},[4950],{"type":48,"value":948},{"type":42,"tag":323,"props":4952,"children":4953},{"style":578},[4954],{"type":48,"value":680},{"type":42,"tag":323,"props":4956,"children":4957},{"style":578},[4958],{"type":48,"value":957},{"type":42,"tag":323,"props":4960,"children":4961},{"class":325,"line":345},[4962,4966],{"type":42,"tag":323,"props":4963,"children":4964},{"style":572},[4965],{"type":48,"value":965},{"type":42,"tag":323,"props":4967,"children":4968},{"style":578},[4969],{"type":48,"value":957},{"type":42,"tag":323,"props":4971,"children":4972},{"class":325,"line":354},[4973,4977,4981,4985,4989,4993,4997,5001,5005,5009,5013,5018,5022,5026,5030,5034,5038,5042,5047,5051,5056,5060,5064],{"type":42,"tag":323,"props":4974,"children":4975},{"style":801},[4976],{"type":48,"value":977},{"type":42,"tag":323,"props":4978,"children":4979},{"style":578},[4980],{"type":48,"value":749},{"type":42,"tag":323,"props":4982,"children":4983},{"style":572},[4984],{"type":48,"value":986},{"type":42,"tag":323,"props":4986,"children":4987},{"style":578},[4988],{"type":48,"value":591},{"type":42,"tag":323,"props":4990,"children":4991},{"style":721},[4992],{"type":48,"value":995},{"type":42,"tag":323,"props":4994,"children":4995},{"style":572},[4996],{"type":48,"value":729},{"type":42,"tag":323,"props":4998,"children":4999},{"style":578},[5000],{"type":48,"value":1004},{"type":42,"tag":323,"props":5002,"children":5003},{"style":801},[5004],{"type":48,"value":2987},{"type":42,"tag":323,"props":5006,"children":5007},{"style":578},[5008],{"type":48,"value":749},{"type":42,"tag":323,"props":5010,"children":5011},{"style":578},[5012],{"type":48,"value":670},{"type":42,"tag":323,"props":5014,"children":5015},{"style":673},[5016],{"type":48,"value":5017},"cancellation policy",{"type":42,"tag":323,"props":5019,"children":5020},{"style":578},[5021],{"type":48,"value":680},{"type":42,"tag":323,"props":5023,"children":5024},{"style":578},[5025],{"type":48,"value":822},{"type":42,"tag":323,"props":5027,"children":5028},{"style":801},[5029],{"type":48,"value":3013},{"type":42,"tag":323,"props":5031,"children":5032},{"style":578},[5033],{"type":48,"value":749},{"type":42,"tag":323,"props":5035,"children":5036},{"style":1567},[5037],{"type":48,"value":3022},{"type":42,"tag":323,"props":5039,"children":5040},{"style":578},[5041],{"type":48,"value":822},{"type":42,"tag":323,"props":5043,"children":5044},{"style":801},[5045],{"type":48,"value":5046}," knowledgeIds",{"type":42,"tag":323,"props":5048,"children":5049},{"style":578},[5050],{"type":48,"value":749},{"type":42,"tag":323,"props":5052,"children":5053},{"style":572},[5054],{"type":48,"value":5055}," [policySourceId] ",{"type":42,"tag":323,"props":5057,"children":5058},{"style":578},[5059],{"type":48,"value":744},{"type":42,"tag":323,"props":5061,"children":5062},{"style":572},[5063],{"type":48,"value":769},{"type":42,"tag":323,"props":5065,"children":5066},{"style":578},[5067],{"type":48,"value":957},{"type":42,"tag":323,"props":5069,"children":5070},{"class":325,"line":363},[5071,5075,5079,5083,5087,5091,5095,5099,5103,5107,5111,5115],{"type":42,"tag":323,"props":5072,"children":5073},{"style":578},[5074],{"type":48,"value":744},{"type":42,"tag":323,"props":5076,"children":5077},{"style":572},[5078],{"type":48,"value":769},{"type":42,"tag":323,"props":5080,"children":5081},{"style":578},[5082],{"type":48,"value":591},{"type":42,"tag":323,"props":5084,"children":5085},{"style":721},[5086],{"type":48,"value":1287},{"type":42,"tag":323,"props":5088,"children":5089},{"style":572},[5090],{"type":48,"value":729},{"type":42,"tag":323,"props":5092,"children":5093},{"style":1294},[5094],{"type":48,"value":1297},{"type":42,"tag":323,"props":5096,"children":5097},{"style":566},[5098],{"type":48,"value":1302},{"type":42,"tag":323,"props":5100,"children":5101},{"style":572},[5102],{"type":48,"value":1307},{"type":42,"tag":323,"props":5104,"children":5105},{"style":578},[5106],{"type":48,"value":591},{"type":42,"tag":323,"props":5108,"children":5109},{"style":721},[5110],{"type":48,"value":1130},{"type":42,"tag":323,"props":5112,"children":5113},{"style":572},[5114],{"type":48,"value":1320},{"type":42,"tag":323,"props":5116,"children":5117},{"style":578},[5118],{"type":48,"value":609},{"type":42,"tag":323,"props":5120,"children":5121},{"class":325,"line":372},[5122],{"type":42,"tag":323,"props":5123,"children":5124},{"emptyLinePlaceholder":339},[5125],{"type":48,"value":342},{"type":42,"tag":323,"props":5127,"children":5128},{"class":325,"line":30},[5129,5134,5138,5142,5147,5152,5156,5160,5165],{"type":42,"tag":323,"props":5130,"children":5131},{"style":883},[5132],{"type":48,"value":5133},"for",{"type":42,"tag":323,"props":5135,"children":5136},{"style":572},[5137],{"type":48,"value":1176},{"type":42,"tag":323,"props":5139,"children":5140},{"style":566},[5141],{"type":48,"value":569},{"type":42,"tag":323,"props":5143,"children":5144},{"style":572},[5145],{"type":48,"value":5146}," chunk ",{"type":42,"tag":323,"props":5148,"children":5149},{"style":578},[5150],{"type":48,"value":5151},"of",{"type":42,"tag":323,"props":5153,"children":5154},{"style":572},[5155],{"type":48,"value":3113},{"type":42,"tag":323,"props":5157,"children":5158},{"style":578},[5159],{"type":48,"value":591},{"type":42,"tag":323,"props":5161,"children":5162},{"style":572},[5163],{"type":48,"value":5164},"chunks) ",{"type":42,"tag":323,"props":5166,"children":5167},{"style":578},[5168],{"type":48,"value":1192},{"type":42,"tag":323,"props":5170,"children":5171},{"class":325,"line":388},[5172,5177,5181,5186,5190,5194,5199,5203,5208,5212,5217,5221,5226,5230,5235,5239,5243,5248,5252,5256,5260,5265,5269,5274,5278,5283,5287,5292,5296,5300,5304],{"type":42,"tag":323,"props":5173,"children":5174},{"style":572},[5175],{"type":48,"value":5176},"    console",{"type":42,"tag":323,"props":5178,"children":5179},{"style":578},[5180],{"type":48,"value":591},{"type":42,"tag":323,"props":5182,"children":5183},{"style":721},[5184],{"type":48,"value":5185},"log",{"type":42,"tag":323,"props":5187,"children":5188},{"style":801},[5189],{"type":48,"value":729},{"type":42,"tag":323,"props":5191,"children":5192},{"style":578},[5193],{"type":48,"value":918},{"type":42,"tag":323,"props":5195,"children":5196},{"style":673},[5197],{"type":48,"value":5198},"[",{"type":42,"tag":323,"props":5200,"children":5201},{"style":578},[5202],{"type":48,"value":754},{"type":42,"tag":323,"props":5204,"children":5205},{"style":572},[5206],{"type":48,"value":5207},"chunk",{"type":42,"tag":323,"props":5209,"children":5210},{"style":578},[5211],{"type":48,"value":591},{"type":42,"tag":323,"props":5213,"children":5214},{"style":572},[5215],{"type":48,"value":5216},"score",{"type":42,"tag":323,"props":5218,"children":5219},{"style":578},[5220],{"type":48,"value":591},{"type":42,"tag":323,"props":5222,"children":5223},{"style":721},[5224],{"type":48,"value":5225},"toFixed",{"type":42,"tag":323,"props":5227,"children":5228},{"style":572},[5229],{"type":48,"value":729},{"type":42,"tag":323,"props":5231,"children":5232},{"style":1567},[5233],{"type":48,"value":5234},"3",{"type":42,"tag":323,"props":5236,"children":5237},{"style":572},[5238],{"type":48,"value":769},{"type":42,"tag":323,"props":5240,"children":5241},{"style":578},[5242],{"type":48,"value":744},{"type":42,"tag":323,"props":5244,"children":5245},{"style":673},[5246],{"type":48,"value":5247},"] ",{"type":42,"tag":323,"props":5249,"children":5250},{"style":578},[5251],{"type":48,"value":754},{"type":42,"tag":323,"props":5253,"children":5254},{"style":572},[5255],{"type":48,"value":5207},{"type":42,"tag":323,"props":5257,"children":5258},{"style":578},[5259],{"type":48,"value":591},{"type":42,"tag":323,"props":5261,"children":5262},{"style":572},[5263],{"type":48,"value":5264},"content",{"type":42,"tag":323,"props":5266,"children":5267},{"style":578},[5268],{"type":48,"value":591},{"type":42,"tag":323,"props":5270,"children":5271},{"style":721},[5272],{"type":48,"value":5273},"slice",{"type":42,"tag":323,"props":5275,"children":5276},{"style":572},[5277],{"type":48,"value":729},{"type":42,"tag":323,"props":5279,"children":5280},{"style":1567},[5281],{"type":48,"value":5282},"0",{"type":42,"tag":323,"props":5284,"children":5285},{"style":578},[5286],{"type":48,"value":822},{"type":42,"tag":323,"props":5288,"children":5289},{"style":1567},[5290],{"type":48,"value":5291}," 100",{"type":42,"tag":323,"props":5293,"children":5294},{"style":572},[5295],{"type":48,"value":769},{"type":42,"tag":323,"props":5297,"children":5298},{"style":578},[5299],{"type":48,"value":764},{"type":42,"tag":323,"props":5301,"children":5302},{"style":801},[5303],{"type":48,"value":769},{"type":42,"tag":323,"props":5305,"children":5306},{"style":578},[5307],{"type":48,"value":609},{"type":42,"tag":323,"props":5309,"children":5310},{"class":325,"line":397},[5311],{"type":42,"tag":323,"props":5312,"children":5313},{"style":578},[5314],{"type":48,"value":1587},{"type":42,"tag":51,"props":5316,"children":5317},{},[5318,5320,5326],{"type":48,"value":5319},"Omit ",{"type":42,"tag":64,"props":5321,"children":5323},{"className":5322},[],[5324],{"type":48,"value":5325},"knowledgeIds",{"type":48,"value":5327}," to search across all sources. Max 100 IDs per request.",{"type":42,"tag":3259,"props":5329,"children":5331},{"id":5330},"refresh-a-web-source",[5332],{"type":48,"value":5333},"Refresh a Web Source",{"type":42,"tag":51,"props":5335,"children":5336},{},[5337,5339,5345],{"type":48,"value":5338},"Re-crawl without changing config. Set ",{"type":42,"tag":64,"props":5340,"children":5342},{"className":5341},[],[5343],{"type":48,"value":5344},"crawlPeriod",{"type":48,"value":5346}," for automatic recrawling.",{"type":42,"tag":51,"props":5348,"children":5349},{},[5350],{"type":42,"tag":86,"props":5351,"children":5352},{},[5353],{"type":48,"value":312},{"type":42,"tag":57,"props":5355,"children":5357},{"className":315,"code":5356,"language":317,"meta":66,"style":66},"requests.patch(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}?refresh=true\",\n    auth=auth,\n    json={\"name\": \"Product Documentation\"}\n)\n\nrequests.patch(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\",\n    auth=auth,\n    json={\"name\": \"Product Documentation\", \"source\": {\"type\": \"Web\", \"crawlPeriod\": \"WEEKLY\"}}\n)\n",[5358],{"type":42,"tag":64,"props":5359,"children":5360},{"__ignoreMap":66},[5361,5369,5377,5384,5392,5399,5406,5413,5421,5428,5436],{"type":42,"tag":323,"props":5362,"children":5363},{"class":325,"line":326},[5364],{"type":42,"tag":323,"props":5365,"children":5366},{},[5367],{"type":48,"value":5368},"requests.patch(\n",{"type":42,"tag":323,"props":5370,"children":5371},{"class":325,"line":335},[5372],{"type":42,"tag":323,"props":5373,"children":5374},{},[5375],{"type":48,"value":5376},"    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}?refresh=true\",\n",{"type":42,"tag":323,"props":5378,"children":5379},{"class":325,"line":345},[5380],{"type":42,"tag":323,"props":5381,"children":5382},{},[5383],{"type":48,"value":412},{"type":42,"tag":323,"props":5385,"children":5386},{"class":325,"line":354},[5387],{"type":42,"tag":323,"props":5388,"children":5389},{},[5390],{"type":48,"value":5391},"    json={\"name\": \"Product Documentation\"}\n",{"type":42,"tag":323,"props":5393,"children":5394},{"class":325,"line":363},[5395],{"type":42,"tag":323,"props":5396,"children":5397},{},[5398],{"type":48,"value":430},{"type":42,"tag":323,"props":5400,"children":5401},{"class":325,"line":372},[5402],{"type":42,"tag":323,"props":5403,"children":5404},{"emptyLinePlaceholder":339},[5405],{"type":48,"value":342},{"type":42,"tag":323,"props":5407,"children":5408},{"class":325,"line":30},[5409],{"type":42,"tag":323,"props":5410,"children":5411},{},[5412],{"type":48,"value":5368},{"type":42,"tag":323,"props":5414,"children":5415},{"class":325,"line":388},[5416],{"type":42,"tag":323,"props":5417,"children":5418},{},[5419],{"type":48,"value":5420},"    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\",\n",{"type":42,"tag":323,"props":5422,"children":5423},{"class":325,"line":397},[5424],{"type":42,"tag":323,"props":5425,"children":5426},{},[5427],{"type":48,"value":412},{"type":42,"tag":323,"props":5429,"children":5430},{"class":325,"line":406},[5431],{"type":42,"tag":323,"props":5432,"children":5433},{},[5434],{"type":48,"value":5435},"    json={\"name\": \"Product Documentation\", \"source\": {\"type\": \"Web\", \"crawlPeriod\": \"WEEKLY\"}}\n",{"type":42,"tag":323,"props":5437,"children":5438},{"class":325,"line":415},[5439],{"type":42,"tag":323,"props":5440,"children":5441},{},[5442],{"type":48,"value":430},{"type":42,"tag":51,"props":5444,"children":5445},{},[5446],{"type":42,"tag":86,"props":5447,"children":5448},{},[5449],{"type":48,"value":551},{"type":42,"tag":57,"props":5451,"children":5453},{"className":554,"code":5452,"language":556,"meta":66,"style":66},"await fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}?refresh=true`, {\n    method: \"PATCH\",\n    headers,\n    body: JSON.stringify({ name: \"Product Documentation\" }),\n});\n\nawait fetch(`${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}`, {\n    method: \"PATCH\",\n    headers,\n    body: JSON.stringify({ name: \"Product Documentation\", source: { type: \"Web\", crawlPeriod: \"WEEKLY\" } }),\n});\n",[5454],{"type":42,"tag":64,"props":5455,"children":5456},{"__ignoreMap":66},[5457,5533,5561,5572,5635,5650,5657,5724,5751,5762,5891],{"type":42,"tag":323,"props":5458,"children":5459},{"class":325,"line":326},[5460,5464,5468,5472,5476,5480,5484,5488,5492,5496,5500,5504,5508,5512,5516,5521,5525,5529],{"type":42,"tag":323,"props":5461,"children":5462},{"style":883},[5463],{"type":48,"value":4616},{"type":42,"tag":323,"props":5465,"children":5466},{"style":721},[5467],{"type":48,"value":891},{"type":42,"tag":323,"props":5469,"children":5470},{"style":572},[5471],{"type":48,"value":729},{"type":42,"tag":323,"props":5473,"children":5474},{"style":578},[5475],{"type":48,"value":734},{"type":42,"tag":323,"props":5477,"children":5478},{"style":572},[5479],{"type":48,"value":904},{"type":42,"tag":323,"props":5481,"children":5482},{"style":578},[5483],{"type":48,"value":744},{"type":42,"tag":323,"props":5485,"children":5486},{"style":673},[5487],{"type":48,"value":1780},{"type":42,"tag":323,"props":5489,"children":5490},{"style":578},[5491],{"type":48,"value":754},{"type":42,"tag":323,"props":5493,"children":5494},{"style":572},[5495],{"type":48,"value":1789},{"type":42,"tag":323,"props":5497,"children":5498},{"style":578},[5499],{"type":48,"value":744},{"type":42,"tag":323,"props":5501,"children":5502},{"style":673},[5503],{"type":48,"value":2343},{"type":42,"tag":323,"props":5505,"children":5506},{"style":578},[5507],{"type":48,"value":754},{"type":42,"tag":323,"props":5509,"children":5510},{"style":572},[5511],{"type":48,"value":2352},{"type":42,"tag":323,"props":5513,"children":5514},{"style":578},[5515],{"type":48,"value":744},{"type":42,"tag":323,"props":5517,"children":5518},{"style":673},[5519],{"type":48,"value":5520},"?refresh=true",{"type":42,"tag":323,"props":5522,"children":5523},{"style":578},[5524],{"type":48,"value":918},{"type":42,"tag":323,"props":5526,"children":5527},{"style":578},[5528],{"type":48,"value":822},{"type":42,"tag":323,"props":5530,"children":5531},{"style":578},[5532],{"type":48,"value":927},{"type":42,"tag":323,"props":5534,"children":5535},{"class":325,"line":335},[5536,5540,5544,5548,5553,5557],{"type":42,"tag":323,"props":5537,"children":5538},{"style":801},[5539],{"type":48,"value":935},{"type":42,"tag":323,"props":5541,"children":5542},{"style":578},[5543],{"type":48,"value":749},{"type":42,"tag":323,"props":5545,"children":5546},{"style":578},[5547],{"type":48,"value":670},{"type":42,"tag":323,"props":5549,"children":5550},{"style":673},[5551],{"type":48,"value":5552},"PATCH",{"type":42,"tag":323,"props":5554,"children":5555},{"style":578},[5556],{"type":48,"value":680},{"type":42,"tag":323,"props":5558,"children":5559},{"style":578},[5560],{"type":48,"value":957},{"type":42,"tag":323,"props":5562,"children":5563},{"class":325,"line":345},[5564,5568],{"type":42,"tag":323,"props":5565,"children":5566},{"style":572},[5567],{"type":48,"value":965},{"type":42,"tag":323,"props":5569,"children":5570},{"style":578},[5571],{"type":48,"value":957},{"type":42,"tag":323,"props":5573,"children":5574},{"class":325,"line":354},[5575,5579,5583,5587,5591,5595,5599,5603,5607,5611,5615,5619,5623,5627,5631],{"type":42,"tag":323,"props":5576,"children":5577},{"style":801},[5578],{"type":48,"value":977},{"type":42,"tag":323,"props":5580,"children":5581},{"style":578},[5582],{"type":48,"value":749},{"type":42,"tag":323,"props":5584,"children":5585},{"style":572},[5586],{"type":48,"value":986},{"type":42,"tag":323,"props":5588,"children":5589},{"style":578},[5590],{"type":48,"value":591},{"type":42,"tag":323,"props":5592,"children":5593},{"style":721},[5594],{"type":48,"value":995},{"type":42,"tag":323,"props":5596,"children":5597},{"style":572},[5598],{"type":48,"value":729},{"type":42,"tag":323,"props":5600,"children":5601},{"style":578},[5602],{"type":48,"value":1004},{"type":42,"tag":323,"props":5604,"children":5605},{"style":801},[5606],{"type":48,"value":4387},{"type":42,"tag":323,"props":5608,"children":5609},{"style":578},[5610],{"type":48,"value":749},{"type":42,"tag":323,"props":5612,"children":5613},{"style":578},[5614],{"type":48,"value":670},{"type":42,"tag":323,"props":5616,"children":5617},{"style":673},[5618],{"type":48,"value":1900},{"type":42,"tag":323,"props":5620,"children":5621},{"style":578},[5622],{"type":48,"value":680},{"type":42,"tag":323,"props":5624,"children":5625},{"style":578},[5626],{"type":48,"value":1057},{"type":42,"tag":323,"props":5628,"children":5629},{"style":572},[5630],{"type":48,"value":769},{"type":42,"tag":323,"props":5632,"children":5633},{"style":578},[5634],{"type":48,"value":957},{"type":42,"tag":323,"props":5636,"children":5637},{"class":325,"line":363},[5638,5642,5646],{"type":42,"tag":323,"props":5639,"children":5640},{"style":578},[5641],{"type":48,"value":744},{"type":42,"tag":323,"props":5643,"children":5644},{"style":572},[5645],{"type":48,"value":769},{"type":42,"tag":323,"props":5647,"children":5648},{"style":578},[5649],{"type":48,"value":609},{"type":42,"tag":323,"props":5651,"children":5652},{"class":325,"line":372},[5653],{"type":42,"tag":323,"props":5654,"children":5655},{"emptyLinePlaceholder":339},[5656],{"type":48,"value":342},{"type":42,"tag":323,"props":5658,"children":5659},{"class":325,"line":30},[5660,5664,5668,5672,5676,5680,5684,5688,5692,5696,5700,5704,5708,5712,5716,5720],{"type":42,"tag":323,"props":5661,"children":5662},{"style":883},[5663],{"type":48,"value":4616},{"type":42,"tag":323,"props":5665,"children":5666},{"style":721},[5667],{"type":48,"value":891},{"type":42,"tag":323,"props":5669,"children":5670},{"style":572},[5671],{"type":48,"value":729},{"type":42,"tag":323,"props":5673,"children":5674},{"style":578},[5675],{"type":48,"value":734},{"type":42,"tag":323,"props":5677,"children":5678},{"style":572},[5679],{"type":48,"value":904},{"type":42,"tag":323,"props":5681,"children":5682},{"style":578},[5683],{"type":48,"value":744},{"type":42,"tag":323,"props":5685,"children":5686},{"style":673},[5687],{"type":48,"value":1780},{"type":42,"tag":323,"props":5689,"children":5690},{"style":578},[5691],{"type":48,"value":754},{"type":42,"tag":323,"props":5693,"children":5694},{"style":572},[5695],{"type":48,"value":1789},{"type":42,"tag":323,"props":5697,"children":5698},{"style":578},[5699],{"type":48,"value":744},{"type":42,"tag":323,"props":5701,"children":5702},{"style":673},[5703],{"type":48,"value":2343},{"type":42,"tag":323,"props":5705,"children":5706},{"style":578},[5707],{"type":48,"value":754},{"type":42,"tag":323,"props":5709,"children":5710},{"style":572},[5711],{"type":48,"value":2352},{"type":42,"tag":323,"props":5713,"children":5714},{"style":578},[5715],{"type":48,"value":764},{"type":42,"tag":323,"props":5717,"children":5718},{"style":578},[5719],{"type":48,"value":822},{"type":42,"tag":323,"props":5721,"children":5722},{"style":578},[5723],{"type":48,"value":927},{"type":42,"tag":323,"props":5725,"children":5726},{"class":325,"line":388},[5727,5731,5735,5739,5743,5747],{"type":42,"tag":323,"props":5728,"children":5729},{"style":801},[5730],{"type":48,"value":935},{"type":42,"tag":323,"props":5732,"children":5733},{"style":578},[5734],{"type":48,"value":749},{"type":42,"tag":323,"props":5736,"children":5737},{"style":578},[5738],{"type":48,"value":670},{"type":42,"tag":323,"props":5740,"children":5741},{"style":673},[5742],{"type":48,"value":5552},{"type":42,"tag":323,"props":5744,"children":5745},{"style":578},[5746],{"type":48,"value":680},{"type":42,"tag":323,"props":5748,"children":5749},{"style":578},[5750],{"type":48,"value":957},{"type":42,"tag":323,"props":5752,"children":5753},{"class":325,"line":397},[5754,5758],{"type":42,"tag":323,"props":5755,"children":5756},{"style":572},[5757],{"type":48,"value":965},{"type":42,"tag":323,"props":5759,"children":5760},{"style":578},[5761],{"type":48,"value":957},{"type":42,"tag":323,"props":5763,"children":5764},{"class":325,"line":406},[5765,5769,5773,5777,5781,5785,5789,5793,5797,5801,5805,5809,5813,5817,5821,5825,5829,5833,5837,5841,5845,5849,5853,5858,5862,5866,5871,5875,5879,5883,5887],{"type":42,"tag":323,"props":5766,"children":5767},{"style":801},[5768],{"type":48,"value":977},{"type":42,"tag":323,"props":5770,"children":5771},{"style":578},[5772],{"type":48,"value":749},{"type":42,"tag":323,"props":5774,"children":5775},{"style":572},[5776],{"type":48,"value":986},{"type":42,"tag":323,"props":5778,"children":5779},{"style":578},[5780],{"type":48,"value":591},{"type":42,"tag":323,"props":5782,"children":5783},{"style":721},[5784],{"type":48,"value":995},{"type":42,"tag":323,"props":5786,"children":5787},{"style":572},[5788],{"type":48,"value":729},{"type":42,"tag":323,"props":5790,"children":5791},{"style":578},[5792],{"type":48,"value":1004},{"type":42,"tag":323,"props":5794,"children":5795},{"style":801},[5796],{"type":48,"value":4387},{"type":42,"tag":323,"props":5798,"children":5799},{"style":578},[5800],{"type":48,"value":749},{"type":42,"tag":323,"props":5802,"children":5803},{"style":578},[5804],{"type":48,"value":670},{"type":42,"tag":323,"props":5806,"children":5807},{"style":673},[5808],{"type":48,"value":1900},{"type":42,"tag":323,"props":5810,"children":5811},{"style":578},[5812],{"type":48,"value":680},{"type":42,"tag":323,"props":5814,"children":5815},{"style":578},[5816],{"type":48,"value":822},{"type":42,"tag":323,"props":5818,"children":5819},{"style":801},[5820],{"type":48,"value":4438},{"type":42,"tag":323,"props":5822,"children":5823},{"style":578},[5824],{"type":48,"value":749},{"type":42,"tag":323,"props":5826,"children":5827},{"style":578},[5828],{"type":48,"value":794},{"type":42,"tag":323,"props":5830,"children":5831},{"style":801},[5832],{"type":48,"value":1958},{"type":42,"tag":323,"props":5834,"children":5835},{"style":578},[5836],{"type":48,"value":749},{"type":42,"tag":323,"props":5838,"children":5839},{"style":578},[5840],{"type":48,"value":670},{"type":42,"tag":323,"props":5842,"children":5843},{"style":673},[5844],{"type":48,"value":1605},{"type":42,"tag":323,"props":5846,"children":5847},{"style":578},[5848],{"type":48,"value":680},{"type":42,"tag":323,"props":5850,"children":5851},{"style":578},[5852],{"type":48,"value":822},{"type":42,"tag":323,"props":5854,"children":5855},{"style":801},[5856],{"type":48,"value":5857}," crawlPeriod",{"type":42,"tag":323,"props":5859,"children":5860},{"style":578},[5861],{"type":48,"value":749},{"type":42,"tag":323,"props":5863,"children":5864},{"style":578},[5865],{"type":48,"value":670},{"type":42,"tag":323,"props":5867,"children":5868},{"style":673},[5869],{"type":48,"value":5870},"WEEKLY",{"type":42,"tag":323,"props":5872,"children":5873},{"style":578},[5874],{"type":48,"value":680},{"type":42,"tag":323,"props":5876,"children":5877},{"style":578},[5878],{"type":48,"value":1057},{"type":42,"tag":323,"props":5880,"children":5881},{"style":578},[5882],{"type":48,"value":1057},{"type":42,"tag":323,"props":5884,"children":5885},{"style":572},[5886],{"type":48,"value":769},{"type":42,"tag":323,"props":5888,"children":5889},{"style":578},[5890],{"type":48,"value":957},{"type":42,"tag":323,"props":5892,"children":5893},{"class":325,"line":415},[5894,5898,5902],{"type":42,"tag":323,"props":5895,"children":5896},{"style":578},[5897],{"type":48,"value":744},{"type":42,"tag":323,"props":5899,"children":5900},{"style":572},[5901],{"type":48,"value":769},{"type":42,"tag":323,"props":5903,"children":5904},{"style":578},[5905],{"type":48,"value":609},{"type":42,"tag":51,"props":5907,"children":5908},{},[5909,5911,5916,5918,5924,5925,5931,5932],{"type":48,"value":5910},"Crawl period options: ",{"type":42,"tag":64,"props":5912,"children":5914},{"className":5913},[],[5915],{"type":48,"value":5870},{"type":48,"value":5917}," | ",{"type":42,"tag":64,"props":5919,"children":5921},{"className":5920},[],[5922],{"type":48,"value":5923},"BIWEEKLY",{"type":48,"value":5917},{"type":42,"tag":64,"props":5926,"children":5928},{"className":5927},[],[5929],{"type":48,"value":5930},"MONTHLY",{"type":48,"value":5917},{"type":42,"tag":64,"props":5933,"children":5935},{"className":5934},[],[5936],{"type":48,"value":5937},"NEVER",{"type":42,"tag":3259,"props":5939,"children":5941},{"id":5940},"inspect-chunks",[5942],{"type":48,"value":5943},"Inspect Chunks",{"type":42,"tag":51,"props":5945,"children":5946},{},[5947],{"type":48,"value":5948},"Audit what was indexed from a source:",{"type":42,"tag":51,"props":5950,"children":5951},{},[5952],{"type":42,"tag":86,"props":5953,"children":5954},{},[5955],{"type":48,"value":312},{"type":42,"tag":57,"props":5957,"children":5959},{"className":315,"code":5958,"language":317,"meta":66,"style":66},"chunks = requests.get(\n    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\u002FChunks\",\n    auth=auth,\n    params={\"pageSize\": 50}\n).json()\n\nfor chunk in chunks[\"chunks\"]:\n    print(f\"[{chunk['metadata']['sourceType']}] {chunk['content'][:100]}\")\n",[5960],{"type":42,"tag":64,"props":5961,"children":5962},{"__ignoreMap":66},[5963,5971,5979,5986,5994,6001,6008,6016],{"type":42,"tag":323,"props":5964,"children":5965},{"class":325,"line":326},[5966],{"type":42,"tag":323,"props":5967,"children":5968},{},[5969],{"type":48,"value":5970},"chunks = requests.get(\n",{"type":42,"tag":323,"props":5972,"children":5973},{"class":325,"line":335},[5974],{"type":42,"tag":323,"props":5975,"children":5976},{},[5977],{"type":48,"value":5978},"    f\"{base_url}\u002Fv2\u002FKnowledgeBases\u002F{kb_id}\u002FKnowledge\u002F{knowledge_id}\u002FChunks\",\n",{"type":42,"tag":323,"props":5980,"children":5981},{"class":325,"line":345},[5982],{"type":42,"tag":323,"props":5983,"children":5984},{},[5985],{"type":48,"value":412},{"type":42,"tag":323,"props":5987,"children":5988},{"class":325,"line":354},[5989],{"type":42,"tag":323,"props":5990,"children":5991},{},[5992],{"type":48,"value":5993},"    params={\"pageSize\": 50}\n",{"type":42,"tag":323,"props":5995,"children":5996},{"class":325,"line":363},[5997],{"type":42,"tag":323,"props":5998,"children":5999},{},[6000],{"type":48,"value":1706},{"type":42,"tag":323,"props":6002,"children":6003},{"class":325,"line":372},[6004],{"type":42,"tag":323,"props":6005,"children":6006},{"emptyLinePlaceholder":339},[6007],{"type":48,"value":342},{"type":42,"tag":323,"props":6009,"children":6010},{"class":325,"line":30},[6011],{"type":42,"tag":323,"props":6012,"children":6013},{},[6014],{"type":48,"value":6015},"for chunk in chunks[\"chunks\"]:\n",{"type":42,"tag":323,"props":6017,"children":6018},{"class":325,"line":388},[6019],{"type":42,"tag":323,"props":6020,"children":6021},{},[6022],{"type":48,"value":6023},"    print(f\"[{chunk['metadata']['sourceType']}] {chunk['content'][:100]}\")\n",{"type":42,"tag":51,"props":6025,"children":6026},{},[6027],{"type":42,"tag":86,"props":6028,"children":6029},{},[6030],{"type":48,"value":551},{"type":42,"tag":57,"props":6032,"children":6034},{"className":554,"code":6033,"language":556,"meta":66,"style":66},"const chunks = await fetch(\n    `${baseUrl}\u002Fv2\u002FKnowledgeBases\u002F${kbId}\u002FKnowledge\u002F${knowledgeId}\u002FChunks?pageSize=50`,\n    { headers: { \"Authorization\": authHeader } }\n).then(r => r.json());\n\nfor (const chunk of chunks.chunks) {\n    console.log(`[${chunk.metadata.sourceType}] ${chunk.content.slice(0, 100)}`);\n}\n",[6035],{"type":42,"tag":64,"props":6036,"children":6037},{"__ignoreMap":66},[6038,6065,6126,6174,6221,6228,6268,6385],{"type":42,"tag":323,"props":6039,"children":6040},{"class":325,"line":326},[6041,6045,6049,6053,6057,6061],{"type":42,"tag":323,"props":6042,"children":6043},{"style":566},[6044],{"type":48,"value":569},{"type":42,"tag":323,"props":6046,"children":6047},{"style":572},[6048],{"type":48,"value":3104},{"type":42,"tag":323,"props":6050,"children":6051},{"style":578},[6052],{"type":48,"value":581},{"type":42,"tag":323,"props":6054,"children":6055},{"style":883},[6056],{"type":48,"value":886},{"type":42,"tag":323,"props":6058,"children":6059},{"style":721},[6060],{"type":48,"value":891},{"type":42,"tag":323,"props":6062,"children":6063},{"style":572},[6064],{"type":48,"value":2306},{"type":42,"tag":323,"props":6066,"children":6067},{"class":325,"line":335},[6068,6073,6077,6081,6085,6089,6093,6097,6101,6105,6109,6113,6118,6122],{"type":42,"tag":323,"props":6069,"children":6070},{"style":578},[6071],{"type":48,"value":6072},"    `${",{"type":42,"tag":323,"props":6074,"children":6075},{"style":572},[6076],{"type":48,"value":904},{"type":42,"tag":323,"props":6078,"children":6079},{"style":578},[6080],{"type":48,"value":744},{"type":42,"tag":323,"props":6082,"children":6083},{"style":673},[6084],{"type":48,"value":1780},{"type":42,"tag":323,"props":6086,"children":6087},{"style":578},[6088],{"type":48,"value":754},{"type":42,"tag":323,"props":6090,"children":6091},{"style":572},[6092],{"type":48,"value":1789},{"type":42,"tag":323,"props":6094,"children":6095},{"style":578},[6096],{"type":48,"value":744},{"type":42,"tag":323,"props":6098,"children":6099},{"style":673},[6100],{"type":48,"value":2343},{"type":42,"tag":323,"props":6102,"children":6103},{"style":578},[6104],{"type":48,"value":754},{"type":42,"tag":323,"props":6106,"children":6107},{"style":572},[6108],{"type":48,"value":2352},{"type":42,"tag":323,"props":6110,"children":6111},{"style":578},[6112],{"type":48,"value":744},{"type":42,"tag":323,"props":6114,"children":6115},{"style":673},[6116],{"type":48,"value":6117},"\u002FChunks?pageSize=50",{"type":42,"tag":323,"props":6119,"children":6120},{"style":578},[6121],{"type":48,"value":918},{"type":42,"tag":323,"props":6123,"children":6124},{"style":578},[6125],{"type":48,"value":957},{"type":42,"tag":323,"props":6127,"children":6128},{"class":325,"line":345},[6129,6134,6138,6142,6146,6150,6154,6158,6162,6166,6170],{"type":42,"tag":323,"props":6130,"children":6131},{"style":578},[6132],{"type":48,"value":6133},"    {",{"type":42,"tag":323,"props":6135,"children":6136},{"style":801},[6137],{"type":48,"value":1238},{"type":42,"tag":323,"props":6139,"children":6140},{"style":578},[6141],{"type":48,"value":749},{"type":42,"tag":323,"props":6143,"children":6144},{"style":578},[6145],{"type":48,"value":794},{"type":42,"tag":323,"props":6147,"children":6148},{"style":578},[6149],{"type":48,"value":670},{"type":42,"tag":323,"props":6151,"children":6152},{"style":801},[6153],{"type":48,"value":804},{"type":42,"tag":323,"props":6155,"children":6156},{"style":578},[6157],{"type":48,"value":680},{"type":42,"tag":323,"props":6159,"children":6160},{"style":578},[6161],{"type":48,"value":749},{"type":42,"tag":323,"props":6163,"children":6164},{"style":572},[6165],{"type":48,"value":696},{"type":42,"tag":323,"props":6167,"children":6168},{"style":578},[6169],{"type":48,"value":744},{"type":42,"tag":323,"props":6171,"children":6172},{"style":578},[6173],{"type":48,"value":1424},{"type":42,"tag":323,"props":6175,"children":6176},{"class":325,"line":354},[6177,6181,6185,6189,6193,6197,6201,6205,6209,6213,6217],{"type":42,"tag":323,"props":6178,"children":6179},{"style":572},[6180],{"type":48,"value":769},{"type":42,"tag":323,"props":6182,"children":6183},{"style":578},[6184],{"type":48,"value":591},{"type":42,"tag":323,"props":6186,"children":6187},{"style":721},[6188],{"type":48,"value":1287},{"type":42,"tag":323,"props":6190,"children":6191},{"style":572},[6192],{"type":48,"value":729},{"type":42,"tag":323,"props":6194,"children":6195},{"style":1294},[6196],{"type":48,"value":1297},{"type":42,"tag":323,"props":6198,"children":6199},{"style":566},[6200],{"type":48,"value":1302},{"type":42,"tag":323,"props":6202,"children":6203},{"style":572},[6204],{"type":48,"value":1307},{"type":42,"tag":323,"props":6206,"children":6207},{"style":578},[6208],{"type":48,"value":591},{"type":42,"tag":323,"props":6210,"children":6211},{"style":721},[6212],{"type":48,"value":1130},{"type":42,"tag":323,"props":6214,"children":6215},{"style":572},[6216],{"type":48,"value":1320},{"type":42,"tag":323,"props":6218,"children":6219},{"style":578},[6220],{"type":48,"value":609},{"type":42,"tag":323,"props":6222,"children":6223},{"class":325,"line":363},[6224],{"type":42,"tag":323,"props":6225,"children":6226},{"emptyLinePlaceholder":339},[6227],{"type":48,"value":342},{"type":42,"tag":323,"props":6229,"children":6230},{"class":325,"line":372},[6231,6235,6239,6243,6247,6251,6256,6260,6264],{"type":42,"tag":323,"props":6232,"children":6233},{"style":883},[6234],{"type":48,"value":5133},{"type":42,"tag":323,"props":6236,"children":6237},{"style":572},[6238],{"type":48,"value":1176},{"type":42,"tag":323,"props":6240,"children":6241},{"style":566},[6242],{"type":48,"value":569},{"type":42,"tag":323,"props":6244,"children":6245},{"style":572},[6246],{"type":48,"value":5146},{"type":42,"tag":323,"props":6248,"children":6249},{"style":578},[6250],{"type":48,"value":5151},{"type":42,"tag":323,"props":6252,"children":6253},{"style":572},[6254],{"type":48,"value":6255}," chunks",{"type":42,"tag":323,"props":6257,"children":6258},{"style":578},[6259],{"type":48,"value":591},{"type":42,"tag":323,"props":6261,"children":6262},{"style":572},[6263],{"type":48,"value":5164},{"type":42,"tag":323,"props":6265,"children":6266},{"style":578},[6267],{"type":48,"value":1192},{"type":42,"tag":323,"props":6269,"children":6270},{"class":325,"line":30},[6271,6275,6279,6283,6287,6291,6295,6299,6303,6307,6312,6316,6321,6325,6329,6333,6337,6341,6345,6349,6353,6357,6361,6365,6369,6373,6377,6381],{"type":42,"tag":323,"props":6272,"children":6273},{"style":572},[6274],{"type":48,"value":5176},{"type":42,"tag":323,"props":6276,"children":6277},{"style":578},[6278],{"type":48,"value":591},{"type":42,"tag":323,"props":6280,"children":6281},{"style":721},[6282],{"type":48,"value":5185},{"type":42,"tag":323,"props":6284,"children":6285},{"style":801},[6286],{"type":48,"value":729},{"type":42,"tag":323,"props":6288,"children":6289},{"style":578},[6290],{"type":48,"value":918},{"type":42,"tag":323,"props":6292,"children":6293},{"style":673},[6294],{"type":48,"value":5198},{"type":42,"tag":323,"props":6296,"children":6297},{"style":578},[6298],{"type":48,"value":754},{"type":42,"tag":323,"props":6300,"children":6301},{"style":572},[6302],{"type":48,"value":5207},{"type":42,"tag":323,"props":6304,"children":6305},{"style":578},[6306],{"type":48,"value":591},{"type":42,"tag":323,"props":6308,"children":6309},{"style":572},[6310],{"type":48,"value":6311},"metadata",{"type":42,"tag":323,"props":6313,"children":6314},{"style":578},[6315],{"type":48,"value":591},{"type":42,"tag":323,"props":6317,"children":6318},{"style":572},[6319],{"type":48,"value":6320},"sourceType",{"type":42,"tag":323,"props":6322,"children":6323},{"style":578},[6324],{"type":48,"value":744},{"type":42,"tag":323,"props":6326,"children":6327},{"style":673},[6328],{"type":48,"value":5247},{"type":42,"tag":323,"props":6330,"children":6331},{"style":578},[6332],{"type":48,"value":754},{"type":42,"tag":323,"props":6334,"children":6335},{"style":572},[6336],{"type":48,"value":5207},{"type":42,"tag":323,"props":6338,"children":6339},{"style":578},[6340],{"type":48,"value":591},{"type":42,"tag":323,"props":6342,"children":6343},{"style":572},[6344],{"type":48,"value":5264},{"type":42,"tag":323,"props":6346,"children":6347},{"style":578},[6348],{"type":48,"value":591},{"type":42,"tag":323,"props":6350,"children":6351},{"style":721},[6352],{"type":48,"value":5273},{"type":42,"tag":323,"props":6354,"children":6355},{"style":572},[6356],{"type":48,"value":729},{"type":42,"tag":323,"props":6358,"children":6359},{"style":1567},[6360],{"type":48,"value":5282},{"type":42,"tag":323,"props":6362,"children":6363},{"style":578},[6364],{"type":48,"value":822},{"type":42,"tag":323,"props":6366,"children":6367},{"style":1567},[6368],{"type":48,"value":5291},{"type":42,"tag":323,"props":6370,"children":6371},{"style":572},[6372],{"type":48,"value":769},{"type":42,"tag":323,"props":6374,"children":6375},{"style":578},[6376],{"type":48,"value":764},{"type":42,"tag":323,"props":6378,"children":6379},{"style":801},[6380],{"type":48,"value":769},{"type":42,"tag":323,"props":6382,"children":6383},{"style":578},[6384],{"type":48,"value":609},{"type":42,"tag":323,"props":6386,"children":6387},{"class":325,"line":388},[6388],{"type":42,"tag":323,"props":6389,"children":6390},{"style":578},[6391],{"type":48,"value":1587},{"type":42,"tag":51,"props":6393,"children":6394},{},[6395,6397,6403,6405,6411],{"type":48,"value":6396},"Paginate with ",{"type":42,"tag":64,"props":6398,"children":6400},{"className":6399},[],[6401],{"type":48,"value":6402},"pageToken",{"type":48,"value":6404}," from ",{"type":42,"tag":64,"props":6406,"children":6408},{"className":6407},[],[6409],{"type":48,"value":6410},"chunks.meta.nextToken",{"type":48,"value":591},{"type":42,"tag":210,"props":6413,"children":6414},{},[],{"type":42,"tag":43,"props":6416,"children":6418},{"id":6417},"cannot",[6419],{"type":48,"value":6420},"CANNOT",{"type":42,"tag":124,"props":6422,"children":6423},{},[6424,6429,6434,6451,6469,6481,6486,6491,6496,6501,6506,6519,6531,6536,6566,6578,6591,6637],{"type":42,"tag":128,"props":6425,"children":6426},{},[6427],{"type":48,"value":6428},"Cannot exceed 5 Knowledge Bases per account",{"type":42,"tag":128,"props":6430,"children":6431},{},[6432],{"type":48,"value":6433},"Cannot exceed 10 knowledge sources per Knowledge Base",{"type":42,"tag":128,"props":6435,"children":6436},{},[6437,6439,6444,6446],{"type":48,"value":6438},"Cannot add sources before Knowledge Base is active — poll ",{"type":42,"tag":64,"props":6440,"children":6442},{"className":6441},[],[6443],{"type":48,"value":138},{"type":48,"value":6445}," until ",{"type":42,"tag":64,"props":6447,"children":6449},{"className":6448},[],[6450],{"type":48,"value":151},{"type":42,"tag":128,"props":6452,"children":6453},{},[6454,6456,6461,6463],{"type":48,"value":6455},"Cannot use v1 endpoints — all routes use ",{"type":42,"tag":64,"props":6457,"children":6459},{"className":6458},[],[6460],{"type":48,"value":177},{"type":48,"value":6462}," prefix on ",{"type":42,"tag":64,"props":6464,"children":6466},{"className":6465},[],[6467],{"type":48,"value":6468},"knowledge.twilio.com",{"type":42,"tag":128,"props":6470,"children":6471},{},[6472,6474,6479],{"type":48,"value":6473},"Cannot include auth header when uploading to presigned URL — ",{"type":42,"tag":64,"props":6475,"children":6477},{"className":6476},[],[6478],{"type":48,"value":4643},{"type":48,"value":6480}," is already signed",{"type":42,"tag":128,"props":6482,"children":6483},{},[6484],{"type":48,"value":6485},"Cannot search before source processing completes — poll source status first",{"type":42,"tag":128,"props":6487,"children":6488},{},[6489],{"type":48,"value":6490},"Cannot exceed 16 MiB (16,777,216 bytes) per file upload",{"type":42,"tag":128,"props":6492,"children":6493},{},[6494],{"type":48,"value":6495},"Cannot exceed 1,048,576 characters (~1MB) per text source pushed via API",{"type":42,"tag":128,"props":6497,"children":6498},{},[6499],{"type":48,"value":6500},"Cannot exceed 2048 characters in a search query",{"type":42,"tag":128,"props":6502,"children":6503},{},[6504],{"type":48,"value":6505},"Cannot exceed 2048 characters in a web source URL",{"type":42,"tag":128,"props":6507,"children":6508},{},[6509,6511,6517],{"type":48,"value":6510},"Cannot retrieve more than 20 search results per query (",{"type":42,"tag":64,"props":6512,"children":6514},{"className":6513},[],[6515],{"type":48,"value":6516},"top",{"type":48,"value":6518}," max is 20)",{"type":42,"tag":128,"props":6520,"children":6521},{},[6522,6524,6529],{"type":48,"value":6523},"Cannot exceed 100 ",{"type":42,"tag":64,"props":6525,"children":6527},{"className":6526},[],[6528],{"type":48,"value":5325},{"type":48,"value":6530}," in a search filter",{"type":42,"tag":128,"props":6532,"children":6533},{},[6534],{"type":48,"value":6535},"Cannot set crawl depth beyond 1–10 levels for web sources",{"type":42,"tag":128,"props":6537,"children":6538},{},[6539,6541,6546,6548,6553,6554,6559,6561],{"type":48,"value":6540},"Cannot use custom crawl schedules — locked to fixed intervals: ",{"type":42,"tag":64,"props":6542,"children":6544},{"className":6543},[],[6545],{"type":48,"value":5870},{"type":48,"value":6547},", ",{"type":42,"tag":64,"props":6549,"children":6551},{"className":6550},[],[6552],{"type":48,"value":5923},{"type":48,"value":6547},{"type":42,"tag":64,"props":6555,"children":6557},{"className":6556},[],[6558],{"type":48,"value":5930},{"type":48,"value":6560},", or ",{"type":42,"tag":64,"props":6562,"children":6564},{"className":6563},[],[6565],{"type":48,"value":5937},{"type":42,"tag":128,"props":6567,"children":6568},{},[6569,6571,6576],{"type":48,"value":6570},"Cannot use spaces or underscores in ",{"type":42,"tag":64,"props":6572,"children":6574},{"className":6573},[],[6575],{"type":48,"value":195},{"type":48,"value":6577}," — alphanumeric and hyphens only",{"type":42,"tag":128,"props":6579,"children":6580},{},[6581,6583,6589],{"type":48,"value":6582},"Cannot use ",{"type":42,"tag":64,"props":6584,"children":6586},{"className":6585},[],[6587],{"type":48,"value":6588},"name",{"type":48,"value":6590}," longer than 30 characters for knowledge sources",{"type":42,"tag":128,"props":6592,"children":6593},{},[6594,6596,6601,6602,6608,6609,6614,6615,6621,6622,6628,6629,6635],{"type":48,"value":6595},"Cannot modify immutable fields (",{"type":42,"tag":64,"props":6597,"children":6599},{"className":6598},[],[6600],{"type":48,"value":1405},{"type":48,"value":6547},{"type":42,"tag":64,"props":6603,"children":6605},{"className":6604},[],[6606],{"type":48,"value":6607},"type",{"type":48,"value":6547},{"type":42,"tag":64,"props":6610,"children":6612},{"className":6611},[],[6613],{"type":48,"value":1350},{"type":48,"value":6547},{"type":42,"tag":64,"props":6616,"children":6618},{"className":6617},[],[6619],{"type":48,"value":6620},"url",{"type":48,"value":6547},{"type":42,"tag":64,"props":6623,"children":6625},{"className":6624},[],[6626],{"type":48,"value":6627},"createdAt",{"type":48,"value":6547},{"type":42,"tag":64,"props":6630,"children":6632},{"className":6631},[],[6633],{"type":48,"value":6634},"updatedAt",{"type":48,"value":6636},") via PATCH",{"type":42,"tag":128,"props":6638,"children":6639},{},[6640,6642,6647],{"type":48,"value":6641},"Cannot use Knowledge for per-customer context — use ",{"type":42,"tag":64,"props":6643,"children":6645},{"className":6644},[],[6646],{"type":48,"value":79},{"type":48,"value":6648}," for that",{"type":42,"tag":210,"props":6650,"children":6651},{},[],{"type":42,"tag":43,"props":6653,"children":6655},{"id":6654},"next-steps",[6656],{"type":48,"value":6657},"Next Steps",{"type":42,"tag":124,"props":6659,"children":6660},{},[6661,6677,6692,6707,6722],{"type":42,"tag":128,"props":6662,"children":6663},{},[6664,6669,6670,6675],{"type":42,"tag":86,"props":6665,"children":6666},{},[6667],{"type":48,"value":6668},"Per-customer context:",{"type":48,"value":92},{"type":42,"tag":64,"props":6671,"children":6673},{"className":6672},[],[6674],{"type":48,"value":79},{"type":48,"value":6676}," — combine with Enterprise Knowledge for full agent context",{"type":42,"tag":128,"props":6678,"children":6679},{},[6680,6685,6686],{"type":42,"tag":86,"props":6681,"children":6682},{},[6683],{"type":48,"value":6684},"Background transcript intelligence:",{"type":48,"value":92},{"type":42,"tag":64,"props":6687,"children":6689},{"className":6688},[],[6690],{"type":48,"value":6691},"twilio-conversation-intelligence",{"type":42,"tag":128,"props":6693,"children":6694},{},[6695,6700,6701],{"type":42,"tag":86,"props":6696,"children":6697},{},[6698],{"type":48,"value":6699},"Voice agent with ConversationRelay:",{"type":48,"value":92},{"type":42,"tag":64,"props":6702,"children":6704},{"className":6703},[],[6705],{"type":48,"value":6706},"twilio-voice-conversation-relay",{"type":42,"tag":128,"props":6708,"children":6709},{},[6710,6715,6716],{"type":42,"tag":86,"props":6711,"children":6712},{},[6713],{"type":48,"value":6714},"TAC SDK integration:",{"type":48,"value":92},{"type":42,"tag":64,"props":6717,"children":6719},{"className":6718},[],[6720],{"type":48,"value":6721},"twilio-agent-connect",{"type":42,"tag":128,"props":6723,"children":6724},{},[6725,6730,6731],{"type":42,"tag":86,"props":6726,"children":6727},{},[6728],{"type":48,"value":6729},"Debug integration issues:",{"type":48,"value":92},{"type":42,"tag":64,"props":6732,"children":6734},{"className":6733},[],[6735],{"type":48,"value":6736},"twilio-debugging-observability",{"type":42,"tag":6738,"props":6739,"children":6740},"style",{},[6741],{"type":48,"value":6742},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":6744,"total":6923},[6745,6760,6780,6790,6802,6817,6834,6850,6866,6879,6895,6912],{"slug":232,"name":232,"fn":6746,"description":6747,"org":6748,"tags":6749,"stars":26,"repoUrl":27,"updatedAt":6759},"configure Twilio accounts and credentials","Create and configure a Twilio account from scratch. Covers free trial signup, trial limitations, getting credentials (Account SID and Auth Token), buying a phone number, verifying recipient numbers for trial use, SDK installation, first API call, subaccount management (creation, inheritance, credential isolation, limits), and enabling specific products (AI Assistants, Conversations, Verify, ConversationRelay, WhatsApp). Use this skill before any other Twilio skill if you do not yet have a Twilio account or need to enable a product. For Organization-level governance (SSO, SCIM, multi-team), see `twilio-organizations-setup`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6750,6753,6756],{"name":6751,"slug":6752,"type":15},"API Development","api-development",{"name":6754,"slug":6755,"type":15},"Communications","communications",{"name":6757,"slug":6758,"type":15},"SMS","sms","2026-08-01T05:43:28.968968",{"slug":6761,"name":6761,"fn":6762,"description":6763,"org":6764,"tags":6765,"stars":26,"repoUrl":27,"updatedAt":6779},"twilio-agent-augmentation-architect","augment human agents with AI intelligence","Planning skill for augmenting human agents with real-time AI intelligence. Qualifies the developer's use case across coaching, compliance, QA, and routing to recommend the right Conversation Intelligence + Conversation Memory + TaskRouter architecture. Handles both \"I want to add AI coaching to my call center\" and \"configure Conversation Intelligence operators for script adherence.\"\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6766,6769,6772,6775,6778],{"name":6767,"slug":6768,"type":15},"Agents","agents",{"name":6770,"slug":6771,"type":15},"AI","ai",{"name":6773,"slug":6774,"type":15},"Coaching","coaching",{"name":6776,"slug":6777,"type":15},"QA","qa",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:58.250609",{"slug":6721,"name":6721,"fn":6781,"description":6782,"org":6783,"tags":6784,"stars":26,"repoUrl":27,"updatedAt":6789},"connect AI agents to Twilio channels","Connect third-party AI agents (OpenAI, Bedrock, LangChain, Microsoft Foundry) to Twilio's communication channels using the Twilio Agent Connect SDK. Covers identity resolution, memory and context management via Conversation Memory, conversation orchestration via Conversation Orchestrator, multi-channel handling (Voice, SMS, RCS, WhatsApp, Chat), and AI-to-human escalation. Use this skill when integrating an existing LLM agent with Twilio services.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6785,6786,6787,6788],{"name":6767,"slug":6768,"type":15},{"name":6751,"slug":6752,"type":15},{"name":6754,"slug":6755,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:06:05.217098",{"slug":6791,"name":6791,"fn":6792,"description":6793,"org":6794,"tags":6795,"stars":26,"repoUrl":27,"updatedAt":6801},"twilio-ai-agent-architect","plan Twilio conversational AI agents","Planning skill for AI-powered conversational agents. Qualifies the developer's use case across outcome sophistication, entry point, and customer profile to recommend the right Twilio Conversations architecture and implementation skills. Handles both high-level requests (\"build me a voice AI assistant\") and specific ones (\"integrate ConversationRelay with my OpenAI backend\").\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6796,6797,6800],{"name":6767,"slug":6768,"type":15},{"name":6798,"slug":6799,"type":15},"Architecture","architecture",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:48.883723",{"slug":6803,"name":6803,"fn":6804,"description":6805,"org":6806,"tags":6807,"stars":26,"repoUrl":27,"updatedAt":6816},"twilio-call-recordings","record and manage Twilio voice calls","Record Twilio voice calls correctly. Covers the critical distinction between Record verb (voicemail) and Dial record (call recording), dual-channel for QA, mid-call pause for PCI, Conference recording, and the ConversationRelay workaround. Use this skill whenever you need to capture call audio for compliance, QA, or analytics.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6808,6811,6814,6815],{"name":6809,"slug":6810,"type":15},"Audio","audio",{"name":6812,"slug":6813,"type":15},"Compliance","compliance",{"name":6776,"slug":6777,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.268412",{"slug":6818,"name":6818,"fn":6819,"description":6820,"org":6821,"tags":6822,"stars":26,"repoUrl":27,"updatedAt":6833},"twilio-cli-reference","manage Twilio resources via CLI","Twilio CLI reference for managing Twilio resources from the terminal. Covers installation, credential profiles, phone number provisioning, sending SMS and email, webhook configuration, local development with a tunneling service, debugging with watch and logs, serverless deployment, and plugin ecosystem. Use when the developer asks to \"just do it\", \"set this up\", \"run a command\", mentions \"CLI\", \"command line\", or \"terminal\", or when an AI agent can execute a task directly instead of writing application code.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6823,6826,6829,6832],{"name":6824,"slug":6825,"type":15},"CLI","cli",{"name":6827,"slug":6828,"type":15},"Local Development","local-development",{"name":6830,"slug":6831,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:54.925664",{"slug":6835,"name":6835,"fn":6836,"description":6837,"org":6838,"tags":6839,"stars":26,"repoUrl":27,"updatedAt":6849},"twilio-compliance-onboarding","manage Twilio messaging and voice compliance","Registrations required BEFORE Twilio traffic works. Covers messaging programs (A2P 10DLC, toll-free verification, WhatsApp WABA, RCS, short code, alphanumeric sender) and voice trust programs (STIR\u002FSHAKEN, Voice Integrity, Branded Calling, CNAM). Each number\u002Fsender type has its own program — registration blocks traffic until complete.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6840,6841,6844,6845,6846],{"name":6812,"slug":6813,"type":15},{"name":6842,"slug":6843,"type":15},"Messaging","messaging",{"name":6757,"slug":6758,"type":15},{"name":9,"slug":8,"type":15},{"name":6847,"slug":6848,"type":15},"WhatsApp","whatsapp","2026-07-17T06:05:47.897229",{"slug":6851,"name":6851,"fn":6852,"description":6853,"org":6854,"tags":6855,"stars":26,"repoUrl":27,"updatedAt":6865},"twilio-compliance-traffic","ensure compliance for Twilio messaging traffic","Rules you must follow for Twilio messaging and voice traffic. Covers TCPA (consent tiers, quiet hours, DNC), GDPR (EU consent, right to deletion), PCI DSS (payment recording, Pay verb), HIPAA (BAA, PHI), FDCPA (debt collection limits), CAN-SPAM, WhatsApp policies, SHAKEN\u002FSTIR, and consent management patterns. Use this skill proactively when developers have working traffic to ensure they follow the rules.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6856,6857,6858,6861,6864],{"name":6812,"slug":6813,"type":15},{"name":6842,"slug":6843,"type":15},{"name":6859,"slug":6860,"type":15},"Regulatory Compliance","regulatory-compliance",{"name":6862,"slug":6863,"type":15},"Security","security",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.952779",{"slug":6867,"name":6867,"fn":6868,"description":6869,"org":6870,"tags":6871,"stars":26,"repoUrl":27,"updatedAt":6878},"twilio-conference-calls","build multi-party calls with Twilio Conference","Build multi-party calls using Twilio Conference. Covers warm transfer, cold transfer, coaching (whisper), hold vs mute, participant modes, and supervisor barge. Use this skill for any contact center, support line, or scenario requiring transfers, holds, or multi-party calls.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6872,6873,6874,6877],{"name":6809,"slug":6810,"type":15},{"name":6754,"slug":6755,"type":15},{"name":6875,"slug":6876,"type":15},"Meetings","meetings",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.603708",{"slug":6880,"name":6880,"fn":6881,"description":6882,"org":6883,"tags":6884,"stars":26,"repoUrl":27,"updatedAt":6894},"twilio-content-template-builder","create and send message templates with Twilio","Create, manage, and send message templates using Twilio's Content API. Covers template creation for WhatsApp, SMS, RCS, and MMS; variable usage; WhatsApp Meta approval; and sending templates via ContentSid. Use this skill when building structured messages that require pre-approval or consistent formatting across channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6885,6888,6889,6890,6893],{"name":6886,"slug":6887,"type":15},"Email","email",{"name":6842,"slug":6843,"type":15},{"name":6757,"slug":6758,"type":15},{"name":6891,"slug":6892,"type":15},"Templates","templates",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:26.637309",{"slug":6691,"name":6691,"fn":6896,"description":6897,"org":6898,"tags":6899,"stars":26,"repoUrl":27,"updatedAt":6911},"build conversation intelligence pipelines","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).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6900,6901,6904,6907,6910],{"name":6767,"slug":6768,"type":15},{"name":6902,"slug":6903,"type":15},"Analytics","analytics",{"name":6905,"slug":6906,"type":15},"Monitoring","monitoring",{"name":6908,"slug":6909,"type":15},"NLP","nlp",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:52.545387",{"slug":79,"name":79,"fn":6913,"description":6914,"org":6915,"tags":6916,"stars":26,"repoUrl":27,"updatedAt":6922},"manage conversation memory with Twilio","Store and retrieve conversation 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 conversations across sessions and channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6917,6918,6921],{"name":6767,"slug":6768,"type":15},{"name":6919,"slug":6920,"type":15},"Memory","memory",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:19.526724",57,{"items":6925,"total":6923},[6926,6932,6940,6947,6953,6960,6967],{"slug":232,"name":232,"fn":6746,"description":6747,"org":6927,"tags":6928,"stars":26,"repoUrl":27,"updatedAt":6759},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6929,6930,6931],{"name":6751,"slug":6752,"type":15},{"name":6754,"slug":6755,"type":15},{"name":6757,"slug":6758,"type":15},{"slug":6761,"name":6761,"fn":6762,"description":6763,"org":6933,"tags":6934,"stars":26,"repoUrl":27,"updatedAt":6779},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6935,6936,6937,6938,6939],{"name":6767,"slug":6768,"type":15},{"name":6770,"slug":6771,"type":15},{"name":6773,"slug":6774,"type":15},{"name":6776,"slug":6777,"type":15},{"name":9,"slug":8,"type":15},{"slug":6721,"name":6721,"fn":6781,"description":6782,"org":6941,"tags":6942,"stars":26,"repoUrl":27,"updatedAt":6789},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6943,6944,6945,6946],{"name":6767,"slug":6768,"type":15},{"name":6751,"slug":6752,"type":15},{"name":6754,"slug":6755,"type":15},{"name":9,"slug":8,"type":15},{"slug":6791,"name":6791,"fn":6792,"description":6793,"org":6948,"tags":6949,"stars":26,"repoUrl":27,"updatedAt":6801},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6950,6951,6952],{"name":6767,"slug":6768,"type":15},{"name":6798,"slug":6799,"type":15},{"name":9,"slug":8,"type":15},{"slug":6803,"name":6803,"fn":6804,"description":6805,"org":6954,"tags":6955,"stars":26,"repoUrl":27,"updatedAt":6816},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6956,6957,6958,6959],{"name":6809,"slug":6810,"type":15},{"name":6812,"slug":6813,"type":15},{"name":6776,"slug":6777,"type":15},{"name":9,"slug":8,"type":15},{"slug":6818,"name":6818,"fn":6819,"description":6820,"org":6961,"tags":6962,"stars":26,"repoUrl":27,"updatedAt":6833},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6963,6964,6965,6966],{"name":6824,"slug":6825,"type":15},{"name":6827,"slug":6828,"type":15},{"name":6830,"slug":6831,"type":15},{"name":9,"slug":8,"type":15},{"slug":6835,"name":6835,"fn":6836,"description":6837,"org":6968,"tags":6969,"stars":26,"repoUrl":27,"updatedAt":6849},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6970,6971,6972,6973,6974],{"name":6812,"slug":6813,"type":15},{"name":6842,"slug":6843,"type":15},{"name":6757,"slug":6758,"type":15},{"name":9,"slug":8,"type":15},{"name":6847,"slug":6848,"type":15}]