Skip to content

Tutorials

Edit by prompting an agent, end to end

Connect an agent through MCP or the CLI, ask for a cut, and watch it import, edit, check and export.

Last updated:

You will learn#

  • how to connect an agent and what it can do;
  • the order in which a good agent works, and the commands it runs;
  • how you check its work.

The idea#

The agent uses the same commands you do. Through MCP it calls tools such as edit, lint and view; with a shell it runs the same operations from the CLI. Every edit is a numbered revision with the name of the agent, so you can read the history and undo any step. Nothing is sent over the network by the product itself.

Steps#

  1. Connect the agent. For Claude Code:

    Terminal
    claude mcp add stuarty -- stuarty mcp

    Other clients take the same command, see Connect an agent. If you run the editor, the agent and the browser share the project.

  2. Teach it the product. stuarty agent:docs --print skill prints the skill and --print agents the snippet for your AGENTS.md; see The skill.

  3. Ask in plain words, for example: "Import interview.mp4, remove the silences, caption the speech and export a 9:16 video."

  4. The agent works in this order. You can follow it in the history.

    StepMCP toolCLI
    create the project, with its description and its goalproject_createstuarty project:create --name "Interview" --id prj_7k2m9x4q1b --description <text> --specific <text> --measurable <text> --achievable <text> --relevant <text> --time-bound <text> --due <date>
    add the video, with its sizeproject_item with "action": "add", "kind": "timeline"stuarty item:add --project prj_7k2m9x4q1b --kind timeline --title "Interview" --preset 9:16
    import the mediamedia_importstuarty media:import interview.mp4 --project prj_7k2m9x4q1b --asset-id ast_3c5v8n2w6d
    learn the operationscommand_helpstuarty command:help clip.add
    edit in one batcheditstuarty edit --project prj_7k2m9x4q1b --ops -
    transcribejob_start with "kind": "transcribe"stuarty transcribe --project prj_7k2m9x4q1b --asset ast_3c5v8n2w6d --wait
    checklint, then viewstuarty lint --project prj_7k2m9x4q1b
    exportjob_start with "kind": "export"stuarty export --project prj_7k2m9x4q1b
  5. Read what it did. The agent sees the same history you do:

    Terminal
    stuarty history --project prj_7k2m9x4q1b
  6. Undo what you do not like. stuarty undo --project prj_7k2m9x4q1b reverts the last step, and the agent can redo or try again.

How to check its work#

An agent should look the cheapest way first: read the project as text, run lint, then look at frames with view. How an agent verifies its work explains the order. Ask the agent to run lint before every export; the export is refused while the lint finds an error.

Common mistakes#

  • Letting two actors edit from an old revision: E_REVISION_CONFLICT. The agent reads the project again and plans again; see Recipes.
  • Asking for transcription before the helper is installed. A person installs it once with stuarty tools:install whisper.
  • Giving the agent a path on another machine. Paths are read on the machine that runs the server.

Next steps#