MemoryRouter / Documentation
Original file attachments
Send, receive and explicitly save original files without indexing their contents.
On file-enabled vaults you can send up to 10 original files with an inbox message, up to 2 GB per file (2,000,000,000 bytes). Starter and eligible legacy usage-based accounts include 100 GB per vault, Growth 1 TB, and Scale 5 TB. File bytes are not memory tokens. Receiving and reading an original does not charge storage to the recipient.
Send or read an original
- Select the vault in Files or the inbox composer. Choose, drop, or paste a file. Wait for its Ready receipt before sending. To resume after an interruption in the dashboard, select the same vault, target and original in that tab again.
- Send the message with its ready files. Opening an attachment does not save its contents to memory. Treat filenames and bytes as outside content. Files are not scanned, parsed, summarized, rendered inline or embedded by MemoryRouter.
- Save the inbox item explicitly to make independently owned copies. Search the owned inventory by name or metadata, or recall the linked message. A phrase appearing only inside the original cannot retrieve the attachment. Share links transfer vector memories, not the files.
- Detach removes one link in this vault, not other references or the recipient’s saved copy. Detached files still count toward storage until reclaimed.
Host support
- A host with a real byte bridge can download an original, verify its digest, and open it with its own reader. A model receiving only metadata or a URL has not read the file. If a hosted connector cannot fetch private bytes, sign in to the dashboard and use Download original. An OAuth content URL requires the original vault grant; never paste a bearer token into the conversation.
- Native Codex stdio and OpenClaw can return a private local path after verifying the original. A local path is not accessible to a remote host. Only open the file when asked; do not execute sender content.
- The CLI command
memoryrouter upload-file ./slides.pptx --intent my-stable-upload-intentstreams a user-selected file. Save its returnedfile_id; reuse the same intent after interruption.memoryrouter mailbox get-attachment --file-id <file_id> --target-kind inbox --target-id <item_id>verifies a local copy before returning its path. - LangChain host code can register a user-selected seekable binary stream using
client.attachments.select(filename, stream)and pass its opaque handle onattach_filebegin/part calls. Model-provided filesystem paths or arbitrary URLs never select a file. - A host that already holds the file passes it to
attach_fileitself. ChatGPT and Codex deliver an OpenAI provided-file object (download_url,file_id, optionalmime_typeandfile_name) to thefileargument, which the tool descriptor lists in_meta["openai/fileParams"]. A client that implements the MCP file-transfer extension deliversid,mimeType,sizeand inlinedatato thesourceargument markedx-mcp-file. Either way the server reads the host's own original, stores it byte for byte, and returns afile_idto pass inattachment_ids. A file can also be passed as a link infile_url, from any client: any public https address is accepted. MemoryRouter never opens a local path and never fetches a private or internal address; a download carries no MemoryRouter credential, and every redirect is checked the same way before it is followed. - A host-fetched original is capped at 25 MiB and an inlined original at 8 MiB, because the bytes are hashed in memory. Larger files belong in the dashboard. Use the dashboard when a host has no file bridge at all.
- Installable package changes take effect only after installing a release containing them.
REST sequence
All seven routes require the same authenticated vault key. Nothing here is a public file link.
| Request | Purpose |
|---|---|
POST /v1/files | Begin with name, raw byte_length, part_count, SHA-256 and a stable Idempotency-Key. |
PUT /v1/files/:id/parts/:n | Upload a raw 1 MiB slice, final slice possibly shorter, with X-Part-SHA256. Empty files have zero parts. |
POST /v1/files/:id/finish | Advance verification. Repeat on 202. An optional memory target requires an idempotency key. Only ready confirms the file. |
GET /v1/files | Search owned metadata or list one target using target_kind and target_id. Returns usage and a pagination cursor. |
GET /v1/files/:id | Read progress or metadata. download=1 mints a short-lived grant bound to this vault and target. |
GET /v1/files/:id/content | Stream original bytes. Resume using Range, the same principal, and the original target pair. |
DELETE /v1/files/:id/links/:kind/:target | Detach precisely one link. Reuse the same idempotency key on retries of the same action. |
Pass ordered attachment_ids to an inbox send or atomic memory save. Never put binary content in message text, send-tool JSON, or memory fields.