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

# How To Run

## Step 1 (Clone Repo)

Using the following **command** create a local instance of this repo.

```bash
git clone git@github.com:fabelis/agent.git
```

## Step 2 (Configuration)

To customize your agent edit your `config.json` file in the root directory. Here's an **example** of what it looks like below.

```json
{
    // Model used for prompting
    "completion_provider": "anthropic",
    // Model to convert data to embeddings, options include local | openai
    "embedding_provider": "local",
    // Vector Database to store embeddings, currently supports local | mongodb
    "db": "local",
    // list your clients here 
    // [KEYS] indicate the client's name 
    // [VALUE] is the clients config (if no config is needed use true)
    "clients": {
        "cli": true
    }
}
```

**What We Support** below shows all integrated providers/dbs/clients.

{% content-ref url="/pages/ia0KtjnYEkoxU2Eo8OpK" %}
[What We Support](/what-we-support.md)
{% endcontent-ref %}

## Step 3 (Setup .env)

{% hint style="info" %}
**Only** fill in values that are **necessary**. This is dependent on your `config.json` file in **Step 2**.&#x20;
{% endhint %}

All **secrets** are stored within the `.env` file. You can use `.env.example` as a reference.

**Environment** shows an explanation for each environment variable as a reference.

{% content-ref url="/pages/KKZ9jUsbG3uovdLN4nT8" %}
[Environment](/environment.md)
{% endcontent-ref %}

## Step 4 (Create Character)

{% hint style="info" %}
All character files **MUST** be located in the `characters` folder in the root directory of the project.
{% endhint %}

This section explains what the character file is. Check it out for assistance!

{% content-ref url="/pages/ZXeMykLhTGyKVf2jJj8x" %}
[Character File](/agent/character-file.md)
{% endcontent-ref %}

The program defaults to using the character located under `character.example.json`. If you would like to load a custom character file use the `--character` flag when launching. Here's an example:

```bash
cargo run -- --character fabelis.json
```

## Step 5 (Run The Agent)

{% hint style="info" %}
If no **clients** are used in the `config.json` then nothing will happen when you run the program.
{% endhint %}

As explained above you can run the program using the command below, but to load your custom character use the **character** flag.

```bash
cargo run
```

To see a simple example of running your agent check out the link below:

{% content-ref url="/pages/155XwVyHKrwHdNiNhUL5" %}
[CLI Chatbot](/agent/cli-chatbot.md)
{% endcontent-ref %}
