Documents and connectors¶
Apps answer from sources: folders on disk, or connectors that sync from other systems. Documents are split into chunks, embedded with the app's embedding model, and stored in the app's sources collection, encrypted.
File types: PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), HTML, Markdown, text, CSV and email (.eml). Scanned PDFs need OCR first.
Local folders¶
sources:
- path: ./policies/
- path: ./faq.md
chunking: { size: 800, overlap: 100 } # characters per chunk (optional)
Only new and changed files are re-indexed on each deploy. aiapp jobs shows indexing progress.
Connectors¶
Connectors sync on a schedule (such as 1h or @daily). aiapp sources shows their status; aiapp source sync APP [NAME] syncs now. Deleted documents are removed from the index.
Register an Entra ID app with the Microsoft Graph permission Sites.Read.All (or Files.Read.All for OneDrive), as an application permission with admin consent.
sources:
- name: hr-site
sharepoint:
tenant: contoso.onmicrosoft.com
client_id: 00000000-0000-0000-0000-000000000000
client_secret: "${GRAPH_CLIENT_SECRET}"
site: contoso.sharepoint.com:/sites/hr
folder: Policies # optional; drive: "Documents" picks the library
schedule: 1h
For OneDrive, use user: someone@contoso.com instead of site:.
sources:
- name: manuals
s3: { bucket: product-manuals, prefix: en/, region: eu-west-1 } # keys from AWS_* or access_key/secret_key
schedule: 6h
For S3-compatible storage (MinIO…), add endpoint: and path_style: true.
sources:
- name: contracts
azure_blob: { account: contosodocs, container: contracts, prefix: 2026/, sas: "${AZURE_BLOB_SAS}" }
schedule: 6h
The SAS needs read and list permissions.
Each row becomes a document:
Code repositories¶
For the code-assistant blueprint, set code: true on a source: code is split along functions and classes, and answers cite files and line numbers.