Docs

Docs

x-cpod-domain: knowledge

Knowledge

Documents, chunks, and entities backing search & retrieval.

Try in explorer client.knowledge

Document

A document indexed for search and RAG.

REST path/api/v1/knowledge/documents
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.knowledge.documents.list()

// create:
await client.knowledge.documents.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
account_idstringOptional account scope.
collection_idstringLogical grouping, e.g. kb-security, kb-product.
kindstringDocument kind classification.
titlestringHuman-readable document title.
descriptionstringOptional long-form description of the document.
mime_typestringMIME type of the document bytes.
size_bytesnumberSize of the document in bytes.
file_hashstringSHA-256 hash of the document bytes, used as a deduplication key.
minio_keystringMinIO object key for the document bytes. Format: cpod-files/{tenantId}/{collectionId}/{docId}/source.{ext}.
languagestringBCP-47 language tag for the document content.
page_countnumberNumber of pages in the document.
extractorstringExtraction pipeline used to process this document.
extraction_statusstringCurrent status of the document extraction pipeline.
extracted_atdate-timeISO 8601 timestamp when extraction completed.
chunk_countnumberCached count of chunks produced from this document.
embedding_modelstringEmbedding model used to generate chunk vectors.
embedding_dimensionsnumberDimensionality of the embedding vectors.
chunk_idsjsonMaterial list of chunk IDs (also derivable from graph edges).
entity_idsjsonIDs of extracted KnowledgeEntity nodes (kne-<uuid>).
effective_fromdate-timeStart of the validity window for policy or contract documents.
effective_todate-timeEnd of the validity window for policy or contract documents.
versionstringDocument's own version string, independent of the record version header.
parent_document_idstringID of the document this one supersedes, if applicable.
acl_scopestringAccess control scope for this document.
acl_allowed_role_idsjsonRole IDs permitted to access this document when aclScope is restricted.
tagsjsonFree-form tags for categorisation and search.
statusenumLifecycle status of this document record.activearchiveddraft

Chunk

A chunk of a Document used at retrieval time.

REST path/api/v1/knowledge/chunks
Operations
listgetcreatedeletesearch
SDK
// list — returns only your records; add filters/search:
await client.knowledge.chunks.list()

// create:
await client.knowledge.chunks.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
document_idstringID of the parent Document (doc-<uuid>).
chunk_numbernumberSequential position of this chunk within the parent document.
textstringText content of this chunk.
tokensnumberToken count of the chunk text.
vectorjsonEmbedding vector (Array<Float32, 1536>), HNSW-indexed in ClickHouse.
embedding_modelstringEmbedding model used to generate the vector.
chunk_typestringStructural type of the chunk content.
page_numbernumberPage number in the source document where this chunk appears.
header_pathjsonHeading hierarchy leading to this chunk, e.g. ["Section 5", "5.2 Access Control"].
prev_chunk_idstringID of the preceding chunk in the document, for sequential traversal.
next_chunk_idstringID of the following chunk in the document, for sequential traversal.
entity_idsjsonIDs of KnowledgeEntity nodes mentioned in this chunk.
keywordsjsonExtracted keywords from the chunk text.
languagestringBCP-47 language tag for this chunk's content.
sensitivitystringData sensitivity classification for this chunk.
statusenumLifecycle status of this chunk.activearchivedsuperseded

KnowledgeEntity

A named entity extracted from documents.

REST path/api/v1/knowledge/entities
Operations
listgetcreateupdatedelete
SDK
// list — returns only your records; add filters/search:
await client.knowledge.entities.list()

// create:
await client.knowledge.entities.create({
  id: "rec_01HXEXAMPLE",
  tenant_id: "example tenant_id",
  created_at: "2026-01-01T00:00:00Z",
  updated_at: "2026-01-01T00:00:00Z",
  app_id: "example app_id",
  created_by: "rec_01HXEXAMPLE",
})
FieldTypeDescription
id*uuidServer-assigned ULID with type prefix (e.g. per_…).
tenant_id*stringTenant scope — auto-stamped from the caller's JWT.
app_idstringApp scope. Stamped ONLY when the caller's JWT was minted for a specific Application (integration API keys). Absent for human-user sessions. Filters reads when present.
created_at*date-timeServer stamp.
updated_at*date-timeServer stamp; updated on every patch.
created_byuuidPerson id from the caller's JWT (sub).
updated_byuuidPerson id from the last writer's JWT (sub).
sourcestringProvenance tag — defaults to 'edm'.
source_typeenumWhere the write originated. Defaults to 'api'.frontendbackendserversystemapi
is_deletedbooleanSoft-delete flag. Excluded from default list queries.
deleted_atdate-timeStamped when soft-deleted; null otherwise.
deleted_byuuidPerson id who soft-deleted; null otherwise.
schema_versionnumberDocument schema version. Bumped on incompatible writes.
typestringSemantic type of this knowledge entity.
domainstringKnowledge domain this entity belongs to.
namestringHuman-readable display name.
canonical_namestringNormalised name (lowercased, deduped) used for deduplication.
aliasesjsonAlternative names or synonyms for this entity.
descriptionstringOptional description of this entity.
confidencenumberExtraction confidence score in the range [0, 1].
document_idsjsonIDs of source documents where this entity was mentioned.
chunk_idsjsonIDs of chunks where this entity appears.
attributesjsonDomain-specific attributes, e.g. { severity, cvss_score, mitre_tactic, control_id, ... }.
version_infostringVersion string for versioned entities (e.g. CVE-2024-12345 → 2024-12345).
is_validbooleanTrue until this entity is superseded by a newer version.
last_seen_atdate-timeISO 8601 timestamp when this entity was last observed in a document.
tagsjsonFree-form tags for categorisation.
statusenumLifecycle status of this knowledge entity.activemergedarchived