> ## Documentation Index
> Fetch the complete documentation index at: https://andcze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI editor

> Describe a change in words — the built-in agent edits the site files, builds a preview, and you decide what to publish.

The AI editor (the built-in ItemShop agent) is a chat in the panel (**Workspace → AI Agent**) that changes your site files the way a developer would: it reads the project, edits components and styles, runs a build and shows the result. You don't need to know TSX or CSS and install nothing — the agent runs in the ItemShop cloud.

## How you work with the AI

**1. Say what you want to change**

For example: "Change the accent colour to green and add a bar with the online player count above the products". You can attach a screenshot or an image as a reference or an asset.

**2. Watch the steps**

You see live which files the agent reads and changes, and the build status. You can **stop** the run at any time.

**3. Check the diff and preview**

Changed files appear in **Changes** with diffs and the author. Next to the chat is a preview of the site with your products (desktop / phone).

**4. Publish or discard**

**Publish** commits the draft as a new revision, builds it and deploys it to production. Discarding the draft does not change the published site.

> [!NOTE]
>
> The agent works **only on the draft** and has no publish tool. Nothing reaches players until you click **Publish**, and every publication can be rolled back ([rollback](https://andcze.mintlify.site/en/site/build-hosting.md#rolling-back)).

When it finishes editing, the agent builds the draft itself. If the build fails, it receives the log and fixes the errors (up to 3 attempts).

## Example prompts

| Goal | Prompt |
| - | - |
| Branding | "Insert my logo from the media library and make the dark theme the default." |
| Layout | "Show products in 3 columns, and in one column on phones." |
| New section | "Add an FAQ section below the products with 4 questions about delivery and refunds." |
| Shop data | "Add a recent-purchases widget and the monthly goal in the right column." |
| Fixing | "The build failed — read the log and fix the error." |

> [!TIP]
>
> Small, specific requests work best. Instead of "make it prettier" write "increase the spacing between product cards and round the corners".

## What the agent knows about your shop

The agent receives the shop context (name, servers, products, categories) and the project file list. Product data is **read-only** for it — the site displays it through the SDK, so the agent does not hard-code prices or products. It has no access to payment keys, buyer data or account settings.

The agent treats content returned by tools (files, product descriptions) as data, not instructions. It will also not write files outside the project, secrets, environment files, install scripts (`postinstall` etc.), nor change the parts of checkout responsible for consents and the redirect to payment.

## Agent tools

The agent uses a subset of the [MCP server](https://andcze.mintlify.site/en/developers/mcp.md) tools — the same ones external agents use:

| Tool | What it does |
| - | - |
| `get_shop_context`, `get_site` | Shop context and site state. |
| `list_files`, `read_file`, `search_files` | Browse the project. |
| `write_file`, `apply_patch`, `delete_file` | Change draft files. |
| `get_site_config`, `update_site_config` | Read and change `src/site.config.ts` (appearance). |
| `list_revisions` | Revision history. |
| `start_build`, `get_build`, `create_preview` | Build the draft, read the log, create a preview. |
| `list_products`, `get_product` | Read the catalogue. |

## Models and limits

You pick the model in the chat. The **Accurate** tier is available on the Pro plan.

| Tier | Good for | Plan |
| - | - | - |
| Fast | Small text and colour tweaks | Free, Pro |
| Balanced | Most tasks | Free, Pro |
| Accurate | New sites and bigger rebuilds | Pro |

| Limit | Free | Pro |
| - | - | - |
| AI tokens per day (per shop, resets at midnight UTC) | 200,000 | 2,000,000 |
| Tokens per conversation | 150,000 | 1,000,000 |
| Model steps / tool calls per message | 24 / 60 | 60 / 150 |
| Default model tier | Balanced | Accurate |

In addition: one message can run for up to 10 minutes, each user is limited to 10 messages per minute, and a shop can run 2 runs in parallel. Hitting a limit shows a message in the chat (for example "Daily limit reached"). Conversations are private to the user. More on site limits: [Plans & limits](https://andcze.mintlify.site/en/site/limits.md).

Prefer your own agent? Connect it over MCP — see [Connecting agents](https://andcze.mintlify.site/en/site/agents.md).

> **[Build & hosting](https://andcze.mintlify.site/en/site/build-hosting.md)**
>
> Preview, publish, rollback.

> **[Custom code](https://andcze.mintlify.site/en/site/custom-code.md)**
>
> Prefer to write it yourself? Upload your files.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.