Agent Copilot: Knowledge chunk resource (public beta)
Public Beta
Agent Copilot is currently available as a Public Beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a SLA.
Not a HIPAA Eligible Service or PCI Compliant
Agent Copilot is not a HIPAA Eligible Service or PCI compliant and should not be used in Flex workflows that are subject to HIPAA or PCI. However, we offer mitigation tools such as PII redaction. To learn more, see AI data use.
When you create a Knowledge source, Agent Copilot processes that Knowledge and breaks it into discrete pieces called chunks. These pieces can help you troubleshoot unexpected behavior with Agent Copilot.
This API returns a list of all Knowledge chunks created from uploading Knowledge sources.
GET https://knowledge.twilio.com/v1/Knowledge/{id}/Chunks
The knowledge ID.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1Maximum: 1000The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listKnowledgeChunks() {11const chunks = await client.knowledge.v112.knowledge("id")13.chunks.list({ limit: 20 });1415chunks.forEach((c) => console.log(c.accountSid));16}1718listKnowledgeChunks();
Response
1{2"chunks": [3{4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"content": "content",6"metadata": {},7"date_created": "2009-07-06T20:30:00Z",8"date_updated": "2009-07-06T20:30:00Z"9}10],11"meta": {12"first_page_url": "https://www.example.com",13"key": "key",14"next_page_url": "https://www.example.com",15"page": 42,16"page_size": 42,17"previous_page_url": "https://www.example.com",18"url": "https://www.example.com"19}20}