Skip to main content

Knowledge Source

Knowledge Sources provide contextual information, documentation, and domain knowledge for AI agents. They are referenced by Instruction Configurations (1:N relationship) and support intelligent storage tier management for cost optimization.

Schema: KnowledgeSourceSchema Source: src/core/service-configuration/knowledge.schema.ts


Attributes

AttributeTypeRequiredDefaultDescription
idstringUnique identifier for the knowledge source
namestringYesHuman-readable name
sourceTypeenumYesType of knowledge source. One of DOCUMENT, URL, BUSINESS_WEBSITE, CORPUS, or BATCH_DOCUMENT.
request_successbooleanYesWhether initial processing succeeded
processingStatusenumNoPENDINGCurrent processing status. One of PENDING, PROCESSING, COMPLETED, or FAILED.
contentstring | nullNoRaw extracted content (inline)
prepped_contentstring | nullNoProcessed content optimized for AI
content_pathstring | nullNoStorage path for raw content
prepped_content_pathstring | nullNoStorage path for processed content
original_content_urlstring | nullNoOriginal source URL
stored_content_urlstring | nullNoCloud storage URL for raw content
prepped_content_urlstring | nullNoCloud storage URL for processed content
content_sizenumberNoSize of raw content in bytes
prepped_content_sizenumberNoSize of processed content in bytes
storage_tierenumNoFIRESTORECurrent storage tier. One of FIRESTORE or CLOUD_STORAGE.
last_accessednumberNoLast access timestamp
access_countnumberNo0Access count for tier optimization
is_compressedbooleanNofalseWhether content is compressed
compression_rationumberNoCompression ratio achieved
metadataobjectNo{}Additional metadata
original_content_typestring | nullNoOriginal MIME type
content_hashstring | nullNoContent hash for deduplication
createdAtnumberUnix timestamp when created
updatedAtnumberUnix timestamp when last updated

Example

{
"id": "kb_abc123",
"name": "Product Documentation",
"sourceType": "DOCUMENT",
"request_success": true,
"processingStatus": "COMPLETED",
"content": "Raw document content...",
"prepped_content": "Processed and optimized content...",
"storage_tier": "FIRESTORE",
"access_count": 42,
"is_compressed": false,
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}