> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erdo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Message attachments

> Send files, folders and ZIP archives with a message from the CLI, REST API or MCP, the way you would drag them into the chat box.

A message can carry files. The agent receives each one as a `file:<id>` handle and reads it with the normal file tools, so you do not paste contents or ask the agent to fetch anything. This is the same path the chat box uses when you drop files in.

## CLI

```bash theme={null}
erdo agent send <thread> "Can you build the lead engine for 619 Brickell?" \
  --attach ./materials.zip --attach brochure.pdf

erdo agent send <thread> "Use these renders" --attach brochure.pdf factsheet.pdf ./renders/*
erdo agent send <thread> "Here is the whole pack" --attach ./pack
erdo agent ask "What is in these?" --attach ./report.pdf
```

`--attach` takes one or more paths and can be repeated. A path can be a file, a glob your shell expands, a directory, or a ZIP. A directory attaches the files directly inside it; hidden files and `__MACOSX` are skipped. A message carries at most 10 files, the same as the chat box.

Every file uploads before the message is sent. If a path is missing, unreadable or the count is over 10, the command stops and nothing is sent. Put the message text before `--attach`, because the option reads every following path. The CLI prints `attached <name> (file:<id>)` for each file and never prints a signed URL. Files above 16 MiB go straight to storage; each file may be up to 100 MiB.

`erdo threads create` opens an empty conversation and sends no message, so it has no attachment option. Use `erdo agent ask` to start a thread with attachments, or create the thread and then `erdo agent send` into it.

## REST and MCP

Upload each file first with `POST /v1/files` (or `POST /v1/files/uploads` and its completion call for files above roughly 20 MiB), then pass the returned ids:

```json theme={null}
POST /v1/threads/{threadID}/send
{
  "message": "Can you build the lead engine for 619 Brickell?",
  "file_ids": ["<file id>", "file:<file id>"]
}
```

`file_ids` accepts bare ids or `file:<id>` handles, up to 10. A message may have only files and no text. `POST /v1/ask` and the `erdo_ask_data_question` tool take the same field. A saved ask (`saved_ask_id`) cannot be combined with `file_ids`; the request is refused. The MCP tool `erdo_send_message` takes `file_ids` too; upload with `erdo_upload_file` or `erdo_begin_file_upload` first. The server reads each file's name, type and size from the file service and checks your access to it. Another organization's file, or one you cannot read, is refused before the message is saved.

Attached files show on the message in the web app and are listed in the thread history.

## ZIP archives

A ZIP is not opaque to the agent, whether it arrives as a message attachment, an organization file or a download. The agent lists the archive's entries with `read_file`, and `extract_archive` turns entries (all, or the paths it picks) into separate organization files, so fonts, PDFs, images and documents open with the usual tools. Nobody has to unzip anything first.

Archives are checked before anything is read:

* Entries with absolute paths, `..` segments, links, passwords or control characters are skipped, never extracted.
* A single file may be up to 100 MiB, an archive up to 250 MiB uncompressed in total, and only the first 1,000 entries are examined. The total is enforced on the bytes actually read, not on sizes the archive declares. An archive can be listed and extracted up to the 100 MiB file upload limit. A read-only question (the default for `agent ask`) can list a ZIP but not extract it; add `--allow-writes` to extract. An entry that compresses implausibly well is refused as a likely zip bomb, and an entry whose real size differs from its declared size is refused.
* One call extracts at most 200 entries. A nested archive is extracted as a file but not opened automatically.
* Everything skipped is listed with its reason, and the agent tells you about it.

Extracted files are named from their path with `__` between folders, have exactly the same access as the archive (a private archive yields private files), and are reused if the same entry is extracted again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.