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
idstring——Unique identifier for the knowledge source
namestringYes—Human-readable name
sourceTypeenumYes—Type of knowledge source. One of DOCUMENT, URL, BUSINESS_WEBSITE, CORPUS, or BATCH_DOCUMENT.
request_successbooleanYes—Whether initial processing succeeded
processingStatusenumNoPENDINGCurrent processing status. One of PENDING, PROCESSING, COMPLETED, or FAILED.
contentstring | nullNo—Raw extracted content (inline)
prepped_contentstring | nullNo—Processed content optimized for AI
content_pathstring | nullNo—Storage path for raw content
prepped_content_pathstring | nullNo—Storage path for processed content
original_content_urlstring | nullNo—Original source URL
stored_content_urlstring | nullNo—Cloud storage URL for raw content
prepped_content_urlstring | nullNo—Cloud storage URL for processed content
content_sizenumberNo—Size of raw content in bytes
prepped_content_sizenumberNo—Size of processed content in bytes
storage_tierenumNoFIRESTORECurrent storage tier. One of FIRESTORE or CLOUD_STORAGE.
last_accessednumberNo—Last access timestamp
access_countnumberNo0Access count for tier optimization
is_compressedbooleanNofalseWhether content is compressed
compression_rationumberNo—Compression ratio achieved
metadataobjectNo{}Additional metadata
original_content_typestring | nullNo—Original MIME type
content_hashstring | nullNo—Content hash for deduplication
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix 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
}