List Sources

List all knowledge sources for an agent.

GET/knowledge/list

Get all knowledge sources attached to an agent.

Query Parameters

Agent ID (format: ag_*)

Query Parameters

ParameterTypeRequiredDescription
agent_idstringYesThe agent's public ID (ag_*)

Response 200

{
  "sources": [
    {
      "id": 1,
      "name": "Product FAQ",
      "type": "text",
      "status": "ready",
      "char_count": 4500,
      "chunk_count": 12,
      "created_at": "2026-03-01T10:00:00Z"
    },
    {
      "id": 2,
      "name": "https://docs.example.com",
      "type": "url",
      "status": "processing",
      "char_count": null,
      "chunk_count": null,
      "created_at": "2026-03-07T14:00:00Z"
    },
    {
      "id": 3,
      "name": "manual.pdf",
      "type": "file",
      "status": "ready",
      "char_count": 28000,
      "chunk_count": 85,
      "created_at": "2026-03-05T09:00:00Z"
    }
  ]
}

Response Fields

FieldTypeDescription
sources[].idintegerSource ID
sources[].namestringSource name or URL
sources[].typestringSource type (see Source Types)
sources[].statusstringprocessing, ready, failed
sources[].char_countinteger | nullTotal characters indexed
sources[].chunk_countinteger | nullNumber of vector chunks
sources[].created_atstringISO 8601 creation timestamp

Source Types

TypeDescription
textRaw text content
urlWeb page (crawled)
fileUploaded document (PDF, DOCX, TXT)
csvCSV data
jsonJSON data
markdownMarkdown document
youtubeYouTube video transcript
excelExcel spreadsheet
github_repoGitHub repository
azure_blobAzure Blob Storage
sharepointSharePoint document
ocrOCR-processed document

Errors

CodeDescription
401Missing or invalid authentication
404Agent not found

On this page