> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fleet RLM quickstart

> Install Fleet RLM from source, connect PostgreSQL, Daytona, and your model provider, and run a live terminal Session with local MLflow tracing.

This guide runs Fleet RLM locally from source. `fleet cli` starts the API server and a local MLflow server for you.

## Prerequisites

* Python 3.11, 3.12, or 3.13
* [uv](https://docs.astral.sh/uv/)
* An existing PostgreSQL database
* A [Daytona](https://www.daytona.io/) organization and Volume, plus an API key
* An API key for a model provider that DSPy supports. This guide uses `openai/gpt-4o-mini` as an example route.

**1. Install**

Clone the repository and install the Python environment.

```bash theme={null}
git clone https://github.com/Qredence/fleet-rlm.git
cd fleet-rlm
uv sync --dev
```

**2. Add credentials**

Copy the example environment file.

```bash theme={null}
cp .env.example .env
```

Open `.env` and set these values:

| Variable | Value |
| - | - |
| `FLEET_DATABASE_URL` | Your PostgreSQL connection string. |
| `FLEET_LLM_MODEL` | Your DSPy model route, such as `openai/gpt-4o-mini`. |
| `FLEET_LLM_API_KEY` | Your provider API key. Leave it empty to use the provider's own variable, such as `OPENAI_API_KEY`, from your shell. |
| `FLEET_LLM_BASE_URL` | Optional. An OpenAI-compatible endpoint. It must use HTTPS, or HTTP on `localhost`. |
| `FLEET_DAYTONA_API_KEY` | Your Daytona API key. |
| `FLEET_DAYTONA_ORG_ID` | Your Daytona organization ID. |
| `FLEET_DAYTONA_VOLUME_ID` | Your Daytona Volume ID. |

`FLEET_TYPESAFE_API_KEY` is optional. It enables the TypeSafe backend that preloads relevant Skills. Keep `.env` out of Git. To change non-secret defaults, copy `config/fleet.toml.example` to `config/fleet.toml`. See the [configuration reference](https://docs.qredence.ai/fleet-rlm/reference/configuration.md).

**3. Start a Session**

```bash theme={null}
uv run fleet cli --session research-1
```

`fleet cli` starts the API server on `127.0.0.1:8000` and local MLflow on `127.0.0.1:5001`, then opens the terminal client. If a setting is missing or a check fails, Fleet first opens the [setup checklist](https://docs.qredence.ai/fleet-rlm/guides/terminal.md#setup-checklist) so you can fix it. Fleet creates its tables in the existing database at startup. Server logs go to `.fleet/logs/server.log`.

The first time you use a Daytona organization, build the sandbox snapshot. Type `/setup`, choose **Build snapshot** (`Alt+B`), and confirm. Wait until the snapshot is active. See [Snapshots](https://docs.qredence.ai/fleet-rlm/concepts/sandbox-execution.md#snapshots).

Try a prompt such as "Use Python to calculate the first 20 Fibonacci numbers and explain the result." Type `/help` to see every command.

**4. Work with a file**

For a CSV with `region` and `revenue` columns, attach it, select it as context, and ask for an artifact.

```text theme={null}
/attach ./sales.csv
/context files/sales.csv
Calculate revenue by region and save artifacts/revenue_by_region.csv.
/artifacts
/get artifacts/revenue_by_region.csv ./revenue_by_region.csv
/trace
```

Inspect the answer and the artifact before you rely on them.

**5. Resume the Session later**

Pass the same Session ID to return to the conversation.

```bash theme={null}
uv run fleet cli --session research-1
```

If you omit `--session`, the client generates a short ID such as `sess_1a2b3c4d`.

> [!TIP]
>
> To send traces to Databricks managed MLflow instead of the local server, run `uv run fleet cli databricks`. See the [CLI reference](https://docs.qredence.ai/fleet-rlm/reference/cli.md).

## Run the server without the terminal

Start only the FastAPI server when you want to call the API from your own client.

```bash theme={null}
uv run fleet serve
```

The server listens on `http://127.0.0.1:8000` and has no caller authentication. `fleet serve` doesn't start MLflow. If the local MLflow server is unreachable, the server doesn't start. Keep `fleet cli` running, or start MLflow separately as the [CLI reference](https://docs.qredence.ai/fleet-rlm/reference/cli.md#fleet-serve) shows. See the [HTTP API reference](https://docs.qredence.ai/fleet-rlm/reference/http-api.md).

## Next steps

* [Use the terminal](https://docs.qredence.ai/fleet-rlm/guides/terminal.md)
* [How Fleet RLM works](https://docs.qredence.ai/fleet-rlm/concepts/how-it-works.md)
* [Configuration reference](https://docs.qredence.ai/fleet-rlm/reference/configuration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.