Upload metadata
Requests carry module, thread, message, user, and organization metadata so retrieval can be scoped later.
Knowledge
Uploads are extracted into full markdown, chunks, embeddings, and optional graph context. Chat and agent tools can inspect ingestion status, wait for documents, and retrieve content when it is ready.
Ingestion path
This keeps upload processing, extraction, embedding, and graph updates away from the request that renders the message.
Requests carry module, thread, message, user, and organization metadata so retrieval can be scoped later.
Extractors return full markdown plus chunks and metadata. Knowledge can still expose full extracted content when vector services are not active.
Ingestion runs through queued services so the UI and chat action do not block on extraction or embedding.
Retrieval path
The agent should not assume every uploaded document is immediately embedded or graph-indexed.
Vector (semantic) and lexical search run together and their scores are fused. Metadata-aware weighting lets summaries and segments outrank raw chunks when both match.
Bounded knowledge-graph traversal promotes connected items from the top results; a cross-encoder reranker sets the final ordering when one is configured.
When vector services are not active, tools still retrieve full extracted markdown for documents that completed extraction.
Queries carry user, organization, and module scope, and visibility is re-checked per item — including across graph traversal, so expansion never crosses a scope boundary.
Safety of retrieval
Knowledge data can be shared infrastructure, so filters cannot be optional decoration.
Stored metadata should preserve user and organization context so retrieval can apply tenancy boundaries.
Conversation tools should filter by module and conversation/thread identifiers when searching chat content.
Extraction request ids keep background work correlated with the uploaded source and later retrieval.
Configuration
A document-aware module should not hardcode accepted files or retrieval behavior. It should read configured extractors, MIME types, and knowledge providers from the runtime.
Extractors declare the MIME types they can ingest. Composer upload controls should use that list instead of local UI constants.
Vector retrieval requires an embedding model/provider. If it is not configured, the extracted markdown can still be read directly.
Knowledge can write chunks, embeddings, and graph context to the configured stores while preserving request and scope metadata.
Ingestion and retrieve flow
This separation lets uploads finish quickly, extraction run asynchronously, and agents query whichever source is ready for the current conversation.
Next
Use these pages to move from the concept to adjacent parts of the runtime.