Skip to main content

Sources API

Sources turn external knowledge into searchable memories with attribution. A source is the parent record for a document, file, URL, or connector item. Each source creates one source memory plus one or more source_chunk memories used by vector, hybrid, and spreading activation search.

Source Model

Ingest Text Or URL

Endpoint: POST /sources/ingest Use this for raw text, web pages, Notion/GitHub/Drive connector output, or any upstream integration that already has text.
Request body Response

Upload File

Endpoint: POST /sources/upload Files are stored in the configured blob backend. Use STORAGE_PROVIDER=r2 with Cloudflare R2 credentials in production. Local filesystem storage is used as a development fallback.
Supported extraction paths include text, Markdown, HTML, PDF placeholder extraction, image OCR placeholder metadata, and audio transcription placeholder metadata. Unsupported files are still stored as attachments and indexed as attachment source records.

List Sources

Endpoint: GET /sources

Get Source

Endpoint: GET /sources/{source_id} Returns the source metadata and chunk memory IDs. Query the chunk memories through /memories/{id} or search them through /search.

Delete Source

Endpoint: DELETE /sources/{source_id} Deletes the source memory, all chunk memories, and the stored blob when present.

SDK Examples

Storage Configuration