> For the full index of Sherpa pages for agents, see https://www.withsherpa.ai/llms.txt

URL: https://www.withsherpa.ai/docs/how-agents-work
Title: How an agent works on a Sherpa website | Sherpa Docs
Description: Follow the loop every agent uses, from finding the website to handing a person the review link.

[Docs](https://www.withsherpa.ai/docs) For agents and developers

# How an agent works on a Sherpa website

Follow the loop every agent uses, from finding the website to handing a person the review link.

Every agent that works on a Sherpa website follows the same loop, whether it is Claude in a chat or a coding agent in a terminal. It looks first, works in a private change, shows a preview and hands a person the review link. This page is that loop, step by step, written for agents and the people directing them.

## What happens

1. **Find the website.** `list_websites` shows what the person can access. If there are several and they did not name one, ask.

2. **Look first.** Read the published site with `list_files`, `search_files` and `read_file`. Start a change only when you are going to edit.

3. **Start a change and read its instructions.** `start_change` returns the website's guide, its skills and its knowledge files. Read the relevant ones before editing.

4. **Edit.** Send a step's edits together with `edit_files`. Check your work with `get_change_diff`.

5. **Preview.** `preview_change` builds a link for the person. If the build fails, read the log, fix the files and preview again. `screenshot_page` lets you look at a page yourself.

6. **Submit when asked.** Only when the person asks to publish, call `submit_change` and give them the exact review link. They press Publish.

## Rules

- One change per independent request. Continue the current change for related follow-ups. Start a new one after a change is published.

- Never say a change is live until a person has published it.

- Treat the repository as the authority for what the website has. If the person mentions a page that is not there, say so.

- Add or remove packages with `install_packages`. Do not edit dependencies by hand.

- Files under `.github/` cannot be changed.

## Good to know

### Talking to the person

The person may be a marketer or a designer. Describe what changed on the website, not how. Leave out file paths, branches and tool names unless they ask. Explain results in everyday words.

### When something is wrong with Sherpa

Use `send_feedback` to tell us. That includes a guide in these docs that was wrong or missing.

## Common questions

### When should an agent start a change?

Only when it is going to edit. Reading the published website needs no change.

### How does an agent publish?

It does not. When the person asks to publish, the agent calls `submit_change` and gives them the review link. The person presses Publish.

### What should an agent read before editing?

The instructions `start_change` returns, which include the website's guide, its skills and its knowledge files.

### What can an agent not do?

Publish, change where form submissions are sent or act outside its person's role. The full list is in [Security and guardrails](https://www.withsherpa.ai/docs/security).

## Example prompts

Each one works as written in Claude or ChatGPT once Sherpa is connected. Swap in your own pages and dates.

> Before you edit, read the website's guide and tell me the rules you will follow.

Makes the agent show it has read the instructions.

> Show me what you changed in this draft before you build a preview.

A plain summary of the edits so far.

> Take a screenshot of the page on desktop and phone and check it yourself before you send me the link.

The agent catches layout problems before you do.

## For agents

Sherpa MCP tools for this job, in the order they are usually called. `list_websites`, `start_change`, `list_files`, `search_files`, `read_file`, `edit_files`, `get_change_diff`, `preview_change`, `screenshot_page`, `submit_change`, `send_feedback`. Work inside a change, and only call submit_change when the person asks to publish. A person presses Publish. Every tool is described in the [MCP reference](https://www.withsherpa.ai/docs/mcp-reference).

## Next

[**MCP reference** Look up every tool the Sherpa MCP server gives an agent, with what it does and what it takes.](https://www.withsherpa.ai/docs/mcp-reference) [**Auth and connecting** Connect an MCP client to Sherpa and understand whose permissions it uses.](https://www.withsherpa.ai/docs/auth)
