> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/elements-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmacsoftware.com/elements-docs/using-elements/elements-ai.md).

# Elements AI

Use the built-in AI Assistant, connect external AI tools, and keep project context in AI Memory

Elements supports two ways to work with AI: use the **Elements AI Assistant** inside the app with your own API key, or connect an external AI tool through the **Elements MCP Server**. **AI Memory** gives AI a place to record and read context about your project. Earlier versions of Elements called this the AI Wiki.

{% hint style="warning" %}
**AI features in Elements are entirely optional.** You remain in full control of when and how it's used.

If you prefer to work without AI, you can simply hide the AI Panel and continue building as usual.
{% endhint %}

## What each option can do

Both options work on the project you have open in Elements, and both can do most of the same things. The table shows what is available with each one today.

| What you can do                                                              | AI Assistant | MCP client                |
| ---------------------------------------------------------------------------- | ------------ | ------------------------- |
| Inspect the project's pages, components, Theme, design system, and Resources | Yes          | Yes                       |
| Build and edit pages                                                         | Yes          | Yes                       |
| Create and refine custom components                                          | Yes          | Yes                       |
| Work with CMS content                                                        | Yes          | Yes                       |
| Add and use Resources                                                        | Yes          | Yes                       |
| Look up the Elements documentation                                           | Yes          | Yes                       |
| Publish the site                                                             | Yes          | Yes                       |
| Read and update AI Memory                                                    | Yes          | Yes                       |
| Chat inside Elements                                                         | Yes          | —                         |
| Drop pages, components, templates, and files onto a message                  | Yes          | —                         |
| Choose a model and reasoning effort in Elements                              | Yes          | Use the client's controls |
| Generate images                                                              | Yes          | —                         |
| Rewrite the copy on a page in one pass, then accept or undo it               | Yes          | —                         |
| Break a large research or planning job into helper tasks                     | Yes          | —                         |
| Show a live task list in the conversation                                    | Yes          | —                         |
| Open, create, close, or switch projects                                      | —            | Yes                       |
| Use the AI client you already subscribe to                                   | —            | Yes                       |
| Combine your project with files and tools outside Elements                   | —            | Yes                       |

A few points worth knowing:

* **AI Memory is shared.** Whichever option you use, AI reads and writes the same project memory when it is enabled.
* **Image generation is only in the Assistant**, and it needs an OpenAI API key added to Elements.
* **Pointing at something precisely** by dragging a page, component, template, or file onto a message is an Assistant feature. In an MCP client you describe what you want changed, or use that client's own way of attaching files.
* **Your AI client may add its own abilities.** The table describes what Elements provides, so a client such as Cursor or Claude Desktop may still offer its own web browsing, planning, or task list.

## Elements AI Assistant: use your own API key

The built-in Elements AI Assistant lets you chat about your project and edit pages directly in Elements using your own provider account.

Add your keys in **Settings > AI > API Keys** in the Elements Preferences:

* **OpenAI** supports chat and image generation.
* **Anthropic (Claude)** supports chat.

You can add a key for either provider, or add both. Image generation requires an OpenAI API key. Keys are stored in the macOS Keychain, and requests go directly to your chosen provider, with usage billed to your account.

### Where to find the AI Assistant

Once you have added an API key:

1. Open your project in Elements.
2. Click the **sparkles icon** in the tabs at the top of the right-hand inspector sidebar.
3. The **AI Assistant** opens in that sidebar. Enter your request in the message field at the bottom of the panel.

The model menu only shows models from providers whose API key you have added. Use the effort menu beside it to choose how much reasoning the model should apply. **Medium** is the default; lower settings suit quick, simple changes, while higher settings can help with more complex work but may take longer and use more tokens.

For example, you could ask it to create a banner for your business, refine the text on a page, or adjust a layout.

<figure><img src="https://3876014504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy6AECEVH2p4eFDicpM1%2Fuploads%2Fgit-blob-2c295f6e16b9a769da3fba63d8646dac2c91aab5%2Felements-ai-assistant.png?alt=media" alt="Elements showing a consultancy website with AI Memory below Pages and the AI Assistant generating and applying a new hero image"><figcaption><p>The AI Assistant is open in the right-hand sidebar, generating and applying a new hero image while AI Memory remains available beside the project.</p></figcaption></figure>

See Elements AI Assistant for the full API key setup instructions.

## Elements MCP Server: connect an external AI tool

The Elements MCP Server lets compatible AI tools, such as **Cursor**, **Codex**, and **Claude Desktop**, work with the project you have open in Elements.

Open **Settings > AI > MCP Server** and turn on **Allow AI tools to interact with Elements**. Use **Install…** in the Claude Desktop section, or copy the connection URL into another AI client's MCP settings.

If you use **ChatGPT**, switch the conversation to **Work mode** before connecting to Elements. Elements MCP does not run in a regular Chat conversation because that environment cannot attach directly to a local MCP address such as `localhost:9712/mcp`.

Keep Elements running with your project open while using the connected client. See Elements MCP Server for connection instructions and troubleshooting.

## Control AI for each project

Use the Assistant composer and its menu to control how AI works with the current project. These settings are saved with that project and are enabled by default.

* **AI Memory** lets the Assistant and connected MCP clients read, search, and update the project's memory. Turning it off can make AI work faster because it skips memory lookup and maintenance, but it will not read or update that context for future conversations. AI can still work from the current project state and the context you provide in the conversation.
* **Prefer Templates** tells the built-in Assistant to start with Smart Templates when it builds a new section or page. Turn it off when you want the Assistant to compose from core components. You can still name, attach, or explicitly request a template. This setting applies to new chats.

## AI Memory: context about your project

**AI Memory**, called the AI Wiki in earlier versions of Elements, appears below **Pages** in the left-hand sidebar. It keeps project-specific information such as the site's purpose, page structure, writing style, visual direction, decisions, and plans.

**AI Memory is read-only for humans.** You can browse and read its entries in Elements, but you cannot edit them directly. When AI Memory is enabled, the Assistant and connected MCP clients can write and update entries, then use them as context when working on your project.

There is one memory store per project. The built-in Assistant and a connected AI client use the same entries, so context recorded through one option is available to the other.

For example, AI can record your preferred tone of voice or a design decision and refer to it when making later changes. If you want to add or correct information, ask the AI to update the relevant entry.

## See Elements AI in action

These videos were recorded with in-development versions of Elements. They give you an idea of what's possible, but some features, settings, and workflows may look different in the version you're using.

The videos are listed oldest first by publication date.

1. [**Elements AI can redesign your website in a single prompt**](https://youtu.be/-ka3Aj2Za0w) — 23 June 2026

   See how a single prompt can change the look of an existing website.
2. [**Elements AI can now build blogs**](https://youtu.be/4FFZ5X8qLME) — 30 June 2026

   A look at using Elements AI to fix Markdown issues and build a blog.
3. [**Elements AI Makes Tables Effortless**](https://youtu.be/iplTPFAu_zc) — 21 July 2026

   See how Elements AI can help you present data in a table on your website.
4. [**Elements AI Dev Diary: Context aware image generation**](https://youtu.be/5RkD4gD8IRs) — 23 July 2026

   An early look at generating images with awareness of your project's context.
5. [**Elements AI: From Sketch to Website**](https://youtu.be/bqwVZ7xUBLE) — 29 July 2026

   Watch a sketch become a working website with the help of Elements AI.
6. [**Building a webpage with Elements AI**](https://youtu.be/APC7JV6HvDw) — 30 July 2026

   A relaxed demonstration of trying different prompts with the AI Assistant to build a webpage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.realmacsoftware.com/elements-docs/using-elements/elements-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
