# Editing with AI Chat

The AI chat editor is the primary way to edit your Smart Pages. Describe what you want in plain language and AI makes the changes.

## Opening the chat

Click the **wand icon** in the left sidebar to open the chat panel.

## How it works

### Page-level editing

When no section is selected, messages apply to the entire page.

* "Add a testimonials section after the hero"
* "Change the color scheme to dark blue and white"

### Section-level editing

Click a section to select it. A **context chip** appears in the chat input. Messages now apply only to that section.

* "Change the headline to something more urgent"
* "Replace the image with a lifestyle photo"

### Multi-section editing

Hold **Cmd** (Mac) or **Ctrl** (Windows) and click multiple sections. All appear as chips.

* Select hero + CTA → "Make these sections use the same color palette"

### Removing context

Click **×** on any context chip to remove it from scope.

## Suggestions

When you first open chat, AI shows **suggested prompts** like "Add a hero section with CTA" or "Add social proof section." Click to send.

After edits, AI shows **contextual suggestions** for recommended next steps.

## Chat history

Conversation history is preserved per page. Click the **history icon** to review previous edits.

## Approvals

For significant changes, AI may ask for approval. You'll see an approval card — click **Approve** or **Reject**. Control this with [Permission Modes](https://help.pagefly.io/smart-pages/editing-with-ai-chat/permission-modes).

## Tips

* **One change per message** gets more precise results
* **Reference specific elements** — "the headline in the hero section" is better than "the text"
* **Undo is available** — See [Undo & Checkpoints](https://help.pagefly.io/smart-pages/preview-and-publish/undo-and-checkpoints)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pagefly.io/smart-pages/editing-with-ai-chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
