Keep the source. Rebuild the context.
Ingest direct text or immutable files without flattening them into conversational memories. FishMem retains the exact source and lossless extraction artifact, then builds replaceable Markdown, chunks, and vectors for RAG.
- 01RetainCreate metadata, upload exact bytes, and verify length plus SHA-256.
- 02ExtractRun a durable Docling task and retain Markdown plus lossless structure.
- 03IndexCommit the Document once, then build deterministic chunks and vectors.
- 0125 MB raw file fence
- 02300 page fence
- 03immutable source bytes
- 04citation-ready chunks
The original source stays authoritative; extraction, chunking, embeddings, and retrieval remain reproducible projections.
Separate knowledge files from user facts.
Documents have their own resource, lifecycle, and search surface. That keeps a handbook or contract intact while memories remain concise records about people, agents, and state.
- Direct text and uploaded files converge on one canonical DocumentCorpus writer.
- Source keys make replacement and source-family deletion deliberate.
- Exact content remains readable independently of semantic search.
Every slow step has a state.
Uploads move through awaiting upload, uploaded, queued, processing, and terminal states. The task row owns retries; queues and containers only wake work.
- Create, upload, and complete are independently retryable.
- Checksums fence accidental replacement with different bytes.
- Retry, cancellation, timeout, and dead-letter behavior are documented operations.
Return context with its source attached.
Document search returns the matched chunk alongside its owning document. Neighbor expansion can restore surrounding context without pretending the excerpt is the whole source.
- Scope and source_key filters prevent cross-corpus retrieval.
- Document content returns canonical indexed Markdown for inspection.
- Deleting a document removes its source family and linked projections deliberately.
Start with one concrete request.
const source = await fishmem.documents.upload(
{
file: new Blob([bytes], { type: "application/pdf" }),
filename: "product-handbook.pdf",
user_id: "alex",
source_key: "handbook/product.pdf"
},
{ idempotencyKey: "handbook-v4" }
);
const context = await fishmem.documents.search({
query: "What is the release gate?",
user_id: "alex"
});What this surface includes
- PDF, Office, OpenDocument, EPUB, email, image, JSON, XML, YAML, and text inputs.
- Immutable uploads, checksums, extraction artifacts, deterministic chunks, and document search.
- A local direct-text path in Desktop and managed file extraction in Cloud.
Explicit boundary
- Binary upload and Docling extraction are Cloud/self-hosted control-plane capabilities, not a hidden Desktop service.
- Vector visibility is asynchronous after Cloud extraction; exact metadata and content are available first.
- OCR quality depends on source quality and the pinned extraction runtime.
