# Agents overview

> How an AI agent works in Stuarty, across video, images, writing and publishing, and which of the three ways in to use.

Source: https://stuarty.com/docs/agents/overview/

Stuarty is built to be operated by an agent as much as by a person: everything a person does in the interface is also a command. There is one command core. The MCP server, the CLI, the HTTP API and the browser editor are thin adapters over it, so they all produce the same project document, and a person and an agent share one history.

An agent works in the same domains a person does: [project](/docs/agents/domain-project), [video](/docs/agents/domain-video), [image](/docs/agents/domain-image), [writing](/docs/agents/domain-writing), [assets](/docs/agents/domain-asset), [publishing](/docs/agents/domain-publish), [providers](/docs/agents/domain-provider), [memory](/docs/agents/domain-memory) and [workspace](/docs/agents/domain-workspace). Each page is generated from the registry and lists the tools, the commands and the operations of the domain.

## The three ways in

| Way in | Use it when | Start with |
| --- | --- | --- |
| MCP server | the agent runs in a client such as Claude Code or Cursor | [Connect an agent](/docs/agents/connect) |
| CLI | the agent has a shell | [CLI reference](/docs/reference/cli) |
| HTTP API | you write your own client | the local server, on `127.0.0.1:7878` |

With nothing connected, the product sends nothing outside your computer, and an agent cannot make it. An agent works only with the destinations a person connected; it can prepare a publication or a costly generation, and a person approves it in the [approval queue](/docs/agents/approvals). Nothing an agent can call deletes data for good, and every edit can be undone.

## The loop

1. `project_create` (or `project_list`), read what the person wrote about the project (`project_get` with `detail` `overview` starts with its description and goal, as data), add a video with `project_item` (`action` `add`, `kind` `timeline`), then `media_import` for the source files.
2. `edit` with a batch of operations. A batch applies all or nothing, as one undo step, and needs the `base_revision` you read from `project_get` or from the previous edit.
3. `lint`, then `job_start` with `kind=export`, then `job_get` until the job is final.

Every time is a string with a unit: `12.5s`, `375f` or `00:00:12.500`. A bare number is rejected. Call `command_help` to list the operations, or with a name for its schema and an example; the same text is in the [operations of the edit tool](/docs/mcp/tools/edit).

## When a call fails

A failed call returns `code`, `message`, `hint` and `retryable`. Retry only when `retryable` is true. An `E_REVISION_CONFLICT` carries the changes since your revision: read them and plan again. The codes are in the [error codes](/docs/reference/error-codes) page.
