POST /api/company-brain/documents for text, Markdown, public URLs, and
remote file URLs. Use POST /api/company-brain/documents/upload when the client
has a local file.
Supported sources
- Plain text and Markdown
- HTML and documentation URLs
- CSV
- DOCX
- Images such as PNG, JPG, WebP, and TIFF
crawlSubpages is enabled.
Documentation URLs
For documentation sites, MemContext works best when the site exposes anllms.txt file, such as https://docs.example.com/llms.txt.
When you submit a documentation URL with crawlSubpages: true, MemContext first
checks for a docs index like llms.txt, discovers the listed pages, ranks the
most useful pages, and ingests only the selected priority pages. This keeps the
surface area smaller while giving retrieval more relevant context.
If you want a URL to be scraped well, make sure the documentation URL is public,
uses normal HTTP/HTTPS links, and exposes a clean llms.txt page map whenever
possible.
Processing lifecycle
- The API validates workspace membership.
- The document is queued as a source.
- The processor resolves the source content.
- Content is normalized and split into chunks.
- Chunk embeddings are generated.
- Atomic memories are extracted from each chunk.
- Evidence links each memory to its source chunk.
202 Accepted; processing continues in the
background.
Document limits
Context Vault document limits are enforced at the workspace billing-owner level. If an invited admin or member uploads a document, it still counts against the workspace billing owner’s document allowance.Scope and project on ingestion
Setscope when the document should only appear in a specific hard lane, such
as hr, engineering, or billing.
Set project when the document is part of a softer collection inside that
scope, such as onboarding, api-platform, or q3-invoices.