Skip to main content

Installation

This guide provides the fastest and easiest way to install Wren AI on your local computer. We support Linux, Windows, and Mac OSX computers.

Prerequisites

1. Install Docker Desktop on your local computer.

Please ensure the version of Docker Desktop at least >= 4.17.

2. Prepare an OpenAI API key

Please ensure that your Open API key has Full Permission(All). api_key

info

The OpenAI key is used for generating SQL whenever a question is asked in Wren AI.
We will not store your OpenAI key for other purposes.

Using Wren AI Launcher

Wren AI Launcher is a program that we designed to make installation as easy as possible.

Download and run Wren AI Launcher

Execute following commands in the terminal.

curl -L https://github.com/Canner/WrenAI/releases/latest/download/wren-launcher-darwin.tar.gz | tar -xz && ./wren-launcher-darwin
info

You can see other versions from our release page on Github: https://github.com/Canner/WrenAI/releases

Set privacy & security setting

  1. You will notice that the launcher will fail to run because this program is not verified by Apple yet. mac1

  2. Go to System Settings from the Apple menu, then click Privacy & Security in the sidebar. You will see "wren-launcher-darwin" was blocked... message. Click Allow Anyway. mac2

Run the program

  1. Click Open

    mac3

  2. Choose the LLM provider you would like to choose. If it's OpenAI, please go to the next step; otherwise, please read the documentation here for custom LLM provider setup.

    mac4

  3. If you choose OpenAI for the LLM provider, please enter your OpenAI API key, then select an OpenAI's generation model you want to use in Wren AI. We now support following models:

    • GPT-4o-mini
    • GPT-4o
  4. Wait for the installation to finish

    At this point, the installation is automatically running. This program will setup docker containers for you and open the application URL in the browser for you after installation.

    mac5

  5. Enjoy it!

    If the launcher program doesn't open the URL for you, go to localhost:3000 to start using Wren AI.

    mac6

Using Shell

You can also start Wren AI from shell commands. By passing arguments to the launcher, you can skip some configuration settings and start Wren AI smoothly.

Step 1. Open your shell and check the arguments you can pass to the launcher by running the following command:

./wren-launcher-darwin -h

usingShell_mac1

Step 2. Run the launcher and pass the desired arguments. For example, if you want to skip all the OpenAI settings, you can run the following command:

./wren-launcher-darwin -llm-provider openai -openai-api-key YOUR_OPENAI_API_KEY -openai-generation-model gpt-4o-mini

You will see logs indicating that the OpenAI API key and generation model have been provided, and Wren AI will then start automatically.

usingShell_mac2

Change OpenAI API Key

If you wish to change the OpenAI API Key you've previously used in Wren AI, please follow these steps to update the key.

  1. Run the Wren AI Launcher again and enter the OpenAI API key you'd like to use

    linux1

  2. Restart Wren AI service
    To restart Wren AI service using Docker Desktop, simply click on the restart option listed in the wrenai project.

    restart

Update Wren AI Version

If you'd like to upgrade your Wren AI version, please follow these steps:

  1. Download the Wren AI Launcher of the latest version and run it
    You can simply use the command line provided in Using Wren AI Launcher.

  2. Restart Wren AI service
    To restart Wren AI service using Docker Desktop, simply click on the restart option listed in the wrenai project.

    restart

Troubleshooting

  1. Wren-engine failed to start due to qemu: uncaught target signal 11 (Segmentation fault) issue

    If you're using Apple Silicon Mac, you saw Wren AI failed to launch and wren-engine container failed to start due to following errors:


    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    Seamentation fault
    ...

    please upgrade your docker desktop to the latest version or enable Use Rosetta for x86/amd64 emulation on Apple Silicon option in docker desktop settings. troubleshoot