> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Generate Code Using the Wix AI Assistant

## Article: Generate Code Using the Wix AI Assistant

## Article Link: https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/ai-assistant-in-the-wix-ide/generate-code-using-the-wix-ai-assistant.md

## Article Content:

# Generate Code Using the Wix AI Assistant

Use the [Wix AI Assistant](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/ai-assistant-in-the-wix-ide/about-the-wix-ai-assistant.md) to help you work on a site's code inside the [Wix IDE](https://support.wix.com/en/article/about-the-wix-ide). 

1. To access the Wix AI Assistant, click the **Wix AI Assistant** <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/e2a0a9414a1f70cd463018ee2f8646df.png" alt="AI Assistant Icon" style="height: 1em; vertical-align: middle;"> icon in the Wix IDE sidebar or right click in the Wix IDE and select **Open the Wix AI Assistant**. 
    The **Wix AI Assistant** panel opens. 
  
    <div style="text-align:left-center">

    <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/7a95b6cb443eec4853d24a783136f922.png" style="max-height:475px"/>

    </div> 
  
  

2. Select the type of help you need.
3. In the text input field, describe [what you want the code to do](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/ai-assistant-in-the-wix-ide/about-the-wix-ai-assistant.md), and then click send ![Send Button](https://github.com/wix-incubator/wix-code-docs/assets/66324550/11994058-d69d-41d3-9e5e-8c0fc74c8156).
   <blockquote class="tip">
     <strong>Tip:</strong> To get immediate code fix suggestions, highlight the code and right click  <strong>Wix AI Assistant: Fix code</strong>.
   </blockquote>  


    <div style='text-align:left; margin-left:33px'>

     ![code-snippet](https://github.com/wix-incubator/wix-code-docs/assets/66324550/e84b2b08-863f-407d-bea6-28d5ebfe87f0)

    </div>
    The code assistant creates a code snippet that performs the requested task and explains how the code works.

4. You can add the proposed solution to the code by selecting: 
    - **Insert**: Inserts the code directly into the code file you are editing. 

    <blockquote class="standard">
      <strong>Note:</strong> If any code is highlighted in the Wix IDE, the inserted code replaces it. Otherwise, the code is inserted at the current cursor position.
    </blockquote>

    - **Copy**: Copies the code snippet to paste it manually into the Wix IDE.
5. You can continue your conversation with the assistant after receiving its initial response. You can ask up to 2 follow-up questions after each initial query. After this, the Wix AI Assistant starts over.
6. After your chat is complete, click home <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/549194fa27fd842bb0d75f11d1d2d62a.png" alt="home-icon" style="vertical-align:middle; height:20px;"> at the top of the Wix AI Assistant panel to start over.
 > **Note:** Make sure to test the code in [preview mode](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/testing-troubleshooting/about-debugging-your-code.md) before publishing the site.

## See also

- [About AI assistants](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/about-ai-assistants.md)
- [About the AI Assistant in the Wix IDE](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/ai-assistant-in-the-wix-ide/about-the-wix-ai-assistant.md), to generate backend code using prompts.
- [Studio Editor: Using the AI Code Assistant to Add Custom Code](https://support.wix.com/en/article/studio-editor-using-the-ai-assistant-to-add-custom-code)
- [About the AI Code Assistant in the Wix Studio Code panel](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/ai-assistants/ai-assistant-in-the-code-panel/about-the-ai-code-assistant.md)