---
name: agentdrop
description: Upload and share agent artifacts (images, video, HTML, PDF, Markdown, files) via Agentdrop. Use when uploading screenshots, mockups, or files, or when you need a shareable link for an artifact.
---

# Agentdrop

**Base URL:** https://drop.l92-labs.com

## Credentials

Read `~/.agentdrop/token.json`:

```json
{ "device_token": "dev_…", "base_url": "https://drop.l92-labs.com", "device_id": "dvc_…" }
```

If missing:

```bash
agentdrop init https://drop.l92-labs.com
# or:
mkdir -p ~/.agentdrop && chmod 700 ~/.agentdrop
curl -sX POST "https://drop.l92-labs.com/api/v1/device/init" \
  | jq --arg base "https://drop.l92-labs.com" '{device_token: .device_token, device_id: .device_id, base_url: $base}' \
  > ~/.agentdrop/token.json
chmod 600 ~/.agentdrop/token.json
```

CLI install (once per machine): symlink `packages/cli/bin/agentdrop.js` to `~/.local/bin/agentdrop`, or from the repo run `pnpm cli:link`.

## Upload (prefer CLI — keeps bytes out of context)

```bash
agentdrop upload /path/to/file.png --title "optional"
agentdrop upload /path/to/file.png --private
agentdrop upload /path/to/file.png --secret
agentdrop upload /path/to/notes.md --password "share-secret" --expires 24h
```

Or curl:

```bash
TOKEN=$(jq -r .device_token ~/.agentdrop/token.json)
curl -sX POST "https://drop.l92-labs.com/api/v1/artifacts" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@/path/to/file.png"
```

Response includes `url` (viewer) and `raw_url`.

### Markdown + local images (important)

Do **not** hand-edit image paths before upload. Prefer:

```bash
agentdrop upload ./report.md
```

The CLI:

1. Finds `![alt](./shot.png)` / relative image paths that exist on disk next to the `.md`
2. Uploads each image (same visibility / expiry; **not** the markdown password — so images load in the viewer after unlock)
3. Rewrites those refs to hosted `raw_url` values
4. Uploads the rewritten markdown

Then share the markdown `url`. The viewer renders Markdown (headings, lists, code, links, images).

If you must use curl/MCP for markdown: upload images first, put their `raw_url` into the markdown, then upload the `.md`.

## Password + expiry

- `--password` / form field `password`: gate on `/a/:id` (owners skip; unlock cookie lasts 24h)
- `--expires 24h|7d` (claimed devices): shorter TTL than the default 30d

## Secret links

```bash
agentdrop upload ./shot.png --secret
agentdrop share rotate art_…
agentdrop share revoke art_…   # becomes private; file kept
```

Rotate mints a new `?s=` token (old links die). Revoke clears the secret link.

## Change expiry after upload

```bash
agentdrop expires art_… 7d
agentdrop expires art_… now
```

## Plans (free vs paid)

- **Free** (default, including unclaimed devices): **100MB**/file, **2GB** account storage
- **Paid**: **1GB**/file, **20GB** account storage
- Paid is set via `accounts.plan` or `PAID_EMAILS` (Access login auto-promote). No Stripe yet.
- `agentdrop status` returns `plan` + `limits`

## Rate limits

- Unclaimed: 5/hour → complete Turnstile at `{base}/verify/{device_id}` → 30/day
- Claimed (linked account): 200/day; private / secret / password / custom expiry allowed

## Link device to account

```bash
agentdrop link
```

Open `verify_url` in a browser (Cloudflare Access) and approve. Dashboard includes **Log out** (Access logout).

## MCP (optional)

`POST https://drop.l92-labs.com/mcp` with header `Authorization: Bearer dev_…`

Tools: `upload_artifact` (`content_base64`, optional `password` / `expires`), `list_artifacts`, `delete_artifact`, `rotate_share`, `revoke_share`, `set_expiry`, `device_status`, `link_device`.

For markdown with local images, use the **CLI** (`agentdrop upload report.md`) so assets are rewritten automatically.
