Skip to main content
Glama
README.md
# AgentCut

> Formerly **VidRec**. If you built an older version: recordings now live in `~/Movies/AgentCut`, the MCP server is `agentcut-mcp` and tools are `agentcut_*`. Re-run `create-signing-identity.command`, rebuild, and grant Screen Recording + Accessibility once more.

**A native macOS screen recorder built for AI agents.**

[![AgentCut MCP server](https://glama.ai/mcp/servers/AmirS2411/agentcut/badges/score.svg)](https://glama.ai/mcp/servers/AmirS2411/agentcut)

Most screen recorders assume a person is at the mouse: you press record, do the task, then spend time editing zooms, captions and highlights by hand. AgentCut flips that. An AI agent (Claude, or anything that speaks MCP or HTTP) starts the recording, narrates each step while it works, tells the camera where to focus, and gets back two finished outputs from one run:

1. **A polished video**: auto-zoom on every action, click ripples, numbered step captions, keystroke pills, an intro card, a device mockup and a branded background.
2. **A written step-by-step guide**: one annotated screenshot per step, as `guide.md` and a self-contained `guide.html`.

People can use it the same way from the app window, the menu bar or two global shortcuts.

![AgentCut](docs/cover.png)

**Demo video:** [docs/demo.mp4](docs/demo.mp4) (41 s). An agent researches a topic on Google Trends while AgentCut turns the take into a finished video.

What AgentCut's own renderer produced from that take (auto-zoom shots, numbered step captions, click markers, camera focus):

![AgentCut render](docs/live-render.jpg)

## Why it is different

| | Built-in recorders (macOS Screenshot, Windows Snipping Tool) | Paid recorders (CleanShot X and others) | AgentCut |
|---|---|---|---|
| Who runs it | A person | A person (some expose URL commands to start or stop) | An agent, over MCP or a local HTTP API, or a person |
| Zoom and focus | None, edit by hand | Editor tools, applied by hand | Automatic around clicks and typing, plus `agentcut_focus` on demand |
| Step captions | None | Added by hand | Generated from each step the agent narrates, or from the clicked control's accessibility label |
| Written guide | None | None | `guide.md` + `guide.html` with annotated screenshots |
| Re-render | Re-record | Re-edit | Re-render the same take with another template, frame or aspect ratio |

## Features

- **Sources**: full display, a single window (keeps recording when covered), an app, a region (API) or a USB iPhone/iPad.
- **Browser-only capture**: for Chrome and other browsers, record just the web page without tabs and toolbar.
- **Auto camera**: zoom windows around clicks and typing, dead-zone cursor follow, critically damped springs.
- **Click effects**: ripples on real clicks; clicked controls are named through Accessibility ("Click the “Save” button").
- **Step captions and numbers**, keystroke pills, intro card, mockups (window, browser, laptop, iPhone, iPad), gradient backgrounds, rounded corners and shadow.
- **10 built-in templates**: `onboarding`, `training`, `troubleshooting`, `feature-demo`, `laptop-showcase`, `bug-report`, `mobile-app`, `mobile-showcase`, `social-vertical` (9:16), `square-tutorial` (1:1). Custom templates are plain JSON.
- **Privacy**: typed text is never logged, only the fact that typing happened and which shortcuts were pressed. AgentCut's own windows are hidden from recordings.

## Install

Requirements: macOS 15 or later. Apple Silicon or Intel. Windows is not supported yet (see [docs/WINDOWS-PORT.md](docs/WINDOWS-PORT.md)).

### Download (recommended)

1. Download the latest **AgentCut-x.y.z.dmg** from [Releases](https://github.com/AmirS2411/agentcut/releases/latest).
2. Open the DMG and drag **AgentCut** onto **Applications**.
3. Open AgentCut from Applications. Builds are not notarized yet, so macOS blocks the first open. Go to **System Settings > Privacy & Security**, scroll down, click **Open Anyway** and confirm. You only do this once per version.
4. Grant **Screen Recording** and **Accessibility** when asked, then quit and reopen AgentCut once.

If Claude reports that `agentcut-mcp` cannot be opened, clear the download flag once:

```bash
xattr -dr com.apple.quarantine /Applications/AgentCut.app
```

### Build from source

Needs Xcode or the Command Line Tools (`xcode-select --install`).

```bash
git clone https://github.com/AmirS2411/agentcut.git
cd agentcut
./build.sh                 # builds, signs and installs ~/Applications/AgentCut.app
open ~/Applications/AgentCut.app
```

Grant **Screen Recording** and **Accessibility** in System Settings > Privacy & Security, then reopen the app once.

Optional: run `./create-signing-identity.command` once so every rebuild keeps the same signature and macOS stops asking for permissions again. `./dev-watch.command` rebuilds automatically on every source change.

### Make a DMG

```bash
AGENTCUT_INSTALL=0 ./build.sh     # add AGENTCUT_ARCHS=universal for arm64 + x86_64
./scripts/make-dmg.sh             # build/AgentCut-<version>.dmg + .sha256
```

Pushing a tag such as `v0.1.1` runs `.github/workflows/release.yml`, which builds a universal DMG on a macOS runner and publishes it as a GitHub Release. Pull requests that touch the build produce the DMG as a workflow artifact. Notarization hooks are in place (`AGENTCUT_SIGN_ID` with a Developer ID, `AGENTCUT_NOTARY_PROFILE`) and stay off until a Developer ID exists.

## Connect an agent

The MCP bridge lives inside the app. Use `/Applications/AgentCut.app` if you installed the DMG, `~/Applications/AgentCut.app` if you built from source.

**Claude Code**

```bash
claude mcp add agentcut -s user -- /Applications/AgentCut.app/Contents/MacOS/agentcut-mcp
```

**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{ "mcpServers": { "agentcut": { "command": "/Applications/AgentCut.app/Contents/MacOS/agentcut-mcp" } } }
```

An optional agent skill lives in [`skills/agentcut/SKILL.md`](skills/agentcut/SKILL.md).

### MCP tools

| Tool | What it does |
|---|---|
| `agentcut_status` | App state and permissions |
| `agentcut_list_sources` | Displays, windows, apps and devices |
| `agentcut_list_templates` | Built-in and custom templates |
| `agentcut_start_recording` | Start with a source, template, mode (`video`, `guide`, `both`) and title |
| `agentcut_add_step` | Narrate the next action; optional `x`/`y` (0 to 1) to point the camera |
| `agentcut_add_marker` | Drop a labelled marker on the timeline |
| `agentcut_focus` | Hold the camera on a point for a few seconds |
| `agentcut_stop_recording` | Stop; returns steps, screenshots and guide paths, and starts the render |
| `agentcut_render` | Render or re-render with another template, mockup or aspect ratio |
| `agentcut_export_guide` | Write `guide.md` and `guide.html` |
| `agentcut_list_projects`, `agentcut_get_project` | Browse takes and render status |
| `agentcut_request_permissions` | Trigger the macOS permission prompts |

Typical agent flow: `list_sources` → `start_recording` → (work, calling `add_step` before each action) → `stop_recording` → `render`.

## Use it yourself

- Main window or menu bar: pick a source, a mode (Video, Step-by-step guide, Video + guide), a template and audio, then Start.
- `⌃⌥⌘R` starts and stops from anywhere. `⌃⌥⌘S` adds a step for whatever is under the cursor.
- A floating HUD (hidden from the recording) shows the time, step count, Step and Stop.
- Recordings tab: re-render any take with another template, frame or aspect ratio, play the raw take or export the guide.

## Local HTTP API

`127.0.0.1:7878`, localhost only. Every call needs the header `X-AgentCut-Token`; the token is in `~/Library/Application Support/AgentCut/api-token`. JSON in snake_case.

```
GET  /health    GET /status    GET /sources?kind=window    GET /templates
GET  /projects  GET /projects/<id>
POST /record/start  {source:{kind,id,rect}, template, mode, title, system_audio, microphone, auto_render, countdown}
POST /record/stop
POST /step    {title, detail, x, y}
POST /marker  {label}
POST /focus   {x, y, scale, duration}
POST /render  {project_id, template, mockup, aspect, wait}
POST /guide   {project_id}
POST /permissions/request
```

## Custom templates

Drop JSON into `~/Library/Application Support/AgentCut/Templates/`. Start from a built-in with `base` and override any field (see [`examples/acme-training.json`](examples/acme-training.json)):

```json
{ "base": "training", "id": "acme-training", "name": "Acme Training",
  "accent": "#006FF5", "background": ["#FFFFFF", "#E8F1FF"], "zoomScale": 1.9, "mockup": "browser" }
```

Fields: `aspect` (16:9, 9:16, 1:1, 4:3, source), `mockup` (none, window, browser, laptop, iphone, ipad), `background`, `backgroundAngle`, `padding`, `cornerRadius`, `shadow`, `fill`, `autoZoom`, `zoomScale`, `followCursor`, `clickEffects`, `captions`, `stepNumbers`, `keystrokeOverlay`, `introCard`, `accent`, `exportGuide`, `fps`.

## How it works

| Piece | What it does |
|---|---|
| ScreenCaptureKit + SCRecordingOutput | 60 fps HEVC capture of a display, window, app or region, with system audio and microphone |
| CoreMediaIO screen devices | iPhone/iPad over USB (the mechanism QuickTime uses) |
| Global event monitor + Accessibility | Clicks, shortcuts, scrolls and the cursor path; click targets are named |
| Camera planner | Zoom windows around clicks and typing, dead-zone follow, critically damped springs |
| Renderer (Core Image + AVAssetWriter) | Constant-fps H.264 MP4 with mockup, background, corners, shadow, click ripples, captions, key pills, intro card and mixed audio |
| Guide exporter | Annotated PNG per step, `guide.md` and a self-contained `guide.html` |
| `agentcut-mcp` | A small stdio MCP server that talks to the app's local API |

## Output files

`~/Movies/AgentCut/<project-id>/`: `raw.mov`, `meta.json`, `events.json`, `steps.json`, `steps/step-NN.png`, `guide.md`, `guide.html`, `renders/*.mp4`.

## Project layout

```
Sources/AgentCut/       the macOS app (SwiftUI + AppKit)
  App.swift, Views.swift          app, menu bar, windows
  AppModel.swift, Models.swift    state, projects, steps
  Capture.swift                   ScreenCaptureKit and device capture
  InputTracker.swift              clicks, keys, scrolls, accessibility names
  Camera.swift                    auto-zoom and follow planner
  Renderer.swift, Mockups.swift   compositing, effects and mockups
  Templates.swift                 built-in and custom templates
  ControlServer.swift, APIRouter.swift   local HTTP API
Sources/AgentCutMCP/    the MCP server binary (agentcut-mcp)
Resources/            Info.plist and app icon
skills/agentcut/        agent skill
examples/             custom template example
build.sh              build, sign and install
```

## Known limits (v0.1)

- Clicks made through browser automation (Chrome DevTools Protocol) do not move the real cursor, so agents driving a browser should call `agentcut_add_step` with `x`/`y`.
- Touches on a physical iPhone are not tracked; use `⌃⌥⌘S` or agent steps. The iOS Simulator is fully tracked.
- Region selection is API-only for now.

## Author

Built by Amir Shneider with Claude.

## License

MIT. See [LICENSE](LICENSE).