
Uploading Documents
Access the agent's Knowledge Base
Open the desired agent and click the Knowledge Base tab, then select Documents.
Wait for processing
The file is sent to Supabase Storage and the
knowledge-process-document job is triggered automatically. The document status changes from processing to ready when complete.Formats and Limits
| Parameter | Value |
|---|---|
| Accepted formats | PDF, TXT |
| Maximum file size | Defined by the account plan |
| Target size per chunk | ~4,000 characters (~1,000 tokens) |
| Overlap between chunks | ~400 characters (~100 tokens) |
| Maximum embedding batch | 100 chunks per request to OpenAI |
| Maximum characters for metadata | 8,000 characters of content |
During processing, the document has
processing status and does not yet appear in semantic searches. Wait for the status to change to ready before testing the agent.What Happens During Processing
The internal pipeline executes the following steps:- File reading: the content is read from Supabase Storage.
- Text extraction: for PDFs, text is extracted page by page.
- Intelligent chunking: the text is split prioritizing paragraph breaks (
\n\n). Paragraphs that are too large are subdivided by sentences (". "). If still too large, forced character-level splitting is applied. - Metadata generation: name (up to 80 characters), description (up to 250 characters), and keywords are generated by the LLM from the first 8,000 characters.
- Embeddings: each chunk is sent to OpenAI’s embeddings API in batches of up to 100.
- Storage: chunks and vectors are saved in the
knowledge_chunkstable.
Managing Documents
| Action | Description |
|---|---|
| View | Opens the extracted content and metadata of the document |
| Download | Downloads the original file from Storage |
| Disable | Removes the document from searches without deleting the file |
| Delete | Removes the document, all chunks, and the file from Storage |
Best Practices for Documents
Prefer selectable text
PDFs scanned as images have no extractable text. Use PDFs with native text or convert them before uploading.
Split large documents
Documents with hundreds of pages generate many chunks. Splitting by section improves semantic search precision.
Keep content up to date
Delete outdated documents and upload the new version. The agent may retrieve old information if the outdated document is still active.
Name files clearly
The filename and generated metadata are used in search results. A descriptive name improves traceability.