# Media Sharing: see what your agents built

> Upload a standalone screenshot or screen recording to Argos from the CLI, SDK, REST API, or MCP and get a share link with ready-to-paste Markdown. Media staged on a branch lands on the pull request automatically, in a single managed comment.

Canonical: https://argos-ci.com/media-sharing
Documentation: https://argos-ci.com/docs/learn/media

**Media sharing** is standalone image and video upload for Argos: no build, no
test run, no baseline, just a file with a stable share URL and Markdown ready
to paste. It
exists because GitHub has no public API for comment attachments: dragging an
image into a pull request needs a signed-in browser session, which an agent or
a CI job does not have. Media sharing is how a process working from a terminal
puts a screenshot or a demo recording in front of a reviewer.

It is not visual testing: nothing is compared to a baseline and nothing gates
a build. It complements
[visual testing](https://argos-ci.com/diff): builds catch the changes
nobody intended, media shows the result someone did intend.

A live example, public and real:
https://github.com/argos-ci/snkr-shop/pull/5 is a pull request whose branch
had two before/after pairs staged; Argos posted them in the single managed
comment when the pull request opened.
https://app.argos-ci.com/m/mp21qmkhpekfx1v4ot7r is the share page for one of
them, opening on the before/after compare view.

## How it works

- A **media** is an identity (what the picture is of), and every upload is a
  **version** of it. Re-uploading the same name adds a version under the same
  media: the share URL never changes, Markdown already pasted in a pull
  request shows the newest upload, and the version a reviewer commented on
  survives in the history. Re-uploading identical bytes adds no version and
  costs nothing.
- Attach media to a **branch** (`--branch`, staged) or a **pull request**
  (`--pr`, published). Staged media is shareable from the moment it is
  registered; when a pull request opens for that branch, Argos publishes
  everything staged there and posts a **single managed comment** listing it,
  edited in place on every change.
- **Before/after pairs**: files named `name-before.png` and `name-after.png`
  (or uploaded with `--state`) share one identity: one comment row, one share
  page comparing both sides with synced pan and zoom.
- **Pinned feedback**: reviewers pin comments to a point on the image. Pins
  store normalized coordinates and the media version they were written on, so
  an agent reads the spot from the CLI, fixes it, replies, and resolves the
  thread.
- The CLI compresses PNG and JPEG to WebP client-side before upload (a 252 KB
  screenshot typically travels at a tenth of the size); `--no-compress` opts
  out. Argos never rewrites the stored file server-side, so a media is usable
  the moment the upload finishes.
- A **video** embeds as a thumbnail linked to the share page, the only form
  GitHub renders. The thumbnail is a poster frame derived from the video itself
  and available immediately.

## Quickstart

```bash
npm i --save-dev @argos-ci/cli
ARGOS_TOKEN=<project-token> npx argos media upload after.png --branch my-branch
```

The command prints the share URL and the exact Markdown to paste. Reading
feedback back:

```bash
argos media list --branch my-branch
argos media comment list <media-id>
argos media comment resolve <media-id> <comment-id>
```

## For agents

- Every media endpoint is an MCP tool on https://mcp.argos-ci.com, under the
  `media:read` and `media:write` OAuth scopes (comments under `comments:read`
  and `comments:write`).
- The `argos-upload` agent skill teaches a coding agent when to attach media,
  how to stage it on the working branch, and how to embed it so it renders.
  Install: `npx skills add https://argos-ci.com`
- REST surface: `POST /media` (+ `/finalize`), `GET/PATCH/DELETE /media/{id}`,
  `GET /media/{id}/versions`, `GET /projects/{owner}/{project}/media`, and the
  full comment surface under `/media/{id}/comments/…`. See
  https://argos-ci.com/docs/api-reference

## Formats, limits, visibility, billing

- Images: PNG, JPEG, WebP, AVIF, GIF. Videos: MP4, WebM, MOV. SVG is refused
  (it can carry scripts). Bytes are verified at finalize.
- Max file size: 50 MB (Hobby), 500 MB (Pro).
- Visibility governs the share page: `team` (Pro default, sign-in with project
  access required) or `public` (anyone with the URL; the only option on Hobby).
  Links carry unguessable tokens and are never indexed. The file bytes
  themselves are always reachable at an unguessable CDN URL whatever the
  visibility, as GitHub's server-side image proxy requires. Don't upload what
  must never be reachable by URL.
- Retention, per version: 30 days (Hobby), 1 year (Pro).
- Billing draws on the existing screenshot allowance: an image is 1 screenshot
  unit, a video is 25. See https://argos-ci.com/pricing

## Learn more

- [Media sharing overview](https://argos-ci.com/docs/learn/media)
- [Upload media from the CLI, SDK, API, or an agent](https://argos-ci.com/docs/learn/media/standalone-media-upload)
- [Share links, retention and limits](https://argos-ci.com/docs/learn/media/share-links-retention-and-limits)
- [Argos for AI agents](https://argos-ci.com/ai-agents)

## Frequently asked questions

### How do AI agents attach screenshots to a GitHub pull request?

GitHub has no public API for comment attachments. Dragging an image into a pull request needs a signed-in browser session, which an agent or a CI job doesn't have. With Argos, `argos media upload --branch` stages the file from the terminal, and when a pull request opens for that branch, Argos posts it there in a managed comment, automatically. For an issue or a chat message, paste the Markdown line the command prints.

### Is media sharing the same as visual testing?

No. A media upload is compared to no baseline and gates no build. It is a file with a stable link. It complements Argos visual testing: builds catch the changes nobody intended, media shows the result someone did intend, and both land on the same pull request.

### What file formats and sizes does Argos media support?

Images: PNG, JPEG, WebP, AVIF, and GIF. Videos: MP4, WebM, and MOV. SVG is deliberately excluded because it can carry scripts. A single file can be up to 50 MB on Hobby and 500 MB on Pro, and Argos verifies the actual bytes at upload, so a file that isn't what it claims to be is rejected.

### How much does a media upload cost?

Uploads draw on the screenshot allowance you already have, with no second quota. An image counts as 1 screenshot unit, a video as 25. Re-uploading a file whose bytes haven't changed costs nothing, and the usage detail breaks media out so recordings never read as unexplained screenshots.

### Who can open a media share link?

Visibility is per media: team (anyone signed in with access to the project, the default on Pro) or public (anyone holding the URL, the only option on Hobby). Links carry an unguessable token and share pages are never indexed. The file's bytes are always reachable at an unguessable CDN URL whatever the visibility. That is what lets GitHub's server-side image proxy render the embed, so don't upload what must never be reachable by URL.

### How does an agent read the feedback left on a screenshot?

A reviewer pins a comment to a point on the image, and the pin is stored as normalized coordinates with the exact version it was written on. The agent runs `argos media list --branch` to find its uploads, `argos media comment list` to read the open threads, then replies and resolves each one from the same CLI. Even a process that cannot see pixels can act on the feedback.
