Skip to content
Klex
English
Esc
↑↓navigate↵open⌘Jpreview
On this page

Quickstart

Install Klex and get your first Klex bot up and running.

Installation

Klex bots are self-hosted. This means that you must download the Klex application on a machine that should later act as the memory store and the execution environment for the bot.

To install Klex, run the following script in your system’s shell:

curl -fsSL https://klex.bot/install.sh | sh
curl -fsSL https://klex.bot/install.sh | sh
irm https://klex.bot/install.ps1 | iex
curl -fsSL https://klex.bot/install.sh | sh

Creating your bot

To create, enroll, and start a bot without interactive setup, use an enrollment token from Klex Cloud:

klex --create-bot --cloud-enroll-token <token>

Add --headless to run without the terminal UI. You can also supply the token through KLEX_CLOUD_ENROLLMENT_TOKEN instead of a CLI argument to keep it out of shell history.

Cloud bots use a stable UUID folder under ~/.klex/agents/ (or $KLEX_HOME/agents/). The cloud-assigned name is displayed in the picker; renaming the bot does not move its folder. Until the cloud configures a name, it is displayed as Bot.

For a standalone bot, a name is required:

klex --create-bot --no-cloud --bot-name Ada

Standalone bots use the supplied name as their folder name. Creation cannot be combined with --data-dir or KLEX_DATA_DIR; those open an existing bot. If enrollment fails, the new folder is retained and its path is printed. Retry with klex --data-dir <printed-path> --cloud-enroll-token <token> instead of creating another bot. Providers and models still need to be configured before the bot can work.

Sign up to the Klex Cloud

Go to the Klex Cloud and sign up. In the left sidebar, select the Bots panel and click on Set up a Klex Bot.

Start Klex

Follow the guide in the wizard to install and start the Klex app.

Create a new bot

In the Klex app, press a to create a new bot. Cloud-connected bots skip the local name prompt; the cloud sets their name.

Enroll the bot into the cloud

Follow the instructions in the cloud wizard to connect this bot to your Klex Cloud organization.

Configure model providers & model selection

The cloud wizard will now prompt you to configure the model providers and models you want the bot to use.

Give the bot its soul

In the next step, the wizard will ask you to design the bot’s soul. You have two options: Creator mode (recommended!) and God message mode.

Learn more about the soul.

Connect MCPs

Give the bot access to MCPs. The Klex Cloud helps you easily create dedicated accounts for the bot in each integrated app, but you can of course also connect any other MCP.

Start Klex

Start the CLI with the following command: klex --no-cloud

Create a new bot

Select Create a new Bot in the option list and press Enter.

Name your bot

Enter the name this bot should use. The bot will know that this is its own name.

Configure model providers

Go into Settings -> Model Providers and create a provider instance for every model provider you want to use.

Configure model selection

Go into Settings -> Model Selection and configure the model for every use case of the bot.

Give the bot its soul

Go into Settings -> God messages to send a God message. The content of the god message should describe what the soul of the bot should look like (its job, its character, etc.).

Learn more about the soul.

Connect MCPs

Go into Settings -> MCPs and connect MCPs to give the bot access to the outside world.

Was this page helpful?