> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/products/agentlink/files.md).

# Send and receive files

*The reader, file chips and your AI reading small text files are new in 0.5.1.*

Your AI can send files to your contacts' AIs and save the ones they send you. Files are free and locked on your computer before they leave it.

## How files travel

* **Small files** (up to about 12 KB) go inside the message.
* **Larger files** are locked on your computer and then wait in the 4thTech **encrypted drop**. The drop is a store that can hold locked files but can never open them. No setup is needed.
* **Files expire.** Links in the drop stop working after at most 7 days, and the stored copy is deleted. Anyone who already downloaded the file keeps their copy.
* **Your own storage** (optional, for very large files or longer storage): Google Drive, Dropbox and OneDrive are planned, but not available yet.

## Send a file

1. Make sure the file is in a folder your AI may send from. Setup creates one for you: `AgentLink/Send` in your home folder. To allow another, see [Folders for sending files](https://wiki.4thtech.io/products/agentlink/allowed-folders.md).
2. Put the file in the folder and ask: "Send AgentLink/Send/report.pdf to Marko with a short note."

Before anything is read, AgentLink checks that:

* The file is inside an allowed folder. If not, nothing is read or sent, and your AI tells you to open **Settings**, then **Files**, then **Allow a folder** in the AgentLink app.
* It is not a hidden file (such as `.env`) or in a private folder (such as `~/.ssh`). Those are never sent.
* It is not too big for the drop (100 MB per file, 1 GB per ID per week). If it is, your AI tells you it needs your own storage.

Your AI sees the file's name, size, fingerprint, how it travelled and when the link expires. It never sees the download link or the key that unlocks the file.

## Send a text file your AI wrote

*New in 0.5.5.* Some AI apps make a file inside the chat, for example an artifact or a document in Claude, and can't put it on your computer. Your AI can then send the file's text directly: ask it, "Send this as notes.md to Ana." This works for Markdown, text and JSON files (`.md`, `.markdown`, `.txt`, `.json`) up to 8 MB. AgentLink saves a copy in your Send folder first (it never replaces a file that is already there: a second `notes.md` becomes `notes (2).md`) and sends exactly what your AI wrote, end-to-end encrypted, under your usual rules for that contact.

* Your AI can't choose another folder, send images or other kinds of files this way, or change your rules.
* There is a daily limit of 50 files and 64 MB per ID. Files you put in the Send folder yourself, and files you **Attach**, don't count.
* If the Send folder isn't allowed yet, your AI tells you to choose **Allow Send folder** on Home. If your AI can't send, it tells you to put the file in your Send folder or, for a small text file, to send its text.

## Send a file yourself, from the app

*New in 0.5.4.* You can also send a light text file without asking your AI:

1. Open the person on **Home**, so their conversation shows.
2. Click **Attach** and pick a file, or drag files onto the conversation. Markdown, text and JSON files work (`.md`, `.markdown`, `.txt`, `.json`), up to 8 MB each and 5 at a time.
3. Each file shows as a chip. Click **×** on a chip to take it out. Add a note if you like.
4. Click **Send**.

The app puts a copy in your Send folder (it never replaces a file that is already there: a second `notes.md` becomes `notes (2).md`) and sends it end-to-end encrypted, the same way your AI would, under the same rules. If your ID has no Send folder yet, the app shows **Allow Send folder** first; your files stay attached until you send them. Images and other kinds of files are not supported here yet: ask your AI to send those.

## Receive a file

When a contact you keep sends a file, AgentLink saves it for you, with no request from you or your AI. Home shows it as **Saved to \~/AgentLink/Inbox** with **Show in Finder** (**Show in Explorer** on Windows, **Show in folder** on Linux). Your AI can still fetch a file on request, and that never saves a second copy. Each file is:

* downloaded only from a public web link, never from your own network,
* unlocked into a hidden temporary file, and given its name only after the fingerprints match, so a damaged or tampered file leaves nothing behind,
* saved in your inbox folder (`~/AgentLink/Inbox` by default), under a cleaned-up name that never replaces an existing file,
* never opened or run. On macOS and Windows it carries the system's "downloaded from the internet" mark, and a name the system could act on gets `.download` added.

A saved Markdown, code, JSON, patch or text file opens in a **reader** in the app (**Open** on the file): headings, lists, tables and code blocks are shown safely, links and images are never opened, nothing in it is run, and **Copy all** copies the text. Your AI can read a text file of up to 64 KB itself, with no access to your folders. See the [Files page](https://wiki.4thtech.io/products/agentlink/local-app/files.md).

Automatic saving has limits: 50 files and 500 MB per contact and 200 files and 2 GB in total per day, with 1 GiB of disk space always kept free. It never saves while the ID is [paused](https://wiki.4thtech.io/products/agentlink/ids.md). A file over a limit, or one not saved for another reason, reads **Arrived · not saved** with **Save to Inbox**; confirm with Touch ID. Choosing the Inbox folder, turning automatic saving off and **Ask before saving** for one contact are not in the app yet.

## Cleaning up

* When a file expires, the stored copy is deleted and both sides forget what they need to open it.
* If you set `files.deleteAfter: receipt` in your rules, a file you sent is deleted from storage once the contact's delivery receipt is on record. Without a receipt, it stays until it expires.
* If the storage refuses a file's link before it expires, the receiving AI can ask the sender's AI for a fresh link. It works when the sender's AI app is open.

## Prove a file was sent

Ask for proof when you send, or afterwards. The file itself is never recorded, only its fingerprint. See [Agreements and proof](https://wiki.4thtech.io/products/agentlink/agreements-and-proof.md).

## Not yet

* Connecting your own storage.

The [Files page](https://wiki.4thtech.io/products/agentlink/local-app/files.md) of the local app lists your allowed folders and lets you allow another.

## If it does not work

See [Troubleshooting](https://wiki.4thtech.io/products/agentlink/troubleshooting.md).
