Documents (attachments)
Bu içerik henüz dilinizde mevcut değil.
Some tools are easier to use with a document than with typed arguments: a receipt, an invoice, a form. A tool can declare
that it works from a document the person posted in the conversation. The assistant reads the document with its vision
model, fills the tool’s ordinary inputSchema from what it read, and the usual path follows (for a write tool: a
preview, then an approval card the person decides on). Your Kit never receives the file: it receives the tool’s
arguments, exactly as for any other call, and must validate them as it would for any input.
Declaring it
Section titled “Declaring it”{ "name": "receipt_create", "access": "write", "audience": "private", "dataClass": "personal", "attachments": { "accept": ["image/jpeg", "image/png", "application/pdf"], "maxFiles": 5, "dataClass": "personal" }}| Field | Rule |
|---|---|
accept |
A non-empty list of distinct types out of image/jpeg, image/png and application/pdf. |
maxFiles |
1 to 5 (several photos of one document set, or a multi-page PDF). |
dataClass |
What the documents contain: standard, personal or sensitive, never above the tool’s own dataClass. |
A tool with attachments must have "audience": "private", and at most 3 tools of a manifest may declare it. The install
consent does not list attachments: whether documents may reach the model is decided separately, per installation and per
tool, in the model data policy.
What reaches the model
Section titled “What reaches the model”A document reaches a model only when all of this holds, checked by Ketvia in code for every run:
- The policy allows it. The tool’s model data policy is on and the document class (
attachments.dataClass) is acknowledged on the Data policy screen.standarddocuments can be allowed by a workspace admin;personalandsensitivedocuments only by a workspace owner, with the usual warning and a separate acknowledgement of the class (documents are usuallypersonal). Until then the assistant answers with a fixed notice that the document was not read, and nothing is sent. - The provider is the EU-pinned one. The same provider and region gate as every model data policy answer: AWS Bedrock inside the EU, never another provider, region or profile.
- The files are the requester’s own. Only files the person who asked uploaded, in the message they asked about and, when that message is a reply, in its thread root, in this conversation, not deleted, of an accepted type. A document someone else posted is never sent, and a document is only read for a private ask.
- It is a one-purpose turn. On the turn that carries the documents only the tools that read documents are offered to the model, so it can read the document and fill the tool, nothing else.
Limits and handling
Section titled “Limits and handling”| Limit | Value |
|---|---|
| Files per request | The tool’s maxFiles, at most 5. |
| Size | 4.5 MB each, 10 MB in total. |
| Up to 10 pages; sent as stored. | |
| Images | Rotated by their EXIF orientation, stripped of all metadata, scaled to at most 2000 pixels on the longer edge and re-encoded as JPEG. |
A file over a limit, or one that cannot be read, is skipped: it is not sent and the model does not see it.
The documents live in memory for the run only: Ketvia does not store, copy, cache or log the bytes or what the model read from them, beyond what the tool call and the approval card already record. The files themselves remain ordinary files of the conversation and keep the workspace’s retention. The audit log records, once per run that sent documents, counts and data classes only: never a file name or content.
Designing the tool
Section titled “Designing the tool”- Make the
inputSchemastrict. The model fills it from the document, so every value must be validated again in your Kit, like any untrusted input; nothing about a document is trusted because a model read it. - A write tool’s preview is where the person sees what was read. Use notices, confirmations and inputs for what is uncertain (an illegible date, a possible duplicate), and never write before the approval.
- Treat anything illegible as missing, not as a guess: leave the argument out and let the preview ask the person.