Preview
Documents and connectors
Files your agent can search next to its memories: contracts, manuals, policies. They come from an upload or from a connection to a bucket, Google Drive or Dropbox.
In preview, on Korely Cloud only. Documents and connectors are turned on account by account. On any other account these routes answer as routes that do not exist, and the dashboard has no Documents or Connections page. To try them, write to [email protected]. A Self-hosted install has neither. They are not in the API reference yet.
What a document is
A document is a PDF, a Word file (.docx), a Markdown file or a plain text. Korely cuts its text into pieces of a few hundred words and keeps a
vector for each one, so a question like "how long is the warranty" finds a passage that says "covered for twenty four months". A result names the file, the
page and the headings it comes from.
A document is not a memory. No fact is extracted from it, no language model reads it (only the embedding model computes the vectors), and it never closes a fact. The file itself is not kept: Korely keeps its name, size, type, SHA-256, your metadata and the text in pieces.
Search it
POST /v1/memories/search searches the documents when you ask for them with types: ["documents"] for the pieces only, or
["memories", "documents"] for both. Without types it finds memories only, as before. A search always returns the nearest pieces,
whatever the question, so look at the score or set document_min_score. The context block does not carry documents yet.
Add and manage files
POST /v1/documentstakes a file or a text, with anexternal_idof your own if you want to address it by that id.GET,PATCH,PUTandDELETE /v1/documents/{id}read a document, change its metadata, send a new file for it, or delete it. A new file takes the old one's place once it is read, and aPATCHof the metadata made meanwhile is kept.POST /v1/documents/batchtakes up to 20 files, andDELETE /v1/documentsup to 100 ids, each with its own answer.- The dashboard's Documents page does the same one file at a time, and asks a question of the documents. A change to a document of an archived project answers
409 project_archived.
409 same_file_elsewhere names a document you can address. Of two uploads of one new external_id sent at once, the second is decided again as if it came after the first.
The SDKs have no document methods yet: use the API. Over MCP, korely_search takes types.
Limits
A file weighs at most 20 MiB, with at most 1,000 pages, 4,000,000 characters and 20,000 pieces. There is no OCR: a scanned PDF fails with
scanned, and a scanned page among pages of text is left out and named in pages_without_text. Each file is read in a separate
process with limits on time and memory. The dashboard's Playground shows at most 10 results per search, documents included (the API's limit is 15 by default, up to 50). More in Known limits.
Connectors
A connection keeps the files of one place in your documents, in one project, and Korely only reads. Set one up on the Connections page or with the
/admin/connections routes.
| Source | How it works | What was tested |
|---|---|---|
| A bucket (Amazon S3, Cloudflare R2, MinIO) | You give the endpoint, the bucket and read-only credentials, and can limit it to a prefix. Korely lists it every 15 minutes and reads a file again when it changes. | MinIO, a store written for the tests, and once a real Cloudflare R2 bucket with two small files. Not Amazon S3. Not tried on R2: large files, files in parts, a bucket with a jurisdiction. |
| Google Drive | You connect your Google account, then pick the files in Google's Picker, one by one. Korely sees only the files you pick. Folders cannot be picked. | Only against a stand-in for Google. No real Google account has been called yet. |
| Dropbox | You connect your Dropbox account. Korely reads one folder, the one Dropbox makes for it in your Apps folder, with its subfolders. A file you put there comes in at the next sync. | Only against a stand-in for Dropbox. No real Dropbox account has been called yet. |
Deleting a connection answers 202 with the status disconnecting. The worker then deletes the documents it imported, which took a few seconds in the test against R2; a file you uploaded by hand is never one of them. Files from a connection have no end user.
- A refused
authorizations/finishsaysconsent_waits(a retry may work) andreconnects. - The Google file chooser's token can be asked 10 times an hour per account, then
429 picker_tokens_spentwithRetry-After. - A connection paused by its source shows
documents_deleted_after: 30 days after the pause.
Deleting a project without erasing it moves its documents into Default. A replacement on its way is cancelled when its bytes collide there: send that file again.