Skip to content
AgentIDDocs

Type at least two characters to search titles, headings and content.

↑ ↓ to navigate↵ to open
AgentID Docs

Data protection

Attachments and files

How AgentID extracts text from documents, masks it with the same placeholders as the prompt, and what happens when a file cannot be read.

AgentID protects files by finding personal data in them and making sure the AI only receives a protected version: the same file masked in its own format, a masked text copy, or the original when nothing needed masking.

Native delivery

FileWhat the AI receives
DOCX, XLSX, PPTXThe same file with personal data replaced by placeholders, formatting kept. Headers, footers, comments, tracked changes, notes, charts, document properties and link targets are masked too. A sheet named after a person is renamed, together with every formula, chart and link that refers to it. Embedded images that hold a value are covered the same way as images below. Embedded objects AgentID cannot check (OLE objects such as a packaged file or a legacy Excel sheet) are removed from DOCX and PPTX files
DOC (Word 97-2003)With personal data found: a masked text copy (the binary document is never re-created). Without: the original
DOCM, XLSM, PPTMWith personal data found: the masked document without its macros, as DOCX, XLSX or PPTX, because AgentID cannot check macro code for personal data. Without: the original
Markdown, TXT, CSV, JSON, HTMLThe same file, masked, in its original encoding
Images (PNG, JPEG, WebP, GIF, TIFF)OCR runs first. With personal data found: the same image with each value covered by a white field labelled with its placeholder, such as <PERSON_NAME_1>. Image metadata (EXIF) is removed. Without: the original image
BMP imagesOCR runs first. With personal data found: a masked Markdown copy of the text (AgentID cannot rewrite BMP files). Without: the original image
Scanned PDFOCR, then the same treatment as images: a PDF of the redacted pages. Without personal data: the original PDF
PDF with a text layerWith personal data found: a masked Markdown copy, page by page. Without: the original PDF
Any file with nothing to maskThe original
A file that cannot be checkedYour failure mode: fail-open sends it unscanned and logs it, fail-closed blocks the message

Before a masked file is delivered, AgentID re-reads the file and verifies that none of the detected original values is left; redacted images are read again by OCR. If that verification fails (for example a sheet name Excel would not accept, an image where OCR still reads a value, or an embedded object in a spreadsheet), the file is delivered as masked text instead. Filenames are masked as well, using the bracket form such as Contract [PERSON_NAME_1].docx.

In Shadow Mode nothing changes: files go to the AI as they are and the activity log records what would have been delivered with enforcement.

Restoring values in files the AI creates

The browser extension restores your original values in documents you download from a protected AI app (DOCX, XLSX, PPTX, Markdown, TXT, CSV, JSON, HTML). It uses only the values of the conversation the download came from, stored encrypted on your device. The downloaded file stays as name.masked.docx and a restored copy is saved next to it. Administrators can turn this off with the managed setting downloadRestoration.

What is logged

Every file gets an entry in the activity log: the masked filename, type and size, SHA-256 of the original and of what was delivered, the delivery decision and its reason, detected types, OCR use, verification result and timings. Restored and observed output files are logged the same way. The original file is not stored.

Supported formats

FormatNotes
PDFText layer first; scanned pages need OCR
DOC (Word 97-2003)Main text, headers, footnotes, comments, text boxes and document properties. Encrypted or damaged files cannot be read
DOCX, DOCMDocument text; embedded images can use OCR
XLSX, XLSMVisible and hidden sheets, cell values, formulas and cached results, comments, named ranges and metadata. Macros are detected but never executed
PPTX, PPTMSlide text
Markdown (.md, .markdown), TXT, CSVRead as UTF-8 text
Images (PNG, JPEG, WebP, GIF, BMP, TIFF)Need OCR

AgentID decides a file's type from its content, not its name or the browser's MIME type: a .txt file that is really a DOCX is checked as DOCX, and a renamed PDF as PDF. When the content does not match the name, the activity log shows File type differs from its name.

Limits: up to 4 files per request. A direct Guard API request is limited to 4 MiB in total, and inline text to 500,000 characters per file. The browser extension and the Claude plugin upload larger documents through a private, one-time staging upload: up to 16 MiB per file and 32 MiB per request. Staged files are deleted right after their text is extracted.

How each integration handles files

IntegrationBehaviour
Browser extensionIntercepts supported uploads on validated apps and on recognized AI tools. With native delivery it attaches the masked file in its own format (or the original when nothing needed masking); otherwise a text file is rebuilt masked in its own layout and other files become a masked text copy (name.masked.txt). In Active Guard with masking on, a file in which AgentID found personal data is not uploaded in its original form. Files an AI tool takes directly from Google Drive, OneDrive, SharePoint, Dropbox or Box never pass through the browser: they are logged as From cloud storage; not checked by AgentID
Claude pluginReplaces supported documents (PDF, DOCX, XLSX, XLSM, PPTX, MD, TXT, CSV) with private masked text copies before a tool reads them
Claude Desktop companion (Windows)Protects files added with Claude's Add files or photos; files dragged into the window are not protected
Claude Desktop companion (macOS)0.4.0 checks files dropped on Claude's window, pasted with Cmd+V or chosen with Upload or add files, per file as the browser extension does: unchanged when nothing needs masking, otherwise masked in its own format or as a masked text copy. Files added another way are not checked. See the companion's limits
Guard API and SDKsSend files in the attachments array; Guard returns transformed_attachments, and attachment_results when the request opts in with attachment_delivery

Guard API attachments

Send each file as extracted text or as base64 bytes:

{
  "system_id": "00000000-0000-0000-0000-000000000000",
  "input": "Summarize the attached contract.",
  "attachments": [
    {
      "filename": "contract.pdf",
      "mime_type": "application/pdf",
      "content_base64": "JVBERi0xLjcK..."
    }
  ]
}

When masking is on and extraction succeeds, the response contains the protected text per file:

{
  "allowed": true,
  "transformed_input": "Summarize the attached contract.",
  "transformed_attachments": [
    {
      "filename": "contract.pdf",
      "mime_type": "application/pdf",
      "transformed_text": "Agreement between <ORGANIZATION_NAME_1> and <PERSON_NAME_1> ...",
      "source": "base64_file"
    }
  ]
}

Send transformed_text to the model instead of the file. Prompt and attachments share one placeholder set, so a name in the prompt and in the file gets the same placeholder.

With "attachment_delivery": { "version": 1, "native": true } in the request, each file also gets a decision in attachment_results (original, masked_native, masked_text, blocked or unscanned). A masked_native result carries the masked file as base64, or as a signed URL valid for two minutes for larger files; check its sha256 before use. See the Guard API reference.

When a file cannot be read

  • If a file yields no text (for example a scanned PDF without OCR), the item reports an extraction error or requires_ocr: true instead of pretending the file was protected.
  • If Block Personal Information or Block Secrets & API Keys is on, such a request is blocked with reason attachment_requires_secure_preprocessing.
  • AgentID never forwards files to a third-party OCR service; only AgentID's own OCR is used.

Content policies

Extracted text is also checked against your content policies.