mRAG_ingest
Add text to the USER'S OWN private knowledge base so mRAG_search can recall it later. Pass content_text (a note, document, transcript, pasted page); it is semantically chunked, embedded (1536-d) and stored in the per-user vector index mRAG_search reads. Returns how many chunks were indexed. ⚠ IF YOU ARE INDEXING A CORPUS you want to TRAVERSE (who is connected to whom, when), also pass sender / recipient / occurred_at: the knowledge graph builds its nodes from those fields alone, so documents ingested without them are searchable but contribute NOTHING to mRAG_graph_overview / _neighbors / _timeline — the graph comes back empty however many documents you loaded. Reuse the same party ref across documents to merge them into one node. NOTE: indexed content and metadata are stored server-side in plaintext — NOT covered by the zero-knowledge / E2EE guarantee. Only ingest what the user opted to make searchable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | MIME type of the original file, if known. | |
| name | No | Original filename, if this came from a file (e.g. 'pozew-2019-03-11.pdf'). Its extension is what classifies the row as a document/image/audio in the file view. Distinct from `title`, which is free prose. | |
| size | No | Size of the original file in bytes, if known. | |
| title | No | Optional human title, stored in metadata. | |
| labels | No | Free-text tags to attach (e.g. a case id, a jurisdiction) for later filtering. | |
| sender | No | Who the document is FROM (author, filing party, sender). Becomes a node in the knowledge graph — without it this document adds no party to mRAG_graph_overview. | |
| metadata | No | Any extra fields to store alongside the row (case id, docket number, jurisdiction, file path, checksum, sensitivity flag…). Stored verbatim and returned with search hits. NOTE: this is stored server-side in plaintext like the content itself. | |
| direction | No | Direction relative to the account owner: received, sent, or the owner's own note. | |
| recipient | No | Who the document is TO (addressee, court, counterparty). Becomes a node in the knowledge graph, connected to `sender`. | |
| source_id | No | Optional stable id for the source so re-ingests of the SAME document group together (and can be removed later with mRAG_delete). Any string works — a file path, a case number, a checksum: a non-UUID is folded into a stable id derived from it, deterministically, and the original is kept as metadata.source_ref. | |
| thread_id | No | Optional thread id to associate this knowledge with (e.g. a dm:/chat: thread). | |
| occurred_at | No | ISO-8601 timestamp of WHEN the document happened (letter date, filing date, email Date header) — not when you indexed it. Drives mRAG_graph_timeline; defaults to now if omitted, which makes a 2019 filing look like it happened today. | |
| source_type | No | What kind of source this is. Default 'file' (a document/note). Use 'note' for ad-hoc text. | |
| content_text | Yes | Text to index into the user's private knowledge base (a note, document, transcript, pasted page…). Chunked + embedded server-side. |