Skip to content

[DOCS] Document the CLI screen recording tools (RecordStart / RecordStop) #745

Closed

Description

@edenreich

Summary

The CLI adds two opt-in screen recording tools, RecordStart and RecordStop (inference-gateway/cli#1293, implemented in inference-gateway/cli#1304). The agent can record the entire primary screen, a single window, or a region to an H.264 MP4, for an unattended audit trail or for tutorials. The docs site has no page for them yet.

What to document:

  • Enabling: computer_use.recording.enabled in computer_use.yaml (off by default), or INFER_COMPUTER_USE_RECORDING_ENABLED=true.
  • Config keys: max_duration (120s default cap, the recording finalizes itself), output_dir (default ~/.infer/tmp/recordings), framerate (24), with their INFER_COMPUTER_USE_RECORDING_* env vars.
  • Capture modes with examples: {"mode": "screen"}, {"mode": "window", "window": "app:Safari"}, {"mode": "region", "region": {"x": 0, "y": 80, "width": 1280, "height": 720}}. Window targets: frontmost, app:<name>, pid:<number>, or an app name.
  • Behaviour: RecordStop returns path, duration and size, an active recording is finalized on CLI exit, a REC badge shows in the chat status bar, and a running recording is listed in /tasks under Screen Recordings.
  • One recording at a time, machine wide: while ffmpeg runs, the recording holds ~/.infer/run/screen-recording.lock, so a RecordStart from any other infer process (another chat, a Desktop app session, a channel run) fails with an error naming the owner's pid.
  • Headless runs keep the recording alive: a running recording is a background job, so infer headless waits for it (up to a2a.task.agent_mode_max_wait_seconds, default 300s) instead of exiting and cutting it short. The Desktop app stops it by sending a user_message line on stdin, which reaches RecordStop in the same process. Channel, scheduled and heartbeat runs do not forward follow-up messages to a running process, so there a recording runs until max_duration. A recording that stops on its own queues a note, and the agent collects the file with RecordStop.
  • Approval: RecordStart always requires approval except in auto mode. Chat shows the approval prompt; headless follows approval_behaviour (IPC with --require-approval, the LLM judge in auto-with-judge mode, otherwise blocked). RecordStop follows computer_use.approval: never (default) and destructive run it without a prompt, only always asks.
  • Headless and AG-UI hosts (infer headless --format ag-ui, used by the Desktop app): a CUSTOM event screen_recording with {"active": bool} when a recording starts or ends, the recording appears in background_tasks with kind recording, and RecordStart arrives as an approval_request when run with --require-approval. A recording still running when the run ends is finalized after the terminal event, so hosts clear their indicator on RUN_FINISHED or RUN_ERROR.
  • Requirements: a full ffmpeg with libx264 and the platform screen grabber (avfoundation / x11grab / gdigrab) on PATH, e.g. brew install ffmpeg or apt install ffmpeg. The ffmpeg the CLI auto-downloads into ~/.infer/bin cannot record yet: the build with libx264 and the screen grabbers is merged (feat: build ffmpeg with screen capture and libx264 binaries#31) but not in a binaries release (the latest is v0.4.0), so do not document the download as a fallback until one ships. Also the macOS Screen Recording permission (plus Accessibility for window mode), and X11 on Linux (Wayland is not supported yet).

Suggested location: a new cli-screen-recording.md page linked from cli.md (next to the other cli-* feature pages), with a short "Headless and AG-UI hosts" section. Source of truth in the CLI repo: docs/tools-reference.md#recordstart-and-recordstop-tools, docs/configuration-reference.md#screen-recording-computer_useyaml, and docs/ag-ui-output.md. The Desktop app's recording overlay is tracked separately in inference-gateway/desktop#320 - document it on desktop.md once it ships.

Acceptance Criteria

  • A screen recording page documents enabling, the three capture modes with examples, and the RecordStop result
  • The config keys, defaults and env vars are listed
  • Per-OS requirements (ffmpeg, macOS permissions, X11 only) are covered
  • The approval behaviour is covered: RecordStart always asks outside auto mode (chat prompt, headless via approval_behaviour), RecordStop follows computer_use.approval
  • The machine-wide one-recording lock and the headless keep-alive are explained, including how the Desktop app stops a recording versus channel and scheduled runs
  • The AG-UI screen_recording event and the recording background job kind are documented for headless hosts
  • cli.md links to the new page

Activity

  1. added
    documentation
    on Sep 24, 2026
  2. added theissue type on Sep 24, 2026
  3. moved this to Todo in 2026on Sep 24, 2026
  4. edenreich commented on Sep 25, 2026

    @edenreich
    ContributorAuthor

    @claude Can you document this? use /ponytail:ponytail

  5. inference-gateway-maintainer commented on Sep 25, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 3m 2s —— View job • docs/issue-745-20260925-1930 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-745-20260925-1930?quick_pull=1&title=Issue%20%23745%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23745%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented the screen recording tools

    • Read repo conventions and sibling cli-* pages, pulled the CLI repo's tools / configuration / AG-UI references as source of truth
    • Wrote cli-screen-recording.md
    • Linked it from cli.md (feature list, a short Computer Use subsection, tool-category table, tmp tree row) and registered both sidebar entries
    • bun run format, bun run lint:md, bun run build all pass
    • Committed and opened PR docs: add CLI screen recording page #774

    The page covers enabling (computer_use.recording.enabled), the config keys with defaults and INFER_COMPUTER_USE_RECORDING_* env vars, the three capture modes with examples, the RecordStop result, per-OS requirements, the machine-wide lock, the headless keep-alive (Desktop stdin user_message versus channel/scheduled runs), the approval split between RecordStart and RecordStop, and the AG-UI screen_recording event plus the recording job kind.

    As the issue asks, the ffmpeg auto-download into ~/.infer/bin is not documented as a fallback - only a full ffmpeg on PATH. Worth a follow-up once a binaries release ships the libx264 build. The Desktop recording overlay is out of scope here.

  6. moved this from QA to Done in 2026on Sep 25, 2026
  7. inference-gateway-releaser commented on Sep 26, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.17 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions